Test Setup Failed
Push — dependabot/github_actions/mdew... ( 6edcb7 )
by
unknown
55:37
created
htdocs/product/class/productbatch.class.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -58,18 +58,18 @@  discard block
 block discarded – undo
58 58
     public $fk_product;
59 59
 
60 60
     // Properties of the lot
61
-    public $lotid;          // ID in table of the details of properties of each lots
61
+    public $lotid; // ID in table of the details of properties of each lots
62 62
 
63 63
     /**
64 64
      * @var int|string
65 65
      * @deprecated
66 66
      */
67
-    public $sellby = '';    // dlc
67
+    public $sellby = ''; // dlc
68 68
     /**
69 69
      * @var int|string
70 70
      * @deprecated
71 71
      */
72
-    public $eatby = '';     // dmd/dluo
72
+    public $eatby = ''; // dmd/dluo
73 73
 
74 74
 
75 75
     /**
@@ -103,15 +103,15 @@  discard block
 block discarded – undo
103 103
         // Insert request
104 104
         $sql = "INSERT INTO " . $this->db->prefix() . "product_batch (";
105 105
         $sql .= "fk_product_stock,";
106
-        $sql .= "sellby,";              // no more used
107
-        $sql .= "eatby,";               // no more used
106
+        $sql .= "sellby,"; // no more used
107
+        $sql .= "eatby,"; // no more used
108 108
         $sql .= "batch,";
109 109
         $sql .= "qty,";
110 110
         $sql .= "import_key";
111 111
         $sql .= ") VALUES (";
112 112
         $sql .= " " . (!isset($this->fk_product_stock) ? 'NULL' : $this->fk_product_stock) . ",";
113
-        $sql .= " " . (!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'" . $this->db->idate($this->sellby) . "'") . ",";       // no more used
114
-        $sql .= " " . (!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'" . $this->db->idate($this->eatby) . "'") . ",";          // no more used
113
+        $sql .= " " . (!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : "'" . $this->db->idate($this->sellby) . "'") . ","; // no more used
114
+        $sql .= " " . (!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : "'" . $this->db->idate($this->eatby) . "'") . ","; // no more used
115 115
         $sql .= " " . (!isset($this->batch) ? 'NULL' : "'" . $this->db->escape($this->batch) . "'") . ",";
116 116
         $sql .= " " . (!isset($this->qty) ? 'NULL' : $this->qty) . ",";
117 117
         $sql .= " " . (!isset($this->import_key) ? 'NULL' : "'" . $this->db->escape($this->import_key) . "'");
@@ -162,7 +162,7 @@  discard block
 block discarded – undo
162 162
         $sql .= " pl.eatby,";
163 163
         $sql .= " pl.sellby";
164 164
         $sql .= " FROM " . $this->db->prefix() . "product_batch as t";
165
-        $sql .= " INNER JOIN " . $this->db->prefix() . "product_stock w on t.fk_product_stock = w.rowid";   // llx_product_stock is a parent table so this link does NOT generate duplicate record
165
+        $sql .= " INNER JOIN " . $this->db->prefix() . "product_stock w on t.fk_product_stock = w.rowid"; // llx_product_stock is a parent table so this link does NOT generate duplicate record
166 166
         $sql .= " LEFT JOIN " . $this->db->prefix() . "product_lot as pl on pl.fk_product = w.fk_product and pl.batch = t.batch";
167 167
         $sql .= " WHERE t.rowid = " . ((int) $id);
168 168
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
                 $this->tms = $this->db->jdate($obj->tms);
432 432
                 $this->fk_product_stock = $obj->fk_product_stock;
433 433
                 $this->sellby = $this->db->jdate($obj->sellby); // deprecated. do no tuse this data.
434
-                $this->eatby = $this->db->jdate($obj->eatby);   // deprecated. do not use this data.
434
+                $this->eatby = $this->db->jdate($obj->eatby); // deprecated. do not use this data.
435 435
                 $this->batch = $obj->batch;
436 436
                 $this->qty = $obj->qty;
437 437
                 $this->import_key = $obj->import_key;
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 
530 530
                 if ($fk_product > 0) {
531 531
                     // Some properties of the lot
532
-                    $tmp->lotid = $obj->lotid;  // ID in table of the details of properties of each lots
532
+                    $tmp->lotid = $obj->lotid; // ID in table of the details of properties of each lots
533 533
                     $tmp->sellby = $dbs->jdate($obj->sellby ? $obj->sellby : $obj->oldsellby);
534 534
                     $tmp->eatby = $dbs->jdate($obj->eatby ? $obj->eatby : $obj->oldeatby);
535 535
                 }
Please login to merge, or discard this patch.
htdocs/product/class/api_products.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@
 block discarded – undo
231 231
         }
232 232
 
233 233
         //this query will return total products with the filters given
234
-        $sqlTotals =  str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
234
+        $sqlTotals = str_replace('SELECT t.rowid, t.ref, t.ref_ext', 'SELECT count(t.rowid) as total', $sql);
235 235
 
236 236
         $sql .= $this->db->order($sortfield, $sortorder);
237 237
         if ($limit) {
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/bookcal/calendar_card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,13 +39,13 @@
 block discarded – undo
39 39
 // Get parameters
40 40
 $id = GETPOSTINT('id');
41 41
 $ref = GETPOST('ref', 'alpha');
42
-$lineid   = GETPOSTINT('lineid');
42
+$lineid = GETPOSTINT('lineid');
43 43
 
44 44
 $action = GETPOST('action', 'aZ09');
45 45
 $confirm = GETPOST('confirm', 'alpha');
46 46
 $cancel = GETPOST('cancel', 'aZ09');
47 47
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
48
-$backtopage = GETPOST('backtopage', 'alpha');                   // if not set, a default page will be used
48
+$backtopage = GETPOST('backtopage', 'alpha'); // if not set, a default page will be used
49 49
 $backtopageforcancel = GETPOST('backtopageforcancel', 'alpha'); // if not set, $backtopage will be used
50 50
 $backtopagejsfields = GETPOST('backtopagejsfields', 'alpha');
51 51
 $dol_openinpopup = GETPOST('dol_openinpopup', 'aZ09');
Please login to merge, or discard this patch.
htdocs/bookcal/availabilities_list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 // Default sort order (if not yet defined by previous GETPOST)
81 81
 if (!$sortfield) {
82
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
82
+    reset($object->fields); // Reset is required to avoid key() to return null.
83 83
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
84 84
 }
85 85
 if (!$sortorder) {
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 // Output page
390 390
 // --------------------------------------------------------------------
391 391
 
392
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
392
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
393 393
 
394 394
 // Example : Adding jquery code
395 395
 // print '<script type="text/javascript">
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
614 614
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
615 615
     }
616
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
616
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
617 617
     if (!empty($arrayfields['t.' . $key]['checked'])) {
618 618
         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";
619 619
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
htdocs/bookcal/calendar_list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $object = new Calendar($db);
68 68
 $extrafields = new ExtraFields($db);
69 69
 $diroutputmassaction = $conf->bookcal->dir_output . '/temp/massgeneration/' . $user->id;
70
-$hookmanager->initHooks(array($contextpage));   // Note that conf->hooks_modules contains array of activated contexes
70
+$hookmanager->initHooks(array($contextpage)); // Note that conf->hooks_modules contains array of activated contexes
71 71
 
72 72
 // Fetch optionals attributes and labels
73 73
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -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) {
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 // Output page
386 386
 // --------------------------------------------------------------------
387 387
 
388
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
388
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
389 389
 
390 390
 $arrayofselected = is_array($toselect) ? $toselect : array();
391 391
 
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'rowid' && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
595 595
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
596 596
     }
597
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
597
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
598 598
     if (!empty($arrayfields['t.' . $key]['checked'])) {
599 599
         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";
600 600
         $totalarray['nbfield']++;
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.