Passed
Push — main ( 324b47...7af4bb )
by Rafael
43:55
created
htdocs/product/stock/stocktransfer/stocktransfer_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 
76 76
 // Default sort order (if not yet defined by previous GETPOST)
77 77
 if (!$sortfield) {
78
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
78
+    reset($object->fields); // Reset is required to avoid key() to return null.
79 79
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
80 80
 }
81 81
 if (!$sortorder) {
@@ -345,7 +345,7 @@  discard block
 block discarded – undo
345 345
 // Output page
346 346
 // --------------------------------------------------------------------
347 347
 
348
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
348
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
349 349
 
350 350
 // Example : Adding jquery code
351 351
 // print '<script type="text/javascript">
@@ -563,7 +563,7 @@  discard block
 block discarded – undo
563 563
     } 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'])) {
564 564
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
565 565
     }
566
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
566
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
567 567
     if (!empty($arrayfields['t.' . $key]['checked'])) {
568 568
         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";
569 569
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/product/stock/stocktransfer/stocktransfer_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
 $confirm    = GETPOST('confirm', 'alpha');
52 52
 $cancel     = GETPOST('cancel', 'aZ09');
53 53
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
54
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
54
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
55 55
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
56 56
 $qty = GETPOSTINT('qty');
57 57
 $fk_product = GETPOSTINT('fk_product');
@@ -538,28 +538,28 @@  discard block
 block discarded – undo
538 538
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('ToClone'), $langs->trans('ConfirmCloneAsk', $object->ref), 'confirm_clone', $formquestion, 'yes', 1);
539 539
     } elseif ($action == 'destock') { // Destock confirmation
540 540
         // Create an array for form
541
-        $formquestion = array(  'text' => '',
541
+        $formquestion = array('text' => '',
542 542
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestock', $object->ref), 'size' => 40),
543 543
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
544 544
         );
545 545
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProduct'), '', 'confirm_destock', $formquestion, 'yes', 1);
546 546
     } elseif ($action == 'destockcancel') { // Destock confirmation cancel
547 547
         // Create an array for form
548
-        $formquestion = array(  'text' => '',
548
+        $formquestion = array('text' => '',
549 549
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label"), 'value' => $langs->trans('ConfirmDestockCancel', $object->ref), 'size' => 40),
550 550
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
551 551
         );
552 552
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('DestockAllProductCancel'), '', 'confirm_destockcancel', $formquestion, 'yes', 1);
553 553
     } elseif ($action == 'addstock') { // Addstock confirmation
554 554
         // Create an array for form
555
-        $formquestion = array(  'text' => '',
555
+        $formquestion = array('text' => '',
556 556
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStock', $object->ref), 'size' => 40),
557 557
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
558 558
         );
559 559
         $formconfirm = $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id, $langs->trans('AddStockAllProduct'), '', 'confirm_addstock', $formquestion, 'yes', 1);
560 560
     } elseif ($action == 'addstockcancel') { // Addstock confirmation cancel
561 561
         // Create an array for form
562
-        $formquestion = array(  'text' => '',
562
+        $formquestion = array('text' => '',
563 563
             0 => array('type' => 'text', 'name' => 'label', 'label' => $langs->trans("Label") . '&nbsp;:', 'value' => $langs->trans('ConfirmAddStockCancel', $object->ref), 'size' => 40),
564 564
             1 => array('type' => 'text', 'name' => 'inventorycode', 'label' => $langs->trans("InventoryCode"), 'value' => dol_print_date(dol_now(), '%y%m%d%H%M%S'), 'size' => 25)
565 565
         );
Please login to merge, or discard this patch.
htdocs/product/stock/class/productlot.class.php 1 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.
htdocs/product/stock/class/entrepot.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -166,7 +166,7 @@
 block discarded – undo
166 166
     /**
167 167
      * Warehouse open and any operations are allowed, but warehouse is not included into calculation of stock.
168 168
      */
169
-    const STATUS_OPENEXT_ALL = 3;   // TODO Implement this
169
+    const STATUS_OPENEXT_ALL = 3; // TODO Implement this
170 170
 
171 171
 
172 172
 
Please login to merge, or discard this patch.
htdocs/product/stock/class/mouvementstock.class.php 1 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.
htdocs/zapier/class/api_zapier.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -324,7 +324,7 @@
 block discarded – undo
324 324
 		$hook = array();
325 325
 		foreach ($fields as $field) {
326 326
 			if (!isset($data[$field])) {
327
-				throw new RestException(400, $field." field missing");
327
+				throw new RestException(400, $field . " field missing");
328 328
 			}
329 329
 			$hook[$field] = $data[$field];
330 330
 		}
Please login to merge, or discard this patch.
htdocs/printing/admin/printing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -202,7 +202,7 @@
 block discarded – undo
202 202
             $i++;
203 203
 
204 204
             if ($key['varname'] == 'PRINTGCP_TOKEN_ACCESS') {
205
-                $keyforprovider = '';   // @BUG This must be set
205
+                $keyforprovider = ''; // @BUG This must be set
206 206
 
207 207
                 // Token
208 208
                 print '<tr class="oddeven">';
Please login to merge, or discard this patch.
htdocs/contact/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
 // Add fields from hooks - ListFrom
509 509
 $parameters = array();
510
-$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
510
+$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
511 511
 $sql .= $hookmanager->resPrint;
512 512
 $sql .= ' WHERE p.entity IN (' . getEntity('contact') . ')';
513 513
 if (!empty($userid)) {    // propre au commercial
@@ -938,7 +938,7 @@  discard block
 block discarded – undo
938 938
 if (isModEnabled('category') && $user->hasRight('societe', 'creer')) {
939 939
     $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"') . $langs->trans("AffectTag");
940 940
 }
941
-if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
941
+if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
942 942
     $arrayofmassactions = array();
943 943
 }
944 944
 if ($contextpage != 'poslist') {
Please login to merge, or discard this patch.
htdocs/contact/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 }
95 95
 $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
96 96
 
97
-$permissiontoadd = $user->hasRight('societe', 'contact', 'creer');  // Used by the include of actions_dellink.inc.php
97
+$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php
98 98
 
99 99
 
100 100
 /*
Please login to merge, or discard this patch.