Passed
Push — GENERAL_BUG_REVIEW_240911 ( 776d89...c757bd )
by Rafael
50:33
created
public/htdocs/admin/oauthlogintokens.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
                 $provider . '_NAME',
157 157
                 $provider . '_ID',
158 158
                 $provider . '_SECRET',
159
-                $provider . '_URLAUTHORIZE',  // For custom oauth links
159
+                $provider . '_URLAUTHORIZE', // For custom oauth links
160 160
                 $provider . '_SCOPE'          // For custom oauth links
161 161
             );
162 162
         }
@@ -168,7 +168,7 @@  discard block
 block discarded – undo
168 168
     if (!empty($listinsetup)) {
169 169
         foreach ($listinsetup as $key) {
170 170
             $supported = 0;
171
-            $keyforsupportedoauth2array = $key[0];                      // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME
171
+            $keyforsupportedoauth2array = $key[0]; // May be OAUTH_GOOGLE_NAME or OAUTH_GOOGLE_xxx_NAME
172 172
             $keyforsupportedoauth2array = preg_replace('/^OAUTH_/', '', $keyforsupportedoauth2array);
173 173
             $keyforsupportedoauth2array = preg_replace('/_NAME$/', '', $keyforsupportedoauth2array);
174 174
             if (preg_match('/^.*-/', $keyforsupportedoauth2array)) {
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
             if (getDolGlobalString($key[4])) {
189 189
                 $shortscope = getDolGlobalString($key[4]);
190 190
             }
191
-            $state = $shortscope;   // TODO USe a better state
191
+            $state = $shortscope; // TODO USe a better state
192 192
 
193 193
             // Define $urltorenew, $urltodelete, $urltocheckperms
194 194
             if ($keyforsupportedoauth2array == 'OAUTH_GITHUB_NAME') {
Please login to merge, or discard this patch.
public/htdocs/admin/import.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
 
44 44
 $action = GETPOST('action', 'aZ09');
45 45
 $value = GETPOST('value', 'alpha');
46
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
46
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
47 47
 
48 48
 
49 49
 /*
Please login to merge, or discard this patch.
public/htdocs/admin/workflow.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
      * @param array{enabled:int<0,1>} $var
232 232
      * @return bool
233 233
      */
234
-    static function ($var) {
234
+    static function($var) {
235 235
         return (bool) $var['enabled'];
236 236
     }
237 237
 );
Please login to merge, or discard this patch.
public/htdocs/admin/hrm.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -54,14 +54,14 @@
 block discarded – undo
54 54
 
55 55
 $value = GETPOST('value', 'alpha');
56 56
 $label = GETPOST('label', 'alpha');
57
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
57
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
58 58
 
59 59
 $scandir = GETPOST('scan_dir', 'alpha');
60 60
 $type = 'evaluation';
61 61
 
62 62
 $arrayofparameters = array(
63
-    'HRM_MAXRANK' => array('type' => 'integer','enabled' => 1, 'css' => ''),
64
-    'HRM_DEFAULT_SKILL_DESCRIPTION' => array('type' => 'varchar','enabled' => 1, 'css' => ''),
63
+    'HRM_MAXRANK' => array('type' => 'integer', 'enabled' => 1, 'css' => ''),
64
+    'HRM_DEFAULT_SKILL_DESCRIPTION' => array('type' => 'varchar', 'enabled' => 1, 'css' => ''),
65 65
 );
66 66
 
67 67
 $error = 0;
Please login to merge, or discard this patch.
public/htdocs/admin/mails_emailing.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -465,7 +465,7 @@
 block discarded – undo
465 465
         print '<tr class="oddeven smtp_oauth_service hideifdefault"><td>' . $langs->trans("MAIN_MAIL_SMTPS_OAUTH_SERVICE") . '</td><td>';
466 466
 
467 467
         // SuperAdministrator access only
468
-        if (!isModEnabled('multicompany')  || ($user->admin && !$user->entity)) {
468
+        if (!isModEnabled('multicompany') || ($user->admin && !$user->entity)) {
469 469
             // @phan-suppress-next-line PhanPluginSuspiciousParamOrder
470 470
             print $form->selectarray('MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING', $oauthservices, $conf->global->MAIN_MAIL_SMTPS_OAUTH_SERVICE_EMAILING);
471 471
         } else {
Please login to merge, or discard this patch.
public/htdocs/admin/usergroup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
 
45 45
 $action = GETPOST('action', 'aZ09');
46 46
 $value = GETPOST('value', 'alpha');
47
-$modulepart = GETPOST('modulepart', 'aZ09');    // Used by actions_setmoduleoptions.inc.php
47
+$modulepart = GETPOST('modulepart', 'aZ09'); // Used by actions_setmoduleoptions.inc.php
48 48
 
49 49
 $type = 'group';
50 50
 
Please login to merge, or discard this patch.
public/htdocs/admin/system/security.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 $todisabletext = '';
152 152
 $i = 0;
153 153
 foreach ($arrayoffunctionstodisable as $functiontodisable) {
154
-    if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
154
+    if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
155 155
         if ($i > 0) {
156 156
             $todisabletext .= ', ';
157 157
         }
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 $todisabletext = '';
167 167
 $i = 0;
168 168
 foreach ($arrayoffunctionstodisable2 as $functiontodisable) {
169
-    if (! in_array($functiontodisable, $arrayoffunctionsdisabled)) {
169
+    if (!in_array($functiontodisable, $arrayoffunctionsdisabled)) {
170 170
         if ($i > 0) {
171 171
             $todisabletext .= ', ';
172 172
         }
@@ -190,7 +190,7 @@  discard block
 block discarded – undo
190 190
 
191 191
 // JSON
192 192
 print '<strong>JSON</strong>: ';
193
-$loadedExtensions    = array_map('strtolower', get_loaded_extensions(false));
193
+$loadedExtensions = array_map('strtolower', get_loaded_extensions(false));
194 194
 $test = !in_array('json', $loadedExtensions);
195 195
 if ($test) {
196 196
     print img_picto('', 'error') . ' ' . $langs->trans("NotInstalled") . ' - ' . $langs->trans("VulnerableToRCEAttack");
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 print '<br>';
252 252
 print '<br>';
253 253
 
254
-print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: ';       // $conffile is defined into filefunc.inc.php
254
+print '<strong>' . $langs->trans("PermissionsOnFile", $conffile) . '</strong>: '; // $conffile is defined into filefunc.inc.php
255 255
 $perms = fileperms($dolibarr_main_document_root . '/' . $conffile);
256 256
 if ($perms) {
257 257
     if (($perms & 0x0004) || ($perms & 0x0002)) {
@@ -496,11 +496,11 @@  discard block
 block discarded – undo
496 496
 $umask = getDolGlobalString('MAIN_UMASK');
497 497
 
498 498
 print '<strong>' . $langs->trans("UMask") . '</strong>: ';
499
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
499
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
500 500
     print img_warning() . ' ';
501 501
 }
502 502
 print $umask;
503
-if (! in_array($umask, array('600', '660', '0600', '0660'))) {
503
+if (!in_array($umask, array('600', '660', '0600', '0660'))) {
504 504
     print ' &nbsp; <span class="opacitymedium">(' . $langs->trans("Recommended") . ': 0600 | 0660)</span>';
505 505
 }
506 506
 print '<br>';
Please login to merge, or discard this patch.
public/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.
public/htdocs/admin/system/dbtable.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -54,10 +54,10 @@  discard block
 block discarded – undo
54 54
         while ($i < $num) {
55 55
             $row = $db->fetch_row($resql);
56 56
             if ($row[0] == $field) {
57
-                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8";        // We must not sanitize the $row[1]
57
+                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8"; // We must not sanitize the $row[1]
58 58
                 $db->query($sql);
59 59
 
60
-                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci";   // We must not sanitize the $row[1]
60
+                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8_unicode_ci"; // We must not sanitize the $row[1]
61 61
                 $db->query($sql);
62 62
 
63 63
                 break;
@@ -75,10 +75,10 @@  discard block
 block discarded – undo
75 75
         while ($i < $num) {
76 76
             $row = $db->fetch_row($resql);
77 77
             if ($row[0] == $field) {
78
-                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4";     // We must not sanitize the $row[1]
78
+                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " CHARACTER SET utf8mb4"; // We must not sanitize the $row[1]
79 79
                 $db->query($sql);
80 80
 
81
-                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci";    // We must not sanitize the $row[1]
81
+                $sql = "ALTER TABLE " . $db->sanitize($table) . " MODIFY " . $db->sanitize($row[0]) . " " . $row[1] . " COLLATE utf8mb4_unicode_ci"; // We must not sanitize the $row[1]
82 82
                 $db->query($sql);
83 83
 
84 84
                 break;
Please login to merge, or discard this patch.