Browse Source

Fix reported by phpstan

Laurent Destailleur 6 years ago
parent
commit
fd5048ef73
4 changed files with 14 additions and 6 deletions
  1. 1 1
      htdocs/product/fournisseurs.php
  2. 2 2
      htdocs/product/price.php
  3. 3 3
      htdocs/societe/price.php
  4. 8 0
      phpstan.neon

+ 1 - 1
htdocs/product/fournisseurs.php

@@ -778,7 +778,7 @@ SCRIPT;
 				$num = count($product_fourn_list);
 				if (($num + ($offset * $limit)) < $nbtotalofrecords) $num++;
 
-				print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVEUR ['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1);
+				print_barre_liste($langs->trans('SupplierPrices'), $page, $_SERVER ['PHP_SELF'], $param, $sortfield, $sortorder, '', $num, $nbtotalofrecords, 'title_accountancy.png', 0, '', '', $limit, 1);
 
 				// Suppliers list title
 				print '<div class="div-table-responsive">';

+ 2 - 2
htdocs/product/price.php

@@ -1851,7 +1851,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
 
 		$backbutton='<a class="justalink" href="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '">' . $langs->trans("Back") . '</a>';
 
-		print_barre_liste($title, $page, $_SERVEUR['PHP_SELF'], $option, $sortfield, $sortorder, $backbutton, count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
+		print_barre_liste($title, $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, $backbutton, count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
 
 		if (count($prodcustprice->lines) > 0)
 		{
@@ -1973,7 +1973,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES))
 
 		$option = '&search_soc=' . $search_soc . '&id=' . $object->id;
 
-		print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
+		print_barre_liste($langs->trans('PriceByCustomer'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, 'title_accountancy.png');
 
 		print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
 		print '<input type="hidden" name="id" value="' . $object->id . '">';

+ 3 - 3
htdocs/societe/price.php

@@ -428,7 +428,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
 
 		$option = '&socid=' . GETPOST('socid', 'int') . '&prodid=' . GETPOST('prodid', 'int');
 
-		print_barre_liste($langs->trans('PriceByCustomerLog'), $page, $_SERVEUR ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords);
+		print_barre_liste($langs->trans('PriceByCustomerLog'), $page, $_SERVER ['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords);
 
 		if (count($prodcustprice->lines) > 0) {
 
@@ -519,7 +519,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
 
 	    print '<!-- view specific price for each product -->'."\n";
 
-	    print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVEUR['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, '');
+	    print_barre_liste($langs->trans('PriceForEachProduct'), $page, $_SERVER['PHP_SELF'], $option, $sortfield, $sortorder, '', count($prodcustprice->lines), $nbtotalofrecords, '');
 
         print '<form action="' . $_SERVER["PHP_SELF"] . '?id=' . $object->id . '" method="POST">';
         print '<input type="hidden" name="id" value="' . $object->id . '">';
@@ -603,7 +603,7 @@ if (! empty($conf->global->PRODUIT_CUSTOMER_PRICES)) {
         {
             $colspan=9;
             if ($user->rights->produit->supprimer || $user->rights->service->supprimer) $colspan+=1;
-            print '<tr ' . $bc[false] . '><td colspan="'.$colspan.'">' . $langs->trans('None') . '</td></tr>';
+            print '<tr class="oddeven"><td colspan="'.$colspan.'">' . $langs->trans('None') . '</td></tr>';
         }
 
         print "</table>";

+ 8 - 0
phpstan.neon

@@ -1,7 +1,9 @@
 parameters:
 	bootstrap: %currentWorkingDirectory%/build/phpstan/bootstrap.php
 	excludes_analyse: 
+		- %currentWorkingDirectory%/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php
 		- %currentWorkingDirectory%/htdocs/includes/*
+		- %currentWorkingDirectory%/htdocs/*/class/api_*
 	autoload_directories:
 		- %currentWorkingDirectory%/htdocs/accountancy/class
 		- %currentWorkingDirectory%/htdocs/adherents/class
@@ -16,10 +18,16 @@ parameters:
 		- %currentWorkingDirectory%/htdocs/comm/propal/class
 		- %currentWorkingDirectory%/htdocs/commande/class
 		- %currentWorkingDirectory%/htdocs/compta/bank/class
+		- %currentWorkingDirectory%/htdocs/compta/cashcontrol/class
+		- %currentWorkingDirectory%/htdocs/compta/deplacement/class
+		- %currentWorkingDirectory%/htdocs/compta/facture/class
+		- %currentWorkingDirectory%/htdocs/compta/localtax/class
+		- %currentWorkingDirectory%/htdocs/compta/paiement/class
 		- %currentWorkingDirectory%/htdocs/conf
 		- %currentWorkingDirectory%/htdocs/contact/class
 		- %currentWorkingDirectory%/htdocs/contrat/class
 		- %currentWorkingDirectory%/htdocs/core/class
+		- %currentWorkingDirectory%/htdocs/product/class
 		- %currentWorkingDirectory%/htdocs/societe/class
 		- %currentWorkingDirectory%/htdocs/user/class
 	autoload_files: []