Passed
Push — EXTRACT_CLASSES ( 0382f2...c25e41 )
by Rafael
52:18
created
public/htdocs/product/stock/class/mouvementstock.class.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $this->db = $db;
163 163
     }
164 164
 
165
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
165
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
166 166
     /**
167 167
      *  Add a movement of stock (in one direction only).
168 168
      *  This is the lowest level method to record a stock change. There is no control if warehouse is open or not.
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
      */
193 193
     public function _create($user, $fk_product, $entrepot_id, $qty, $type, $price = 0, $label = '', $inventorycode = '', $datem = '', $eatby = '', $sellby = '', $batch = '', $skip_batch = false, $id_product_batch = 0, $disablestockchangeforsubproduct = 0, $donotcleanemptylines = 0, $force_update_batch = false)
194 194
     {
195
-		// phpcs:enable
195
+        // phpcs:enable
196 196
         global $conf, $langs;
197 197
 
198 198
         require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/product.class.php';
@@ -963,7 +963,7 @@  discard block
 block discarded – undo
963 963
         return $result;
964 964
     }
965 965
 
966
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
966
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
967 967
     /**
968 968
      * Return Url link of origin object
969 969
      *
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
      */
974 974
     public function get_origin($origin_id, $origin_type)
975 975
     {
976
-		// phpcs:enable
976
+        // phpcs:enable
977 977
         $origin = '';
978 978
 
979 979
         switch ($origin_type) {
@@ -1189,7 +1189,7 @@  discard block
 block discarded – undo
1189 1189
         return $this->LibStatut($mode);
1190 1190
     }
1191 1191
 
1192
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1192
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1193 1193
     /**
1194 1194
      *  Return the label of the status
1195 1195
      *
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
      */
1199 1199
     public function LibStatut($mode = 0)
1200 1200
     {
1201
-		// phpcs:enable
1201
+        // phpcs:enable
1202 1202
         global $langs;
1203 1203
 
1204 1204
         if ($mode == 0 || $mode == 1) {
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -219,7 +219,7 @@  discard block
 block discarded – undo
219 219
                 'skip_batch'       => &$skip_batch,
220 220
                 'id_product_batch' => &$id_product_batch
221 221
             );
222
-            $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action);    // Note that $action and $object may have been modified by some hooks
222
+            $reshook = $hookmanager->executeHooks('stockMovementCreate', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
223 223
 
224 224
             if ($reshook < 0) {
225 225
                 if (!empty($hookmanager->resPrint)) {
@@ -708,8 +708,8 @@  discard block
 block discarded – undo
708 708
                 $this->price = $obj->price;
709 709
                 $this->fk_user_author = $obj->fk_user_author;
710 710
                 $this->label = $obj->label;
711
-                $this->fk_origin = $obj->origin_id;     // For backward compatibility
712
-                $this->origintype = $obj->origin_type;  // For backward compatibility
711
+                $this->fk_origin = $obj->origin_id; // For backward compatibility
712
+                $this->origintype = $obj->origin_type; // For backward compatibility
713 713
                 $this->origin_id = $obj->origin_id;
714 714
                 $this->origin_type = $obj->origin_type;
715 715
                 $this->inventorycode = $obj->inventorycode;
@@ -944,8 +944,8 @@  discard block
 block discarded – undo
944 944
             } else {                    // product_batch record not found
945 945
                 $pdluo->fk_product_stock = $vfk_product_stock;
946 946
                 $pdluo->qty = $qty;
947
-                $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby'];        // No more used. Now eatby date is store in table of lot, no more into prouct_batch table.
948
-                $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby'];     // No more used. Now sellby date is store in table of lot, no more into prouct_batch table.
947
+                $pdluo->eatby = empty($dluo['eatby']) ? '' : $dluo['eatby']; // No more used. Now eatby date is store in table of lot, no more into prouct_batch table.
948
+                $pdluo->sellby = empty($dluo['sellby']) ? '' : $dluo['sellby']; // No more used. Now sellby date is store in table of lot, no more into prouct_batch table.
949 949
                 $pdluo->batch = $vbatchnumber;
950 950
 
951 951
                 $result = $pdluo->create($user, 1);
Please login to merge, or discard this patch.
public/htdocs/product/stock/class/productstockentrepot.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -547,7 +547,7 @@  discard block
 block discarded – undo
547 547
         return $this->LibStatut($this->status, $mode);
548 548
     }
549 549
 
550
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
550
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
551 551
     /**
552 552
      *  Renvoi le libelle d'un status donne
553 553
      *
@@ -557,7 +557,7 @@  discard block
 block discarded – undo
557 557
      */
558 558
     public function LibStatut($status, $mode = 0)
559 559
     {
560
-		// phpcs:enable
560
+        // phpcs:enable
561 561
         global $langs;
562 562
 
563 563
         if ($mode == 0) {
Please login to merge, or discard this patch.
public/htdocs/product/stock/class/productlot.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1062,7 +1062,7 @@  discard block
 block discarded – undo
1062 1062
         return $this->LibStatut(0, $mode);
1063 1063
     }
1064 1064
 
1065
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1065
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1066 1066
     /**
1067 1067
      *  Return label of a given status
1068 1068
      *
@@ -1072,7 +1072,7 @@  discard block
 block discarded – undo
1072 1072
      */
1073 1073
     public function LibStatut($status, $mode = 0)
1074 1074
     {
1075
-		// phpcs:enable
1075
+        // phpcs:enable
1076 1076
         //global $langs;
1077 1077
 
1078 1078
         //$langs->load('stocks');
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1030,7 +1030,7 @@
 block discarded – undo
1030 1030
                 $obj = $this->db->fetch_object($result);
1031 1031
                 $this->stats_mo['customers_' . $role] = $obj->nb_customers ? $obj->nb_customers : 0;
1032 1032
                 $this->stats_mo['nb_' . $role] = $obj->nb ? $obj->nb : 0;
1033
-                $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0;     // qty may be a float due to the SUM()
1033
+                $this->stats_mo['qty_' . $role] = $obj->qty ? price2num($obj->qty, 'MS') : 0; // qty may be a float due to the SUM()
1034 1034
             } else {
1035 1035
                 $this->error = $this->db->error();
1036 1036
                 $error++;
Please login to merge, or discard this patch.
public/htdocs/product/stock/class/api_warehouses.class.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,10 +17,10 @@  discard block
 block discarded – undo
17 17
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 18
  */
19 19
 
20
- use Luracast\Restler\RestException;
20
+    use Luracast\Restler\RestException;
21 21
 
22
- require_once constant('DOL_DOCUMENT_ROOT') . '/product/stock/class/entrepot.class.php';
23
- require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/product.class.php';
22
+    require_once constant('DOL_DOCUMENT_ROOT') . '/product/stock/class/entrepot.class.php';
23
+    require_once constant('DOL_DOCUMENT_ROOT') . '/product/class/product.class.php';
24 24
 
25 25
 /**
26 26
  * API class for warehouses
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
     }
263 263
 
264 264
 
265
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
265
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
266 266
     /**
267 267
      * Clean sensible object datas
268 268
      *
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
      */
272 272
     protected function _cleanObjectDatas($object)
273 273
     {
274
-		// phpcs:enable
274
+        // phpcs:enable
275 275
         $object = parent::_cleanObjectDatas($object);
276 276
 
277 277
         // Remove the subscriptions because they are handled as a subresource.
Please login to merge, or discard this patch.
public/htdocs/product/stock/stocktransfer/stocktransfer_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 $confirm    = GETPOST('confirm', 'alpha');
53 53
 $cancel     = GETPOST('cancel', 'aZ09');
54 54
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
55
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
55
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
56 56
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
57 57
 $qty = GETPOSTINT('qty');
58 58
 $fk_product = GETPOSTINT('fk_product');
@@ -556,28 +556,28 @@  discard block
 block discarded – undo
556 556
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
557 557
     } elseif ($action == 'destock') { // Destock confirmation
558 558
         // Create an array for form
559
-        $formquestion = array(  'text' => '',
559
+        $formquestion = array('text' => '',
560 560
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40),
561 561
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
562 562
         );
563 563
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1);
564 564
     } elseif ($action == 'destockcancel') { // Destock confirmation cancel
565 565
         // Create an array for form
566
-        $formquestion = array(  'text' => '',
566
+        $formquestion = array('text' => '',
567 567
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40),
568 568
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
569 569
         );
570 570
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1);
571 571
     } elseif ($action == 'addstock') { // Addstock confirmation
572 572
         // Create an array for form
573
-        $formquestion = array(  'text' => '',
573
+        $formquestion = array('text' => '',
574 574
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40),
575 575
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
576 576
         );
577 577
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1);
578 578
     } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel
579 579
         // Create an array for form
580
-        $formquestion = array(  'text' => '',
580
+        $formquestion = array('text' => '',
581 581
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40),
582 582
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
583 583
         );
Please login to merge, or discard this patch.
public/htdocs/product/stock/stocktransfer/stocktransfer_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 
78 78
 // Default sort order (if not yet defined by previous GETPOST)
79 79
 if (!$sortfield) {
80
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
80
+    reset($object->fields); // Reset is required to avoid key() to return null.
81 81
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
82 82
 }
83 83
 if (!$sortorder) {
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
 // Output page
348 348
 // --------------------------------------------------------------------
349 349
 
350
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
350
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist mod-product page-stock-stocktransfer_stocktransfer_list'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
351 351
 
352 352
 // Example : Adding jquery code
353 353
 // print '<script type="text/javascript">
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 }
476 476
 
477 477
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
478
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
478
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
479 479
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
480 480
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
481 481
 
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
567 567
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
568 568
     }
569
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
569
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
570 570
     if (!empty($arrayfields['t.' . $key]['checked'])) {
571 571
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
572 572
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/product/stock/stocktransfer/class/stocktransfer.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
         return $this->LibStatut($this->status, $mode);
856 856
     }
857 857
 
858
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
858
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
859 859
     /**
860 860
      *  Return the status
861 861
      *
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
      */
866 866
     public function LibStatut($status, $mode = 0)
867 867
     {
868
-		// phpcs:enable
868
+        // phpcs:enable
869 869
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
870 870
             global $langs;
871 871
             //$langs->load("stocktransfer@stocktransfer");
Please login to merge, or discard this patch.
public/htdocs/product/stock/stocktransfer/class/stocktransferline.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -855,7 +855,7 @@  discard block
 block discarded – undo
855 855
         return $this->LibStatut($this->status, $mode);
856 856
     }
857 857
 
858
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
858
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
859 859
     /**
860 860
      *  Return the status
861 861
      *
@@ -865,7 +865,7 @@  discard block
 block discarded – undo
865 865
      */
866 866
     public function LibStatut($status, $mode = 0)
867 867
     {
868
-		// phpcs:enable
868
+        // phpcs:enable
869 869
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
870 870
             global $langs;
871 871
             //$langs->load("stocktransfer@stocktransfer");
Please login to merge, or discard this patch.
public/htdocs/product/stock/movement_list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 $object = new MouvementStock($db);
121 121
 $extrafields = new ExtraFields($db);
122 122
 $diroutputmassaction = $conf->stock->dir_output . '/temp/massgeneration/' . $user->id;
123
-$hookmanager->initHooks(array($contextpage));   // Note that conf->hooks_modules contains array of activated contexes
123
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
124 124
 
125 125
 $formfile = new FormFile($db);
126 126
 
@@ -1151,7 +1151,7 @@  discard block
 block discarded – undo
1151 1151
 }
1152 1152
 
1153 1153
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1154
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1154
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1155 1155
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1156 1156
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1157 1157
 
Please login to merge, or discard this patch.