Passed
Push — MODEL_LIB_240928 ( bd3167...74ce72 )
by Rafael
55:11
created
doctemplates/websites/website_template-noimg/containers/styles.css.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php // BEGIN PHP
2 2
 $websitekey = basename(__DIR__);
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; 
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; 
4 4
 } // Load env if not already loaded
5 5
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/website.lib.php';
6 6
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/website.inc.php';
7 7
 ob_start();
8
-if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */
8
+if (!headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */
9 9
 header('Cache-Control: max-age=3600, public, must-revalidate');
10 10
 header('Content-type: text/css');
11 11
 }
Please login to merge, or discard this patch.
doctemplates/websites/website_template-stellar/containers/styles.css.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php // BEGIN PHP
2 2
 $websitekey = basename(__DIR__);
3
-if (! defined('USEDOLIBARRSERVER') && ! defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; 
3
+if (!defined('USEDOLIBARRSERVER') && !defined('USEDOLIBARREDITOR')) { require_once __DIR__ . '/master.inc.php'; 
4 4
 } // Load env if not already loaded
5 5
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/website.lib.php';
6 6
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/website.inc.php';
7 7
 ob_start();
8
-if (! headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */
8
+if (!headers_sent()) { /* because file is included inline when in edit mode and we don't want warning */
9 9
 header('Cache-Control: max-age=3600, public, must-revalidate');
10 10
 header('Content-type: text/css');
11 11
 }
Please login to merge, or discard this patch.
public/htdocs/eventorganization/conferenceorbooth_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) {
@@ -540,7 +540,7 @@  discard block
 block discarded – undo
540 540
 }
541 541
 
542 542
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
543
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
543
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
544 544
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
545 545
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
546 546
 
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
     } 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'])) {
631 631
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
632 632
     }
633
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
633
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
634 634
     if (!empty($arrayfields['t.' . $key]['checked'])) {
635 635
         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";
636 636
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/adherents/subscription/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -323,7 +323,7 @@
 block discarded – undo
323 323
 }
324 324
 
325 325
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
326
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
326
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
327 327
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
328 328
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
329 329
 
Please login to merge, or discard this patch.
public/htdocs/opensurvey/lib/opensurvey.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -217,7 +217,7 @@
 block discarded – undo
217 217
 {
218 218
     $string = "";
219 219
     $chaine = "abcdefghijklmnopqrstuvwxyz123456789";
220
-    mt_srand((int)((float)microtime() * 1000000));
220
+    mt_srand((int) ((float) microtime() * 1000000));
221 221
     for ($i = 0; $i < $car; $i++) {
222 222
         $string .= $chaine[mt_rand() % strlen($chaine)];
223 223
     }
Please login to merge, or discard this patch.
public/htdocs/public/payment/paymentko.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@
 block discarded – undo
43 43
 // For MultiCompany module.
44 44
 // Do not use GETPOST here, function is not defined and this test must be done before including main.inc.php
45 45
 // Because 2 entities can have the same ref.
46
-$entity = (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1));
46
+$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1));
47 47
 if (is_numeric($entity)) {
48 48
     define("DOLENTITY", $entity);
49 49
 }
Please login to merge, or discard this patch.
public/htdocs/public/eventorganization/subscriptionok.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 // For MultiCompany module.
46 46
 // Do not use GETPOST here, function is not defined and define must be done before including main.inc.php
47 47
 // Because 2 entities can have the same ref.
48
-$entity = (!empty($_GET['e']) ? (int)$_GET['e'] : (!empty($_POST['e']) ? (int)$_POST['e'] : 1));
48
+$entity = (!empty($_GET['e']) ? (int) $_GET['e'] : (!empty($_POST['e']) ? (int) $_POST['e'] : 1));
49 49
 if (is_numeric($entity)) {
50 50
     define("DOLENTITY", $entity);
51 51
 }
Please login to merge, or discard this patch.
public/htdocs/install/fileconf.php 1 patch
Indentation   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -505,14 +505,14 @@  discard block
 block discarded – undo
505 505
                            id="db_pass" autocomplete="off"
506 506
                            name="db_pass"
507 507
                            value="<?php
508
-                           // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
509
-                           // @phan-suppress-next-line PhanParamSuspiciousOrder
510
-                           $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
511
-                           if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
512
-                               $autofill = '';
513
-                           }
514
-                           print dol_escape_htmltag($autofill);
515
-                           ?>"
508
+                            // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
509
+                            // @phan-suppress-next-line PhanParamSuspiciousOrder
510
+                            $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
511
+                            if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
512
+                                $autofill = '';
513
+                            }
514
+                            print dol_escape_htmltag($autofill);
515
+                            ?>"
516 516
                         <?php if (($force_install_noedit == 2 || $force_install_noedit == 3) && $force_install_databasepass !== null) {
517 517
                             print ' disabled';
518 518
                         } ?>
@@ -591,23 +591,23 @@  discard block
 block discarded – undo
591 591
                            name="db_pass_root"
592 592
                            class="needroot text-security"
593 593
                            value="<?php
594
-                           // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
595
-                           // @phan-suppress-next-line PhanParamSuspiciousOrder
596
-                           $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
597
-                           if (!empty($dolibarr_main_prod)) {
598
-                               $autofill = '';
599
-                           }
600
-                           // Do not autofill password if instance is a production instance
601
-                           if (
602
-                               !empty($_SERVER["SERVER_NAME"]) && !in_array(
603
-                                   $_SERVER["SERVER_NAME"],
604
-                                   array('127.0.0.1', 'localhost', 'localhostgit')
605
-                               )
606
-                           ) {
607
-                               $autofill = '';
608
-                           }    // Do not autofill password for remote access
609
-                           print dol_escape_htmltag($autofill);
610
-                           ?>"
594
+                            // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
595
+                            // @phan-suppress-next-line PhanParamSuspiciousOrder
596
+                            $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
597
+                            if (!empty($dolibarr_main_prod)) {
598
+                                $autofill = '';
599
+                            }
600
+                            // Do not autofill password if instance is a production instance
601
+                            if (
602
+                                !empty($_SERVER["SERVER_NAME"]) && !in_array(
603
+                                    $_SERVER["SERVER_NAME"],
604
+                                    array('127.0.0.1', 'localhost', 'localhostgit')
605
+                                )
606
+                            ) {
607
+                                $autofill = '';
608
+                            }    // Do not autofill password for remote access
609
+                            print dol_escape_htmltag($autofill);
610
+                            ?>"
611 611
                         <?php if ($force_install_noedit > 0 && !empty($force_install_databaserootpass)) {
612 612
                             print ' disabled'; /* May be removed by javascript*/
613 613
                         } ?>
Please login to merge, or discard this patch.
public/htdocs/admin/system/modules.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 $arrayofmassactions = array();
209 209
 
210 210
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
211
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
211
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
212 212
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
213 213
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
214 214
 
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
     usort(
296 296
         $moduleList,
297 297
         /** @return int */
298
-        function (stdClass $a, stdClass $b) {
298
+        function(stdClass $a, stdClass $b) {
299 299
             return strcasecmp($a->name, $b->name);
300 300
         }
301 301
     );
@@ -303,7 +303,7 @@  discard block
 block discarded – undo
303 303
     usort(
304 304
         $moduleList,
305 305
         /** @return int */
306
-        static function (stdClass $a, stdClass $b) {
306
+        static function(stdClass $a, stdClass $b) {
307 307
             return strcasecmp($b->name, $a->name);
308 308
         }
309 309
     );
@@ -311,7 +311,7 @@  discard block
 block discarded – undo
311 311
     usort(
312 312
         $moduleList,
313 313
         /** @return int */
314
-        static function (stdClass $a, stdClass $b) {
314
+        static function(stdClass $a, stdClass $b) {
315 315
             return strcasecmp($a->version, $b->version);
316 316
         }
317 317
     );
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
     usort(
320 320
         $moduleList,
321 321
         /** @return int */
322
-        static function (stdClass $a, stdClass $b) {
322
+        static function(stdClass $a, stdClass $b) {
323 323
             return strcasecmp($b->version, $a->version);
324 324
         }
325 325
     );
@@ -418,11 +418,11 @@  discard block
 block discarded – undo
418 418
  */
419 419
 function compareIdAsc(stdClass $a, stdClass $b)
420 420
 {
421
-    if ((int)$a->id == (int)$b->id) {
421
+    if ((int) $a->id == (int) $b->id) {
422 422
         return 0;
423 423
     }
424 424
 
425
-    return ((int)$a->id < (int)$b->id) ? -1 : 1;
425
+    return ((int) $a->id < (int) $b->id) ? -1 : 1;
426 426
 }
427 427
 
428 428
 /**
@@ -434,11 +434,11 @@  discard block
 block discarded – undo
434 434
  */
435 435
 function compareIdDesc(stdClass $a, stdClass $b)
436 436
 {
437
-    if ((int)$a->id == (int)$b->id) {
437
+    if ((int) $a->id == (int) $b->id) {
438 438
         return 0;
439 439
     }
440 440
 
441
-    return ((int)$b->id < (int)$a->id) ? -1 : 1;
441
+    return ((int) $b->id < (int) $a->id) ? -1 : 1;
442 442
 }
443 443
 
444 444
 /**
Please login to merge, or discard this patch.