Passed
Push — main ( f1540e...02d90d )
by Rafael
45:15
created
htdocs/admin/tools/update.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -23,8 +23,8 @@
 block discarded – undo
23 23
  *      \brief      Page to make a Dolibarr online upgrade
24 24
  */
25 25
 
26
-if (! defined('CSRFCHECK_WITH_TOKEN')) {
27
-    define('CSRFCHECK_WITH_TOKEN', '1');        // Force use of CSRF protection with tokens even for GET
26
+if (!defined('CSRFCHECK_WITH_TOKEN')) {
27
+    define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
28 28
 }
29 29
 
30 30
 // Load Dolibarr environment
Please login to merge, or discard this patch.
htdocs/admin/dict.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 $tabcond[27] = isModEnabled("societe");
521 521
 $tabcond[28] = isModEnabled('holiday');
522 522
 $tabcond[29] = isModEnabled('project');
523
-$tabcond[30] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member'));    // stickers format dictionary
523
+$tabcond[30] = (isModEnabled('label') || isModEnabled('barcode') || isModEnabled('member')); // stickers format dictionary
524 524
 $tabcond[31] = ((isModEnabled('invoice') || isModEnabled('supplier_invoice')) && $mysoc->country_code == 'GR');
525 525
 $tabcond[32] = (isModEnabled('holiday') || isModEnabled('hrm'));
526 526
 $tabcond[33] = isModEnabled('hrm');
@@ -2750,7 +2750,7 @@  discard block
 block discarded – undo
2750 2750
             print '</td>';
2751 2751
         } elseif ($value == 'type_duration') {
2752 2752
             print '<td>';
2753
-            print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i','h'));
2753
+            print $form->selectTypeDuration('', (empty($obj->type_duration) ? '' : $obj->type_duration), array('i', 'h'));
2754 2754
             print '</td>';
2755 2755
         } else {
2756 2756
             $fieldValue = isset($obj->{$value}) ? $obj->{$value} : '';
Please login to merge, or discard this patch.
htdocs/admin/dolistore/class/PSWebServiceLibrary.class.php 1 patch
Spacing   +5 added lines, -6 removed lines patch added patch discarded remove patch
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
 
402 402
         $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'GET'));
403 403
 
404
-        $this->checkStatusCode($request);// check the response validity
404
+        $this->checkStatusCode($request); // check the response validity
405 405
 
406 406
         return $this->parseXML($request['response']);
407 407
     }
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
             throw new PrestaShopWebserviceException('Bad parameters given');
441 441
         }
442 442
         $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'HEAD', CURLOPT_NOBODY => true));
443
-        $this->checkStatusCode($request);// check the response validity
443
+        $this->checkStatusCode($request); // check the response validity
444 444
         return $request['header'];
445 445
     }
446 446
 
@@ -463,8 +463,7 @@  discard block
 block discarded – undo
463 463
         if (isset($options['url'])) {
464 464
             $url = $options['url'];
465 465
         } elseif ((isset($options['resource'], $options['id']) || isset($options['url'])) && $options['putXml']) {
466
-            $url = (isset($options['url']) ? $options['url'] :
467
-                $this->url . '/api/' . $options['resource'] . '/' . $options['id']);
466
+            $url = (isset($options['url']) ? $options['url'] : $this->url . '/api/' . $options['resource'] . '/' . $options['id']);
468 467
             $xml = $options['putXml'];
469 468
             if (isset($options['id_shop'])) {
470 469
                 $url .= '&id_shop=' . $options['id_shop'];
@@ -477,7 +476,7 @@  discard block
 block discarded – undo
477 476
         }
478 477
 
479 478
         $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'PUT', CURLOPT_POSTFIELDS => $xml));
480
-        $this->checkStatusCode($request);// check the response validity
479
+        $this->checkStatusCode($request); // check the response validity
481 480
         return $this->parseXML($request['response']);
482 481
     }
483 482
 
@@ -528,7 +527,7 @@  discard block
 block discarded – undo
528 527
         }
529 528
 
530 529
         $request = $this->executeRequest($url, array(CURLOPT_CUSTOMREQUEST => 'DELETE'));
531
-        $this->checkStatusCode($request);// check the response validity
530
+        $this->checkStatusCode($request); // check the response validity
532 531
         return true;
533 532
     }
534 533
 }
Please login to merge, or discard this patch.
htdocs/admin/system/security.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 $todisabletext = '';
141 141
 $i = 0;
142 142
 foreach ($arrayoffunctionstodisable as $functiontodisable) {
143
-    if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
143
+    if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
144 144
         if ($i > 0) {
145 145
             $todisabletext .= ', ';
146 146
         }
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
 $todisabletext = '';
156 156
 $i = 0;
157 157
 foreach ($arrayoffunctionstodisable2 as $functiontodisable) {
158
-    if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
158
+    if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
159 159
         if ($i > 0) {
160 160
             $todisabletext .= ', ';
161 161
         }
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 print '<br>';
231 231
 print '<br>';
232 232
 
233
-print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: ';       // $conffile is defined into filefunc.inc.php
233
+print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: '; // $conffile is defined into filefunc.inc.php
234 234
 $perms = fileperms($dolibarr_main_document_root . '/' . $conffile);
235 235
 if ($perms) {
236 236
     if (($perms & 0x0004) || ($perms & 0x0002)) {
@@ -476,11 +476,11 @@  discard block
 block discarded – undo
476 476
 $umask = getDolGlobalString('MAIN_UMASK');
477 477
 
478 478
 print '<strong>' . $langs->trans("UMask") . '</strong>: ';
479
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
479
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
480 480
     print img_warning() . ' ';
481 481
 }
482 482
 print $umask;
483
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
483
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
484 484
     print ' &nbsp; <span class="opacitymedium">(' . $langs->trans("Recommended") . ': 0600 | 0660)</span>';
485 485
 }
486 486
 print '<br>';
Please login to merge, or discard this patch.
htdocs/admin/system/filecheck.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -172,7 +172,7 @@
 block discarded – undo
172 172
     }
173 173
 }
174 174
 if (GETPOST('target') == 'remote') {
175
-    $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0);    // Accept http or https links on external remote server only. Same is used into api_setup.class.php.
175
+    $xmlarray = getURLContent($xmlremote, 'GET', '', 1, array(), array('http', 'https'), 0); // Accept http or https links on external remote server only. Same is used into api_setup.class.php.
176 176
 
177 177
     // Return array('content'=>response,'curl_error_no'=>errno,'curl_error_msg'=>errmsg...)
178 178
     if (!$xmlarray['curl_error_no'] && $xmlarray['http_code'] != '400' && $xmlarray['http_code'] != '404') {
Please login to merge, or discard this patch.
htdocs/admin/system/modules.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -313,7 +313,7 @@  discard block
 block discarded – undo
313 313
     usort(
314 314
         $moduleList,
315 315
         /** @return int */
316
-        function (stdClass $a, stdClass $b) {
316
+        function(stdClass $a, stdClass $b) {
317 317
             return strcasecmp($a->name, $b->name);
318 318
         }
319 319
     );
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     usort(
322 322
         $moduleList,
323 323
         /** @return int */
324
-        static function (stdClass $a, stdClass $b) {
324
+        static function(stdClass $a, stdClass $b) {
325 325
             return strcasecmp($b->name, $a->name);
326 326
         }
327 327
     );
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
     usort(
330 330
         $moduleList,
331 331
         /** @return int */
332
-        static function (stdClass $a, stdClass $b) {
332
+        static function(stdClass $a, stdClass $b) {
333 333
             return strcasecmp($a->version, $b->version);
334 334
         }
335 335
     );
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
     usort(
338 338
         $moduleList,
339 339
         /** @return int */
340
-        static function (stdClass $a, stdClass $b) {
340
+        static function(stdClass $a, stdClass $b) {
341 341
             return strcasecmp($b->version, $a->version);
342 342
         }
343 343
     );
Please login to merge, or discard this patch.
htdocs/admin/system/database-tables.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -25,8 +25,8 @@  discard block
 block discarded – undo
25 25
  *  \brief      Page with information on database tables. Add also some maintenance action to convert tables.
26 26
  */
27 27
 
28
-if (! defined('CSRFCHECK_WITH_TOKEN')) {
29
-    define('CSRFCHECK_WITH_TOKEN', '1');        // Force use of CSRF protection with tokens even for GET
28
+if (!defined('CSRFCHECK_WITH_TOKEN')) {
29
+    define('CSRFCHECK_WITH_TOKEN', '1'); // Force use of CSRF protection with tokens even for GET
30 30
 }
31 31
 
32 32
 // Load Dolibarr environment
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
             //print $shortsqlfilename.' ';
116 116
             $shortsqlfilename = preg_replace('/\-[a-z]+\./', '.', $value['name']);
117 117
             $arrayoffiles[$value['name']] = $shortsqlfilename;
118
-            if ($value['name'] == $shortsqlfilename && ! preg_match('/\.key\.sql$/', $value['name'])) {
118
+            if ($value['name'] == $shortsqlfilename && !preg_match('/\.key\.sql$/', $value['name'])) {
119 119
                 // This is a sql file automatically created
120 120
                 $arrayoftablesautocreated[$value['name']] = $shortsqlfilename;
121 121
             }
Please login to merge, or discard this patch.
htdocs/admin/mailing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
     $checkread_key = GETPOST('MAILING_EMAIL_UNSUBSCRIBE_KEY', 'alpha');
55 55
     $contactbulkdefault = GETPOSTINT('MAILING_CONTACT_DEFAULT_BULK_STATUS');
56 56
     if (GETPOST('MAILING_DELAY', 'alpha') != '') {
57
-        $mailingdelay = price2num(GETPOST('MAILING_DELAY', 'alpha'), 3);        // Not less than 1 millisecond.
57
+        $mailingdelay = price2num(GETPOST('MAILING_DELAY', 'alpha'), 3); // Not less than 1 millisecond.
58 58
     } else {
59 59
         $mailingdelay = '';
60 60
     }
Please login to merge, or discard this patch.
htdocs/admin/company.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
 print '<tr class="oddeven"><td><label for="logo">' . $form->textwithpicto($langs->trans("Logo"), $tooltiplogo) . '</label></td><td>';
532 532
 print '<div class="centpercent nobordernopadding valignmiddle "><div class="inline-block marginrightonly">';
533 533
 if ($maxmin > 0) {
534
-    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
534
+    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
535 535
 }
536 536
 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo" id="logo" accept="image/*">';
537 537
 print '</div>';
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 $maxfilesizearray = getMaxFileSizeArray();
574 574
 $maxmin = $maxfilesizearray['maxmin'];
575 575
 if ($maxmin > 0) {
576
-    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
576
+    print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
577 577
 }
578 578
 print '<input type="file" class="flat minwidth100 maxwidthinputfileonsmartphone" name="logo_squarred" id="logo_squarred" accept="image/*">';
579 579
 print '</div>';
Please login to merge, or discard this patch.