Fix phpcs

This commit is contained in:
Laurent Destailleur 2021-07-06 19:02:03 +02:00
parent 70fa742939
commit 9fc2d9fc03
8 changed files with 15 additions and 17 deletions

View File

@ -783,7 +783,7 @@ function checkVal($out = '', $check = 'alphanohtml', $filter = null, $options =
try { try {
$dom = new DOMDocument; $dom = new DOMDocument;
$dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL); $dom->loadHTML($out, LIBXML_ERR_NONE|LIBXML_HTML_NOIMPLIED|LIBXML_HTML_NODEFDTD|LIBXML_NONET|LIBXML_NOWARNING|LIBXML_NOXMLDECL);
} catch(Exception $e) { } catch (Exception $e) {
//print $e->getMessage(); //print $e->getMessage();
return 'InvalidHTMLString'; return 'InvalidHTMLString';
} }

View File

@ -139,7 +139,7 @@ $dataseries = dol_sort_array($dataseries, 1, 'desc');
$KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain $KEEPNFIRST = 7; // Keep first $KEEPNFIRST one + 1 with the remain
$i = 0; $i = 0;
if (count($dataseries) > ($KEEPNFIRST + 1)) { if (count($dataseries) > ($KEEPNFIRST + 1)) {
foreach($dataseries as $key => $val) { foreach ($dataseries as $key => $val) {
if ($i < $KEEPNFIRST) { if ($i < $KEEPNFIRST) {
$i++; $i++;
continue; continue;

View File

@ -4984,4 +4984,3 @@ function migrate_export_import_profiles($mode = 'export')
print '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$langs->trans("NothingToDo")."</td></tr>\n"; print '<tr class="trforrunsql" style=""><td class="wordbreak" colspan="4">'.$langs->trans("NothingToDo")."</td></tr>\n";
} }
} }

View File

@ -707,7 +707,6 @@ if ($action == "updatereduction") {
// Reload data // Reload data
$invoice->fetch($placeid); $invoice->fetch($placeid);
} elseif ($action == 'update_reduction_global') { } elseif ($action == 'update_reduction_global') {
foreach ($invoice->lines as $line) { foreach ($invoice->lines as $line) {
$result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit); $result = $invoice->updateline($line->id, $line->desc, $line->subprice, $line->qty, $number, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);