From 6caa872280759954ac04127bee6ca85a1e3f0e01 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 25 Apr 2020 19:27:42 +0200 Subject: [PATCH] Enable more PHPCS rules --- dev/setup/codesniffer/ruleset.xml | 7 ------- htdocs/admin/external_rss.php | 12 ++++++------ htdocs/admin/modulehelp.php | 2 +- htdocs/compta/paiement/rapport.php | 6 ++++-- htdocs/core/class/smtps.class.php | 4 ++-- htdocs/mrp/mo_production.php | 2 +- htdocs/product/price.php | 2 +- htdocs/product/stock/movement_card.php | 12 +++++------- htdocs/product/stock/movement_list.php | 14 +++++--------- 9 files changed, 25 insertions(+), 36 deletions(-) diff --git a/dev/setup/codesniffer/ruleset.xml b/dev/setup/codesniffer/ruleset.xml index 6b92522d11e..9c564c24b0c 100644 --- a/dev/setup/codesniffer/ruleset.xml +++ b/dev/setup/codesniffer/ruleset.xml @@ -120,13 +120,6 @@ - - 0 - - - 0 - - diff --git a/htdocs/admin/external_rss.php b/htdocs/admin/external_rss.php index 51f6c1fd720..b3a66fa112e 100644 --- a/htdocs/admin/external_rss.php +++ b/htdocs/admin/external_rss.php @@ -271,19 +271,19 @@ if ($resql) print ''; print ''; print ''; - print ""."\n"; + print ''."\n"; print ''; print "".$langs->trans("Title").""; print "global->$keyrsstitle)."\">"; - print ""."\n"; + print ''."\n"; print ''; print "".$langs->trans("URL").""; print "global->$keyrssurl)."\">"; - print ""."\n"; + print ''."\n"; print ''; @@ -301,7 +301,7 @@ if ($resql) print ''; } print ""; - print ""."\n"; + print ''."\n"; // Logo if ($result > 0 && empty($rss->error)) @@ -315,7 +315,7 @@ if ($resql) if ($imageurl) print ''; else print $langs->trans("None"); print ''; - print ""."\n"; + print ''."\n"; } // Active @@ -323,7 +323,7 @@ if ($resql) print ''; print ''.$langs->trans('WidgetEnabled').''; print ''.yn($active).''; - print ""."\n"; + print ''."\n"; print ''."\n"; diff --git a/htdocs/admin/modulehelp.php b/htdocs/admin/modulehelp.php index 339b98be44a..d5bf12f1061 100644 --- a/htdocs/admin/modulehelp.php +++ b/htdocs/admin/modulehelp.php @@ -387,7 +387,7 @@ if ($mode == 'feature') $filedata = dol_buildpath($moduledir.'/sql/data.sql'); if (dol_is_file($filedata)) { - $text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql'.')'; + $text .= $langs->trans("Yes").' ('.$moduledir.'/sql/data.sql)'; } else $text .= $langs->trans("No"); diff --git a/htdocs/compta/paiement/rapport.php b/htdocs/compta/paiement/rapport.php index a0daa698f24..80013d3d865 100644 --- a/htdocs/compta/paiement/rapport.php +++ b/htdocs/compta/paiement/rapport.php @@ -154,9 +154,11 @@ if ($year) { $tfile = $dir.'/'.$year.'/'.$file; $relativepath = $year.'/'.$file; - print ''.''.img_pdf().' '.$file.''; + print ''; + print ''.img_pdf().' '.$file.''; print ''.dol_print_size(dol_filesize($tfile)).''; - print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; + print ''.dol_print_date(dol_filemtime($tfile), "dayhour").''; + print ''; } } closedir($handle); diff --git a/htdocs/core/class/smtps.class.php b/htdocs/core/class/smtps.class.php index f65b87944cf..f6bc31c2f53 100644 --- a/htdocs/core/class/smtps.class.php +++ b/htdocs/core/class/smtps.class.php @@ -1507,8 +1507,8 @@ class SMTPs } // always end related and end alternative after inline images - $content .= "--".$this->_getBoundary('related')."--"."\r\n"; - $content .= "\r\n"."--".$this->_getBoundary('alternative')."--"."\r\n"; + $content .= "--".$this->_getBoundary('related')."--\r\n"; + $content .= "\r\n--".$this->_getBoundary('alternative')."--\r\n"; $content .= "\r\n"; } else diff --git a/htdocs/mrp/mo_production.php b/htdocs/mrp/mo_production.php index 301cf4a76ae..599cb094aac 100644 --- a/htdocs/mrp/mo_production.php +++ b/htdocs/mrp/mo_production.php @@ -667,7 +667,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea print load_fiche_titre($langs->trans('Consumption'), '', '', 0, '', '', $newlinetext); print '
'; - print ''; + print '
'; print ''; print ''; diff --git a/htdocs/product/price.php b/htdocs/product/price.php index a4e9f46fa0a..f2109b94795 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -2048,7 +2048,7 @@ if (!empty($conf->global->PRODUIT_CUSTOMER_PRICES)) print ''; print ""; - print ""; + print ""; print '"; print ''; + .$objp->inventorycode + .''; } if (!empty($arrayfields['m.label']['checked'])) { diff --git a/htdocs/product/stock/movement_list.php b/htdocs/product/stock/movement_list.php index 944462ccdfc..535a0533249 100644 --- a/htdocs/product/stock/movement_list.php +++ b/htdocs/product/stock/movement_list.php @@ -1086,15 +1086,11 @@ if ($resql) if (!empty($arrayfields['m.inventorycode']['checked'])) { // Inventory code - print ''; + print ''; } if (!empty($arrayfields['m.label']['checked'])) {
'.$langs->trans("Product").'
".$langs->trans("Default").""."'.$langs->trans($object->price_base_type)."'; diff --git a/htdocs/product/stock/movement_card.php b/htdocs/product/stock/movement_card.php index 2714740eb45..03171fbeac5 100644 --- a/htdocs/product/stock/movement_card.php +++ b/htdocs/product/stock/movement_card.php @@ -1049,14 +1049,12 @@ if ($resql) { // Inventory code print '' - .$objp->inventorycode - .'' - .''.'' - .$objp->inventorycode - .'' - .''.$objp->inventorycode.'