Passed
Push — main ( 324b47...7af4bb )
by Rafael
43:55
created
htdocs/core/modules/modStockTransfer.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -396,7 +396,7 @@
 block discarded – undo
396 396
         /* END MODULEBUILDER EXPORT STOCKTRANSFER */
397 397
 
398 398
         // Imports profiles provided by this module
399
-        $r = 1;  // @phan-suppress-current-line PhanPluginRedundantAssignment
399
+        $r = 1; // @phan-suppress-current-line PhanPluginRedundantAssignment
400 400
         /* BEGIN MODULEBUILDER IMPORT STOCKTRANSFER */
401 401
         /*
402 402
          $langs->load("stocktransfer@stocktransfer");
Please login to merge, or discard this patch.
htdocs/core/modules/modFacture.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -689,7 +689,7 @@
 block discarded – undo
689 689
         $keyforaliasextra = 'extra';
690 690
         include DOL_DOCUMENT_ROOT . '/core/extrafieldsinexport.inc.php';
691 691
         $this->export_sql_start[$r] = 'SELECT DISTINCT ';
692
-        $this->export_sql_end[$r]  = ' FROM ' . MAIN_DB_PREFIX . 'societe as s';
692
+        $this->export_sql_end[$r] = ' FROM ' . MAIN_DB_PREFIX . 'societe as s';
693 693
         if (!empty($user) && !$user->hasRight('societe', 'client', 'voir')) {
694 694
             $this->export_sql_end[$r] .= ' LEFT JOIN ' . MAIN_DB_PREFIX . 'societe_commerciaux as sc ON sc.fk_soc = s.rowid';
695 695
         }
Please login to merge, or discard this patch.
htdocs/core/modules/modMrp.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
         $r = 1;
249 249
 
250 250
         $this->export_code[$r] = $this->rights_class . '_' . $r;
251
-        $this->export_label[$r] = 'MOs';  // Translation key (used only if key ExportDataset_xxx_z not found)
251
+        $this->export_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found)
252 252
         $this->export_icon[$r] = 'mrp';
253 253
         $this->export_fields_array[$r] = array(
254 254
             'm.rowid' => "Id",
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
         /* END MODULEBUILDER IMPORT MO */
331 331
         $r++;
332 332
         $this->import_code[$r] = $this->rights_class . '_' . $r;
333
-        $this->import_label[$r] = 'MOs';  // Translation key (used only if key ExportDataset_xxx_z not found)
333
+        $this->import_label[$r] = 'MOs'; // Translation key (used only if key ExportDataset_xxx_z not found)
334 334
         $this->import_icon[$r] = 'mrp';
335 335
         $this->import_entities_array[$r] = array(); // We define here only fields that use a different icon from the one defined in import_icon
336 336
         $this->import_tables_array[$r] = array('m' => MAIN_DB_PREFIX . 'mrp_mo', 'extra' => MAIN_DB_PREFIX . 'mrp_mo_extrafields');
Please login to merge, or discard this patch.
htdocs/core/modules/modHoliday.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
         // Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
96 96
         //                             1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
97 97
         $this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
98
-        $r = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
98
+        $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
99 99
 
100 100
         $this->const[$r][0] = "HOLIDAY_ADDON";
101 101
         $this->const[$r][1] = "chaine";
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 
159 159
         // Permissions
160 160
         $this->rights = array(); // Permission array used by this module
161
-        $r = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
161
+        $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
162 162
 
163 163
         $this->rights[$r][0] = 20001; // Permission id (must not be already used)
164 164
         $this->rights[$r][1] = 'Read leave requests (yours and your subordinates)'; // Permission label
Please login to merge, or discard this patch.
htdocs/core/modules/printing/printgcp.modules.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
                 'type' => 'info',
117 117
             );
118 118
         } else {
119
-            $keyforprovider = '';   // @FIXME
119
+            $keyforprovider = ''; // @FIXME
120 120
 
121 121
             $this->google_id = getDolGlobalString('OAUTH_GOOGLE_ID');
122 122
             $this->google_secret = getDolGlobalString('OAUTH_GOOGLE_SECRET');
@@ -258,7 +258,7 @@  discard block
 block discarded – undo
258 258
         global $conf;
259 259
         $ret = array();
260 260
 
261
-        $keyforprovider = '';   // @FIXME
261
+        $keyforprovider = ''; // @FIXME
262 262
 
263 263
         // Token storage
264 264
         $storage = new DoliStorage($this->db, $conf, $keyforprovider);
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
             'contentType' => $contenttype,
401 401
         );
402 402
 
403
-        $keyforprovider = '';   // @FIXME
403
+        $keyforprovider = ''; // @FIXME
404 404
 
405 405
         // Dolibarr Token storage
406 406
         $storage = new DoliStorage($this->db, $conf, $keyforprovider);
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
         $error = 0;
453 453
         $html = '';
454 454
 
455
-        $keyforprovider = '';   // @FIXME
455
+        $keyforprovider = ''; // @FIXME
456 456
 
457 457
         // Token storage
458 458
         $storage = new DoliStorage($this->db, $conf, $keyforprovider);
Please login to merge, or discard this patch.
htdocs/core/modules/modOpenSurvey.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -98,7 +98,7 @@
 block discarded – undo
98 98
 
99 99
         // Permissions
100 100
         $this->rights = array(); // Permission array used by this module
101
-        $r = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
101
+        $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
102 102
 
103 103
         // Add here list of permission defined by an id, a label, a boolean and two constant strings.
104 104
         // Example:
Please login to merge, or discard this patch.
htdocs/core/modules/import/import_xlsx.modules.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -517,7 +517,7 @@  discard block
 block discarded – undo
517 517
                                             //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. ';
518 518
                                             if ($classinstance->id != '') { // id may be 0, it is a found value
519 519
                                                 $newval = $classinstance->id;
520
-                                            } elseif (! $error) {
520
+                                            } elseif (!$error) {
521 521
                                                 if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) {
522 522
                                                     // @phan-suppress-next-line PhanPluginSuspiciousParamPosition
523 523
                                                     $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', $key, $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict']));
@@ -694,7 +694,7 @@  discard block
 block discarded – undo
694 694
                                     $classinstance = new $class($this->db);
695 695
                                     $res = call_user_func_array(array($classinstance, $method), array(&$arrayrecord, $arrayfield, $key));
696 696
                                     if (empty($classinstance->error) && empty($classinstance->errors)) {
697
-                                        $newval = $res;     // We get new value computed.
697
+                                        $newval = $res; // We get new value computed.
698 698
                                     } else {
699 699
                                         $this->errors[$error]['type'] = 'CLASSERROR';
700 700
                                         $this->errors[$error]['lib'] = implode(
@@ -795,11 +795,11 @@  discard block
 block discarded – undo
795 795
                         if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) {
796 796
                             if (!in_array("socialnetworks", $listfields)) {
797 797
                                 $listfields[] = "socialnetworks";
798
-                                $socialkey = array_search("socialnetworks", $listfields);   // Return position of 'socialnetworks' key in array. Example socialkey=19
798
+                                $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array. Example socialkey=19
799 799
                                 $listvalues[$socialkey] = '';
800 800
                             }
801 801
                             if (!empty($newval) && $arrayrecord[($key)]['type'] > 0) {
802
-                                $socialkey = array_search("socialnetworks", $listfields);   // Return position of 'socialnetworks' key in array. Example socialkey=19
802
+                                $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array. Example socialkey=19
803 803
                                 $socialnetwork = explode("_", $fieldname)[1];
804 804
                                 if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") {
805 805
                                     $json = new stdClass();
@@ -922,7 +922,7 @@  discard block
 block discarded – undo
922 922
 
923 923
                                 $data = array_combine($listfields, $listvalues);
924 924
 
925
-                                $where = array();   // filters to forge SQL request
925
+                                $where = array(); // filters to forge SQL request
926 926
                                 '@phan-var string[] $where';
927 927
                                 $filters = array(); // filters to forge output error message
928 928
                                 foreach ($updatekeys as $key) {
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
                                 // We db escape social network field because he isn't in field creation
1015 1015
                                 if (in_array("socialnetworks", $listfields)) {
1016 1016
                                     $socialkey = array_search("socialnetworks", $listfields);
1017
-                                    $tmpsql =  $listvalues[$socialkey];
1017
+                                    $tmpsql = $listvalues[$socialkey];
1018 1018
                                     $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'";
1019 1019
                                 }
1020 1020
 
@@ -1024,7 +1024,7 @@  discard block
 block discarded – undo
1024 1024
                                 $data = array_combine($listfields, $listvalues);
1025 1025
                                 $set = array();
1026 1026
                                 foreach ($data as $key => $val) {
1027
-                                    $set[] = $key . " = " . $val;   // $val was escaped/sanitized previously
1027
+                                    $set[] = $key . " = " . $val; // $val was escaped/sanitized previously
1028 1028
                                 }
1029 1029
                                 $sqlstart .= " SET " . implode(', ', $set) . ", import_key = '" . $this->db->escape($importid) . "'";
1030 1030
 
@@ -1063,7 +1063,7 @@  discard block
 block discarded – undo
1063 1063
                             // We db escape social network field because he isn't in field creation
1064 1064
                             if (in_array("socialnetworks", $listfields)) {
1065 1065
                                 $socialkey = array_search("socialnetworks", $listfields);
1066
-                                $tmpsql =  $listvalues[$socialkey];
1066
+                                $tmpsql = $listvalues[$socialkey];
1067 1067
                                 $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'";
1068 1068
                             }
1069 1069
 
Please login to merge, or discard this patch.
htdocs/core/modules/import/import_csv.modules.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
                                             //print 'We have made a '.$class.'->'.$method.' to get id from code '.$newval.'. ';
477 477
                                             if ($classinstance->id != '') { // id may be 0, it is a found value
478 478
                                                 $newval = $classinstance->id;
479
-                                            } elseif (! $error) {
479
+                                            } elseif (!$error) {
480 480
                                                 if (!empty($objimport->array_import_convertvalue[0][$val]['dict'])) {
481 481
                                                     $this->errors[$error]['lib'] = $langs->trans('ErrorFieldValueNotIn', num2Alpha($key - 1), $newval, 'code', $langs->transnoentitiesnoconv($objimport->array_import_convertvalue[0][$val]['dict']));
482 482
                                                 } elseif (!empty($objimport->array_import_convertvalue[0][$val]['element'])) {
@@ -649,7 +649,7 @@  discard block
 block discarded – undo
649 649
                                     $classinstance = new $class($this->db);
650 650
                                     $res = call_user_func_array(array($classinstance, $method), array(&$arrayrecord, $arrayfield, ($key - 1)));
651 651
                                     if (empty($classinstance->error) && empty($classinstance->errors)) {
652
-                                        $newval = $res;     // We get new value computed.
652
+                                        $newval = $res; // We get new value computed.
653 653
                                     } else {
654 654
                                         $this->errors[$error]['type'] = 'CLASSERROR';
655 655
                                         $this->errors[$error]['lib'] = implode(
@@ -747,12 +747,12 @@  discard block
 block discarded – undo
747 747
                         if (isModEnabled("socialnetworks") && strpos($fieldname, "socialnetworks") !== false) {
748 748
                             if (!in_array("socialnetworks", $listfields)) {
749 749
                                 $listfields[] = "socialnetworks";
750
-                                $socialkey = array_search("socialnetworks", $listfields);   // Return position of 'socialnetworks' key in array
750
+                                $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array
751 751
                                 $listvalues[$socialkey] = '';
752 752
                             }
753 753
                             //var_dump($newval); var_dump($arrayrecord[($key - 1)]['type']);
754 754
                             if (!empty($newval) && $arrayrecord[($key - 1)]['type'] > 0) {
755
-                                $socialkey = array_search("socialnetworks", $listfields);   // Return position of 'socialnetworks' key in array
755
+                                $socialkey = array_search("socialnetworks", $listfields); // Return position of 'socialnetworks' key in array
756 756
                                 //var_dump('sk='.$socialkey);   // socialkey=19
757 757
                                 $socialnetwork = explode("_", $fieldname)[1];
758 758
                                 if (empty($listvalues[$socialkey]) || $listvalues[$socialkey] == "null") {
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
                             if (empty($lastinsertid)) { // No insert done yet for a parent table
876 876
                                 $sqlSelect = "SELECT " . $fname . " FROM " . $tablename;
877 877
                                 $data = array_combine($listfields, $listvalues);
878
-                                $where = array();   // filters to forge SQL request
878
+                                $where = array(); // filters to forge SQL request
879 879
                                 $filters = array(); // filters to forge output error message
880 880
                                 foreach ($updatekeys as $key) {
881 881
                                     $col = $objimport->array_import_updatekeys[0][$key];
@@ -965,7 +965,7 @@  discard block
 block discarded – undo
965 965
                                 // We db escape social network field because he isn't in field creation
966 966
                                 if (in_array("socialnetworks", $listfields)) {
967 967
                                     $socialkey = array_search("socialnetworks", $listfields);
968
-                                    $tmpsql =  $listvalues[$socialkey];
968
+                                    $tmpsql = $listvalues[$socialkey];
969 969
                                     $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'";
970 970
                                 }
971 971
 
@@ -975,7 +975,7 @@  discard block
 block discarded – undo
975 975
                                 $data = array_combine($listfields, $listvalues);
976 976
                                 $set = array();
977 977
                                 foreach ($data as $key => $val) {
978
-                                    $set[] = $key . " = " . $val;   // $val was escaped/sanitized previously
978
+                                    $set[] = $key . " = " . $val; // $val was escaped/sanitized previously
979 979
                                 }
980 980
                                 $sqlstart .= " SET " . implode(', ', $set) . ", import_key = '" . $this->db->escape($importid) . "'";
981 981
 
@@ -1014,7 +1014,7 @@  discard block
 block discarded – undo
1014 1014
                             // We db escape social network field because he isn't in field creation
1015 1015
                             if (in_array("socialnetworks", $listfields)) {
1016 1016
                                 $socialkey = array_search("socialnetworks", $listfields);
1017
-                                $tmpsql =  $listvalues[$socialkey];
1017
+                                $tmpsql = $listvalues[$socialkey];
1018 1018
                                 $listvalues[$socialkey] = "'" . $this->db->escape($tmpsql) . "'";
1019 1019
                             }
1020 1020
 
Please login to merge, or discard this patch.
htdocs/core/modules/modProductBatch.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -121,7 +121,7 @@
 block discarded – undo
121 121
 
122 122
 
123 123
         // Exports
124
-        $r = 0;  // @phan-suppress-current-line PhanPluginRedundantAssignment
124
+        $r = 0; // @phan-suppress-current-line PhanPluginRedundantAssignment
125 125
     }
126 126
 
127 127
     /**
Please login to merge, or discard this patch.