Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
Dolibarr/Code/Core/Classes/FormAdmin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -129,7 +129,7 @@
 block discarded – undo
129 129
             $out .= '>' . $langs->trans("AutoDetectLang") . '</option>';
130 130
         }
131 131
 
132
-        asort($langs_available);    // array('XX' => 'Language (Country)', ...)
132
+        asort($langs_available); // array('XX' => 'Language (Country)', ...)
133 133
 
134 134
         foreach ($langs_available as $key => $value) {
135 135
             $valuetoshow = $value;
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormTicket.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -86,17 +86,17 @@  discard block
 block discarded – undo
86 86
 
87 87
     public $backtopage;
88 88
 
89
-    public $ispublic;  // to show information or not into public form
89
+    public $ispublic; // to show information or not into public form
90 90
 
91 91
     public $withtitletopic;
92 92
     public $withtopicreadonly;
93 93
     public $withreadid;
94 94
 
95
-    public $withcompany;  // to show company drop-down list
95
+    public $withcompany; // to show company drop-down list
96 96
     public $withfromsocid;
97 97
     public $withfromcontactid;
98 98
     public $withnotifytiersatcreate;
99
-    public $withusercreate;  // to show name of creating user in form
99
+    public $withusercreate; // to show name of creating user in form
100 100
     public $withcreatereadonly;
101 101
 
102 102
     /**
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
      */
105 105
     public $withextrafields;
106 106
 
107
-    public $withref;  // to show ref field
107
+    public $withref; // to show ref field
108 108
     public $withcancel;
109 109
 
110 110
     public $type_code;
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
         $this->withcreatereadonly = 1;
150 150
         $this->withemail = 0;
151 151
         $this->withref = 0;
152
-        $this->withextrafields = 0;  // to show extrafields or not
152
+        $this->withextrafields = 0; // to show extrafields or not
153 153
         //$this->withtopicreadonly=0;
154 154
     }
155 155
 
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
                 $maxfilesizearray = getMaxFileSizeArray();
566 566
                 $maxmin = $maxfilesizearray['maxmin'];
567 567
                 if ($maxmin > 0) {
568
-                    $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';  // MAX_FILE_SIZE must precede the field type=file
568
+                    $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
569 569
                 }
570 570
                 $out .= '<input type="file" class="flat" id="addedfile" name="addedfile" value="' . $langs->trans("Upload") . '" />';
571 571
                 $out .= ' ';
@@ -881,7 +881,7 @@  discard block
 block discarded – undo
881 881
         $publicgroups = ($filtertype == 'public=1' || $filtertype == '(public:=:1)');
882 882
 
883 883
         $ticketstat = new Ticket($this->db);
884
-        $ticketstat->loadCacheCategoriesTickets($publicgroups ? 1 : -1);    // get list of active ticket groups
884
+        $ticketstat->loadCacheCategoriesTickets($publicgroups ? 1 : -1); // get list of active ticket groups
885 885
 
886 886
         if ($use_multilevel <= 0) {
887 887
             print '<select id="select' . $htmlname . '" class="flat minwidth100' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '">';
@@ -1053,7 +1053,7 @@  discard block
 block discarded – undo
1053 1053
             }
1054 1054
             $stringtoprint .= '</select>&nbsp;';
1055 1055
 
1056
-            $levelid = 1;   // The first combobox
1056
+            $levelid = 1; // The first combobox
1057 1057
             while ($levelid <= $use_multilevel) {   // Loop to take the child of the combo
1058 1058
                 $tabscript = array();
1059 1059
                 $stringtoprint .= '<select id="' . $htmlname . '_child_' . $levelid . '" class="maxwidth500 minwidth400 groupticketchild" child_id="' . $levelid . '">';
@@ -1129,7 +1129,7 @@  discard block
 block discarded – undo
1129 1129
                 $stringtoprint .= '</select>';
1130 1130
 
1131 1131
                 $stringtoprint .= '<script nonce="' . getNonce() . '">';
1132
-                $stringtoprint .= 'arraynotparents = ' . json_encode($arraycodenotparent) . ';';    // when the last visible combo list is number x, this is the array of group
1132
+                $stringtoprint .= 'arraynotparents = ' . json_encode($arraycodenotparent) . ';'; // when the last visible combo list is number x, this is the array of group
1133 1133
                 $stringtoprint .= 'if (arraynotparents.includes($("#' . $htmlname . ($levelid > 1 ? '_child_' . ($levelid - 1) : '') . '").val())){
1134 1134
 					console.log("' . $htmlname . '_child_' . $levelid . '")
1135 1135
 					if($("#' . $htmlname . '_child_' . $levelid . '").val() == "" && ($("#' . $htmlname . '_child_' . $levelid . '").attr("child_id")>' . $child_id . ')){
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/DiscountAbsolute.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -47,16 +47,16 @@
 block discarded – undo
47 47
     public $total_ht;
48 48
     public $total_tva;
49 49
     public $total_ttc;
50
-    public $amount_ht;  // deprecated
50
+    public $amount_ht; // deprecated
51 51
     public $amount_tva; // deprecated
52 52
     public $amount_ttc; // deprecated
53 53
 
54 54
     public $multicurrency_total_ht;
55 55
     public $multicurrency_total_tva;
56 56
     public $multicurrency_total_ttc;
57
-    public $multicurrency_amount_ht;    // deprecated
58
-    public $multicurrency_amount_tva;   // deprecated
59
-    public $multicurrency_amount_ttc;   // deprecated
57
+    public $multicurrency_amount_ht; // deprecated
58
+    public $multicurrency_amount_tva; // deprecated
59
+    public $multicurrency_amount_ttc; // deprecated
60 60
 
61 61
     /**
62 62
      * @var double
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/Fiscalyear.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -240,7 +240,7 @@
 block discarded – undo
240 240
 
241 241
             $this->id = $obj->rowid;
242 242
             $this->ref = $obj->rowid;
243
-            $this->date_start   = $this->db->jdate($obj->date_start);
243
+            $this->date_start = $this->db->jdate($obj->date_start);
244 244
             $this->date_end = $this->db->jdate($obj->date_end);
245 245
             $this->label = $obj->label;
246 246
             $this->statut = $obj->status;
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/DolEditor.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
             $posy = 0;
108 108
             $lines = explode("\n", $content);
109 109
             $nblines = count($lines);
110
-            for ($i = 0 ; $i < $nblines ; $i++) {
110
+            for ($i = 0; $i < $nblines; $i++) {
111 111
                 if (preg_match('/' . $poscursor['find'] . '/', $lines[$i])) {
112 112
                     $posy = $i;
113 113
                     break;
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
                     define('REQUIRE_CKEDITOR', '1');
177 177
                 }
178 178
 
179
-                $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa');     // default with ckeditor 4.6 : moono-lisa
179
+                $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa
180 180
 
181 181
                 $pluginstodisable = 'elementspath,save,flash,div,anchor';
182 182
                 if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) {
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
                                filebrowserImageWindowWidth : \'900\',
278 278
                                filebrowserImageWindowHeight : \'500\'';
279 279
                 }
280
-                $out .= '	})' . $morejs;    // end CKEditor.replace
280
+                $out .= '	})' . $morejs; // end CKEditor.replace
281 281
                 // Show the CKEditor javascript object once loaded is ready 'For debug)
282 282
                 //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); ';
283 283
                 $out .= '});' . "\n"; // end document.ready
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Traits/DolDeprecationHandler.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
             return $this->$newProperty;
59 59
         }
60 60
         if ($this->isDynamicPropertiesEnabled()) {
61
-            return null;  // If the property is set, then __get is not called.
61
+            return null; // If the property is set, then __get is not called.
62 62
         }
63 63
         $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString();
64 64
         dol_syslog($msg);
65 65
         trigger_error($msg, E_USER_NOTICE);
66
-        return $this->$name;  // Returning value anyway (graceful degradation)
66
+        return $this->$name; // Returning value anyway (graceful degradation)
67 67
     }
68 68
 
69 69
     /**
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
         if (!$this->isDynamicPropertiesEnabled()) {
94 94
             $msg = "DolDeprecationHandler: Undefined property '" . $name . "'" . self::getCallerInfoString();
95 95
             trigger_error($msg, E_USER_NOTICE);
96
-            $this->$name = $value;  // Setting anyway for graceful degradation
96
+            $this->$name = $value; // Setting anyway for graceful degradation
97 97
         } else {
98 98
             $this->$name = $value;
99 99
         }
Please login to merge, or discard this patch.
Dolibarr/Code/Commande/Classes/Commande.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -374,8 +374,8 @@  discard block
 block discarded – undo
374 374
     /**
375 375
      * Shipment on process
376 376
      */
377
-    const STATUS_SHIPMENTONPROCESS = 2;     // We set this status when a shipment is validated
378
-    const STATUS_ACCEPTED = 2;              // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
377
+    const STATUS_SHIPMENTONPROCESS = 2; // We set this status when a shipment is validated
378
+    const STATUS_ACCEPTED = 2; // For backward compatibility. Use key STATUS_SHIPMENTONPROCESS instead.
379 379
 
380 380
     /**
381 381
      * Closed (Sent, billed or not)
@@ -1951,7 +1951,7 @@  discard block
 block discarded – undo
1951 1951
                 //Incoterms
1952 1952
                 $this->fk_incoterms         = $obj->fk_incoterms;
1953 1953
                 $this->location_incoterms   = $obj->location_incoterms;
1954
-                $this->label_incoterms    = $obj->label_incoterms;
1954
+                $this->label_incoterms = $obj->label_incoterms;
1955 1955
 
1956 1956
                 // Multicurrency
1957 1957
                 $this->fk_multicurrency         = $obj->fk_multicurrency;
Please login to merge, or discard this patch.
Dolibarr/Code/Commande/Api/Orders.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
             if ($search_sale == -2) {
202 202
                 $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
203 203
             } elseif ($search_sale > 0) {
204
-                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")";
204
+                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")";
205 205
             }
206 206
         }
207 207
         // Add sql filters
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
             throw new RestException(500, "Error creating order", array_merge(array($this->commande->error), $this->commande->errors));
301 301
         }
302 302
 
303
-        return ((int)$this->commande->id);
303
+        return ((int) $this->commande->id);
304 304
     }
305 305
 
306 306
     /**
@@ -378,7 +378,7 @@  discard block
 block discarded – undo
378 378
             throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
379 379
         }
380 380
 
381
-        $request_data = (object)$request_data;
381
+        $request_data = (object) $request_data;
382 382
 
383 383
         $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml');
384 384
         $request_data->label = sanitizeVal($request_data->label);
@@ -445,7 +445,7 @@  discard block
 block discarded – undo
445 445
             throw new RestException(403, 'Access not allowed for login ' . DolibarrApiAccess::$user->login);
446 446
         }
447 447
 
448
-        $request_data = (object)$request_data;
448
+        $request_data = (object) $request_data;
449 449
 
450 450
         $request_data->desc = sanitizeVal($request_data->desc, 'restricthtml');
451 451
         $request_data->label = sanitizeVal($request_data->label);
@@ -1055,7 +1055,7 @@  discard block
 block discarded – undo
1055 1055
         $sql .= " ON edet.fk_elementdet = cdet.rowid";
1056 1056
         $sql .= " JOIN " . MAIN_DB_PREFIX . "commande as c";
1057 1057
         $sql .= " ON cdet.fk_commande = c.rowid";
1058
-        $sql .= " WHERE c.rowid = " . ((int)$id);
1058
+        $sql .= " WHERE c.rowid = " . ((int) $id);
1059 1059
         $sql .= " GROUP BY e.rowid";
1060 1060
         $sql .= $this->db->order("e.rowid", "ASC");
1061 1061
 
Please login to merge, or discard this patch.
Dolibarr/Code/Compta/Classes/LignePrelevement.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -71,8 +71,8 @@
 block discarded – undo
71 71
 
72 72
     const STATUS_DRAFT = 0;
73 73
     const STATUS_NOT_USED = 1;
74
-    const STATUS_CREDITED = 2;      // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
75
-    const STATUS_DEBITED = 2;       // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
74
+    const STATUS_CREDITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
75
+    const STATUS_DEBITED = 2; // STATUS_CREDITED and STATUS_DEBITED is same. Difference is in ->type
76 76
     const STATUS_REJECTED = 3;
77 77
 
78 78
 
Please login to merge, or discard this patch.