mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-31 01:44:33 -04:00
Minor fixes for static analysis
This commit is contained in:
parent
78ea18dd71
commit
f3c911fccf
@ -93,6 +93,17 @@ class MobileLocalization extends Command
|
|||||||
$text = str_replace(['<i>', '</i>'], '', $text);
|
$text = str_replace(['<i>', '</i>'], '', $text);
|
||||||
$text = str_replace(['<strong>', '</strong>'], '', $text);
|
$text = str_replace(['<strong>', '</strong>'], '', $text);
|
||||||
|
|
||||||
|
//replace the three lines above with this
|
||||||
|
// if($language->locale == 'ar') {
|
||||||
|
// $text = str_replace('\n', " ", $text);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// $text = str_replace(['<strong>', '</strong>','<i>', '</i>','<b>', '</b>'], '', $text);
|
||||||
|
// $text = str_replace('"', "'", $text);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "'$key': '$text',\n";
|
echo "'$key': '$text',\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,16 +84,12 @@ class HtmlEngine
|
|||||||
switch ($this->invitation) {
|
switch ($this->invitation) {
|
||||||
case ($this->invitation instanceof InvoiceInvitation):
|
case ($this->invitation instanceof InvoiceInvitation):
|
||||||
return 'invoice';
|
return 'invoice';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof CreditInvitation):
|
case ($this->invitation instanceof CreditInvitation):
|
||||||
return 'credit';
|
return 'credit';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof QuoteInvitation):
|
case ($this->invitation instanceof QuoteInvitation):
|
||||||
return 'quote';
|
return 'quote';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof RecurringInvoiceInvitation):
|
case ($this->invitation instanceof RecurringInvoiceInvitation):
|
||||||
return 'recurring_invoice';
|
return 'recurring_invoice';
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
@ -145,7 +141,7 @@ class HtmlEngine
|
|||||||
$data['$invoice.po_number'] = ['value' => $this->entity->po_number ?: ' ', 'label' => ctrans('texts.po_number')];
|
$data['$invoice.po_number'] = ['value' => $this->entity->po_number ?: ' ', 'label' => ctrans('texts.po_number')];
|
||||||
$data['$poNumber'] = &$data['$invoice.po_number'];
|
$data['$poNumber'] = &$data['$invoice.po_number'];
|
||||||
$data['$po_number'] = &$data['$invoice.po_number'];
|
$data['$po_number'] = &$data['$invoice.po_number'];
|
||||||
$data['$entity.datetime'] = ['value' => $this->formatDatetime($this->entity->created_at, $this->client->date_format(), $this->client->locale()), 'label' => ctrans('texts.date')];
|
$data['$entity.datetime'] = ['value' => $this->formatDatetime($this->entity->created_at, $this->client->date_format()), 'label' => ctrans('texts.date')];
|
||||||
$data['$invoice.datetime'] = &$data['$entity.datetime'];
|
$data['$invoice.datetime'] = &$data['$entity.datetime'];
|
||||||
$data['$quote.datetime'] = &$data['$entity.datetime'];
|
$data['$quote.datetime'] = &$data['$entity.datetime'];
|
||||||
$data['$credit.datetime'] = &$data['$entity.datetime'];
|
$data['$credit.datetime'] = &$data['$entity.datetime'];
|
||||||
|
@ -90,19 +90,14 @@ class VendorHtmlEngine
|
|||||||
switch ($this->invitation) {
|
switch ($this->invitation) {
|
||||||
case ($this->invitation instanceof InvoiceInvitation):
|
case ($this->invitation instanceof InvoiceInvitation):
|
||||||
return 'invoice';
|
return 'invoice';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof CreditInvitation):
|
case ($this->invitation instanceof CreditInvitation):
|
||||||
return 'credit';
|
return 'credit';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof QuoteInvitation):
|
case ($this->invitation instanceof QuoteInvitation):
|
||||||
return 'quote';
|
return 'quote';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof RecurringInvoiceInvitation):
|
case ($this->invitation instanceof RecurringInvoiceInvitation):
|
||||||
return 'recurring_invoice';
|
return 'recurring_invoice';
|
||||||
break;
|
|
||||||
case ($this->invitation instanceof PurchaseOrderInvitation):
|
case ($this->invitation instanceof PurchaseOrderInvitation):
|
||||||
return 'purchase_order';
|
return 'purchase_order';
|
||||||
break;
|
|
||||||
default:
|
default:
|
||||||
# code...
|
# code...
|
||||||
break;
|
break;
|
||||||
@ -839,14 +834,14 @@ html {
|
|||||||
';
|
';
|
||||||
|
|
||||||
|
|
||||||
return '
|
// return '
|
||||||
<table border="0" cellspacing="0" cellpadding="0" align="center">
|
// <table border="0" cellspacing="0" cellpadding="0" align="center">
|
||||||
<tr style="border: 0 !important; ">
|
// <tr style="border: 0 !important; ">
|
||||||
<td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
// <td class="new_button" style="padding: 12px 18px 12px 18px; border-radius:5px;" align="center">
|
||||||
<a href="'. $link .'" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">'. $text .'</a>
|
// <a href="'. $link .'" target="_blank" style="border: 0 !important;font-size: 18px; font-family: Helvetica, Arial, sans-serif; color: #ffffff; text-decoration: none; display: inline-block;">'. $text .'</a>
|
||||||
</td>
|
// </td>
|
||||||
</tr>
|
// </tr>
|
||||||
</table>
|
// </table>
|
||||||
';
|
// ';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,5 +8,7 @@ parameters:
|
|||||||
level: 4
|
level: 4
|
||||||
paths:
|
paths:
|
||||||
- app
|
- app
|
||||||
|
excludePaths:
|
||||||
|
- vendor
|
||||||
universalObjectCratesClasses:
|
universalObjectCratesClasses:
|
||||||
- App\DataMapper\Tax\RuleInterface
|
- App\DataMapper\Tax\RuleInterface
|
Loading…
x
Reference in New Issue
Block a user