Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
Dolibarr/Code/Core/Classes/FormMail.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
         $this->withfckeditor = -1; // -1 = Auto
232 232
     }
233 233
 
234
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
234
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
235 235
     /**
236 236
      * Clear list of attached files in send mail form (also stored in session)
237 237
      *
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
      */
240 240
     public function clear_attached_files()
241 241
     {
242
-		// phpcs:enable
242
+        // phpcs:enable
243 243
         global $conf, $user;
244 244
         require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/files.lib.php';
245 245
 
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
         unset($_SESSION["listofmimes" . $keytoavoidconflict]);
257 257
     }
258 258
 
259
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
259
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
260 260
     /**
261 261
      * Add a file into the list of attached files (stored in SECTION array)
262 262
      *
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
      */
268 268
     public function add_attached_files($path, $file = '', $type = '')
269 269
     {
270
-		// phpcs:enable
270
+        // phpcs:enable
271 271
         $listofpaths = array();
272 272
         $listofnames = array();
273 273
         $listofmimes = array();
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
         }
300 300
     }
301 301
 
302
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
302
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
303 303
     /**
304 304
      * Remove a file from the list of attached files (stored in SECTION array)
305 305
      *
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function remove_attached_files($keytodelete)
310 310
     {
311
-		// phpcs:enable
311
+        // phpcs:enable
312 312
         $listofpaths = array();
313 313
         $listofnames = array();
314 314
         $listofmimes = array();
@@ -334,7 +334,7 @@  discard block
 block discarded – undo
334 334
         }
335 335
     }
336 336
 
337
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
337
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
338 338
     /**
339 339
      * Return list of attached files (stored in SECTION array)
340 340
      *
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
      */
343 343
     public function get_attached_files()
344 344
     {
345
-		// phpcs:enable
345
+        // phpcs:enable
346 346
         $listofpaths = array();
347 347
         $listofnames = array();
348 348
         $listofmimes = array();
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
         return array('paths' => $listofpaths, 'names' => $listofnames, 'mimes' => $listofmimes);
361 361
     }
362 362
 
363
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
363
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
364 364
     /**
365 365
      *  Show the form to input an email
366 366
      *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
@@ -373,11 +373,11 @@  discard block
 block discarded – undo
373 373
      */
374 374
     public function show_form($addfileaction = 'addfile', $removefileaction = 'removefile')
375 375
     {
376
-		// phpcs:enable
376
+        // phpcs:enable
377 377
         print $this->get_form($addfileaction, $removefileaction);
378 378
     }
379 379
 
380
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
380
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
381 381
     /**
382 382
      *  Get the form to input an email
383 383
      *  this->withfile: 0=No attaches files, 1=Show attached files, 2=Can add new attached files
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
      */
391 391
     public function get_form($addfileaction = 'addfile', $removefileaction = 'removefile')
392 392
     {
393
-		// phpcs:enable
393
+        // phpcs:enable
394 394
         global $conf, $langs, $user, $hookmanager, $form;
395 395
 
396 396
         // Required to show preview wof mail attachments
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -886,7 +886,7 @@
 block discarded – undo
886 886
                         $maxfilesizearray = getMaxFileSizeArray();
887 887
                         $maxmin = $maxfilesizearray['maxmin'];
888 888
                         if ($maxmin > 0) {
889
-                            $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';  // MAX_FILE_SIZE must precede the field type=file
889
+                            $out .= '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
890 890
                         }
891 891
                         // Can add other files
892 892
                         if (!getDolGlobalString('FROM_MAIL_DONT_USE_INPUT_FILE_MULTIPLE')) {
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormExpenseReport.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
             if (!empty($selected) && $selected == $key) {
79 79
                 $html .= '<option value="' . $key . '" selected>';
80 80
             } else {
81
-                $html .=  '<option value="' . $key . '">';
81
+                $html .= '<option value="' . $key . '">';
82 82
             }
83 83
             $html .= $langs->trans($val);
84 84
             $html .= '</option>';
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/HookManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -290,7 +290,7 @@
 block discarded – undo
290 290
                 '@phan-var-force array<string,CommonHookActions> $modules';
291 291
                 // Loop on each active hooks of module for this context
292 292
                 foreach ($modules as $module => $actionclassinstance) {
293
-                    $module = preg_replace('/^\d+:/', '', $module);     // $module string is 'priority:module'
293
+                    $module = preg_replace('/^\d+:/', '', $module); // $module string is 'priority:module'
294 294
                     //print "Before hook ".get_class($actionclassinstance)." method=".$method." module=".$module." hooktype=".$hooktype." results=".count($actionclassinstance->results)." resprints=".count($actionclassinstance->resprints)." resaction=".$resaction."<br>\n";
295 295
 
296 296
                     // test to avoid running twice a hook, when a module implements several active contexts
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/ExtraFields.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         }
365 365
     }
366 366
 
367
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
367
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
368 368
     /**
369 369
      *  Add description of a new optional attribute
370 370
      *
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
      */
395 395
     private function create_label($attrname, $label = '', $type = '', $pos = 0, $size = '', $elementtype = '', $unique = 0, $required = 0, $param = '', $alwayseditable = 0, $perms = '', $list = '-1', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0, $moreparams = array())
396 396
     {
397
-		// phpcs:enable
397
+        // phpcs:enable
398 398
         global $conf, $user;
399 399
 
400 400
         if ($elementtype == 'thirdparty') {
@@ -575,7 +575,7 @@  discard block
 block discarded – undo
575 575
         }
576 576
     }
577 577
 
578
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
578
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
579 579
     /**
580 580
      *  Delete description of an optional attribute
581 581
      *
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
      */
586 586
     private function delete_label($attrname, $elementtype = '')
587 587
     {
588
-		// phpcs:enable
588
+        // phpcs:enable
589 589
         global $conf;
590 590
 
591 591
         if ($elementtype == 'thirdparty') {
@@ -755,7 +755,7 @@  discard block
 block discarded – undo
755 755
         }
756 756
     }
757 757
 
758
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
758
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
759 759
     /**
760 760
      *  Modify description of personalized attribute
761 761
      *  This is a private method. For public method, use updateExtraField.
@@ -786,7 +786,7 @@  discard block
 block discarded – undo
786 786
      */
787 787
     private function update_label($attrname, $label, $type, $size, $elementtype, $unique = 0, $required = 0, $pos = 0, $param = array(), $alwayseditable = 0, $perms = '', $list = '0', $help = '', $default = '', $computed = '', $entity = '', $langfile = '', $enabled = '1', $totalizable = 0, $printable = 0, $moreparams = array())
788 788
     {
789
-		// phpcs:enable
789
+        // phpcs:enable
790 790
         global $conf, $user;
791 791
         dol_syslog(get_class($this) . "::update_label " . $attrname . ", " . $label . ", " . $type . ", " . $size . ", " . $elementtype . ", " . $unique . ", " . $required . ", " . $pos . ", " . $alwayseditable . ", " . $perms . ", " . $list . ", " . $default . ", " . $computed . ", " . $entity . ", " . $langfile . ", " . $enabled . ", " . $totalizable . ", " . $printable);
792 792
 
@@ -929,7 +929,7 @@  discard block
 block discarded – undo
929 929
         }
930 930
     }
931 931
 
932
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
932
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
933 933
     /**
934 934
      *  Load the array of extrafields definition $this->attributes
935 935
      *
@@ -940,7 +940,7 @@  discard block
 block discarded – undo
940 940
      */
941 941
     public function fetch_name_optionals_label($elementtype, $forceload = false, $attrname = '')
942 942
     {
943
-		// phpcs:enable
943
+        // phpcs:enable
944 944
         global $conf;
945 945
 
946 946
         if (empty($elementtype)) {
Please login to merge, or discard this patch.
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1239,7 +1239,7 @@  discard block
 block discarded – undo
1239 1239
             } else {
1240 1240
                 $out = $form->selectyesno($keyprefix . $key . $keysuffix, $value, 1, false, 1);
1241 1241
             }
1242
-            $out .= '<input type="hidden" name="' . $keyprefix . $key . $keysuffix . '_boolean" value="1">';    // A hidden field ending with "_boolean" that is always set to 1.
1242
+            $out .= '<input type="hidden" name="' . $keyprefix . $key . $keysuffix . '_boolean" value="1">'; // A hidden field ending with "_boolean" that is always set to 1.
1243 1243
         } elseif ($type == 'price') {
1244 1244
             if (!empty($value)) {       // $value in memory is a php numeric, we format it into user number format.
1245 1245
                 $value = price($value);
@@ -1707,7 +1707,7 @@  discard block
 block discarded – undo
1707 1707
 
1708 1708
             $tmparray = explode(':', $param_list[0]);
1709 1709
 
1710
-            $element = $extrafieldsobjectkey;       // $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1710
+            $element = $extrafieldsobjectkey; // $extrafieldsobjectkey comes from $object->table_element but we need $object->element
1711 1711
             if ($element == 'socpeople') {
1712 1712
                 $element = 'contact';
1713 1713
             } elseif ($element == 'projet') {
@@ -1715,8 +1715,8 @@  discard block
 block discarded – undo
1715 1715
             }
1716 1716
 
1717 1717
             //$objectdesc = $param_list[0];             // Example: 'ObjectName:classPath:1:(status:=:1)'   Replaced by next line: this was propagated also a filter by ajax call that was blocked by some WAF
1718
-            $objectdesc = $tmparray[0];                 // Example: 'ObjectName:classPath'                  To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1719
-            $objectfield = $element . ':options_' . $key;   // Example: 'actioncomm:options_fff'                To be used in priority to know object linked with all its definition (including filters)
1718
+            $objectdesc = $tmparray[0]; // Example: 'ObjectName:classPath'                  To not propagate any filter (selectForForms do ajax call and propagating SQL filter is blocked by some WAF). Also we should use the one into the definition in the ->fields of $elem if found.
1719
+            $objectfield = $element . ':options_' . $key; // Example: 'actioncomm:options_fff'                To be used in priority to know object linked with all its definition (including filters)
1720 1720
 
1721 1721
             $out = $form->selectForForms($objectdesc, $keyprefix . $key . $keysuffix, $value, $showempty, '', '', $morecss, '', 0, 0, '', $objectfield);
1722 1722
         } elseif (in_array($type, ['point', 'multipts', 'linestrg', 'polygon'])) {
@@ -1781,7 +1781,7 @@  discard block
 block discarded – undo
1781 1781
 
1782 1782
         $label = $this->attributes[$extrafieldsobjectkey]['label'][$key];
1783 1783
         $type = $this->attributes[$extrafieldsobjectkey]['type'][$key];
1784
-        $size = $this->attributes[$extrafieldsobjectkey]['size'][$key];         // Can be '255', '24,8'...
1784
+        $size = $this->attributes[$extrafieldsobjectkey]['size'][$key]; // Can be '255', '24,8'...
1785 1785
         $default = $this->attributes[$extrafieldsobjectkey]['default'][$key];
1786 1786
         $computed = $this->attributes[$extrafieldsobjectkey]['computed'][$key];
1787 1787
         $unique = $this->attributes[$extrafieldsobjectkey]['unique'][$key];
@@ -2109,7 +2109,7 @@  discard block
 block discarded – undo
2109 2109
             } else {
2110 2110
                 $value = '';
2111 2111
             }
2112
-        } elseif (in_array($type, ['multipts','linestrg', 'polygon'])) {
2112
+        } elseif (in_array($type, ['multipts', 'linestrg', 'polygon'])) {
2113 2113
             if (!empty($value)) {
2114 2114
                 require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/dolgeophp.class.php';
2115 2115
                 $dolgeophp = new DolGeoPHP($this->db);
@@ -2300,7 +2300,7 @@  discard block
 block discarded – undo
2300 2300
                     continue;
2301 2301
                 }
2302 2302
 
2303
-                if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_' . $key) && (! in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon')))) {
2303
+                if (!empty($onlykey) && $onlykey == '@GETPOSTISSET' && !GETPOSTISSET('options_' . $key) && (!in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst', 'point', 'multipts', 'linestrg', 'polygon')))) {
2304 2304
                     //when unticking boolean field, it's not set in POST
2305 2305
                     continue;
2306 2306
                 }
@@ -2330,7 +2330,7 @@  discard block
 block discarded – undo
2330 2330
                         $onlykey === '@GETPOSTISSET'
2331 2331
                         && in_array($this->attributes[$object->table_element]['type'][$key], array('boolean', 'checkbox', 'chkbxlst'))
2332 2332
                         && in_array(abs($enabled), array(2, 5))
2333
-                        && ! GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided
2333
+                        && !GETPOSTISSET('options_' . $key) // Update hidden checkboxes and multiselect only if they are provided
2334 2334
                     )
2335 2335
                 ) {
2336 2336
                     continue;
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormAdmin.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
         $this->db = $db;
54 54
     }
55 55
 
56
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
56
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
57 57
     /**
58 58
      *  Return html select list with available languages (key='en_US', value='United States' for example)
59 59
      *
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
      */
75 75
     public function select_language($selected = '', $htmlname = 'lang_id', $showauto = 0, $filter = array(), $showempty = '', $showwarning = 0, $disabled = 0, $morecss = '', $showcode = 0, $forcecombo = 0, $multiselect = 0, $onlykeys = array(), $mainlangonly = 0)
76 76
     {
77
-		// phpcs:enable
77
+        // phpcs:enable
78 78
         global $langs;
79 79
 
80 80
         if (getDolGlobalString('MAIN_DEFAULT_LANGUAGE_FILTER')) {
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
         return $out;
180 180
     }
181 181
 
182
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
182
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
183 183
     /**
184 184
      *    Return list of available menus (eldy_backoffice, ...)
185 185
      *
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
      */
192 192
     public function select_menu($selected, $htmlname, $dirmenuarray, $moreattrib = '')
193 193
     {
194
-		// phpcs:enable
194
+        // phpcs:enable
195 195
         global $langs, $conf;
196 196
 
197 197
         // Clean parameters
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
         return;
298 298
     }
299 299
 
300
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
300
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
301 301
     /**
302 302
      *  Return combo list of available menu families
303 303
      *
@@ -308,7 +308,7 @@  discard block
 block discarded – undo
308 308
      */
309 309
     public function select_menu_families($selected, $htmlname, $dirmenuarray)
310 310
     {
311
-		// phpcs:enable
311
+        // phpcs:enable
312 312
         global $langs, $conf;
313 313
 
314 314
         //$expdevmenu=array('smartphone_backoffice.php','smartphone_frontoffice.php');  // Menu to disable if $conf->global->MAIN_FEATURES_LEVEL is not set
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
     }
376 376
 
377 377
 
378
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
378
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
379 379
     /**
380 380
      *  Return a HTML select list of timezones
381 381
      *
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
      */
386 386
     public function select_timezone($selected, $htmlname)
387 387
     {
388
-		// phpcs:enable
388
+        // phpcs:enable
389 389
         print '<select class="flat" id="' . $htmlname . '" name="' . $htmlname . '">';
390 390
         print '<option value="-1">&nbsp;</option>';
391 391
 
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
 
430 430
 
431
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
431
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
432 432
     /**
433 433
      *  Return html select list with available languages (key='en_US', value='United States' for example)
434 434
      *
@@ -441,7 +441,7 @@  discard block
 block discarded – undo
441 441
      */
442 442
     public function select_paper_format($selected = '', $htmlname = 'paperformat_id', $filter = '', $showempty = 0, $forcecombo = 0)
443 443
     {
444
-		// phpcs:enable
444
+        // phpcs:enable
445 445
         global $langs;
446 446
 
447 447
         $langs->load("dict");
Please login to merge, or discard this 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/CommonInvoice.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
     }
537 537
 
538 538
 
539
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
539
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
540 540
     /**
541 541
      *  Return if an invoice can be deleted
542 542
      *  Rule is:
@@ -552,7 +552,7 @@  discard block
 block discarded – undo
552 552
      */
553 553
     public function is_erasable()
554 554
     {
555
-		// phpcs:enable
555
+        // phpcs:enable
556 556
 
557 557
         // We check if invoice is a temporary number (PROVxxxx)
558 558
         $tmppart = substr($this->ref, 1, 4);
@@ -778,7 +778,7 @@  discard block
 block discarded – undo
778 778
         return $this->LibStatut($this->paye, $this->statut, $mode, $alreadypaid, $this->type);
779 779
     }
780 780
 
781
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
781
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
782 782
     /**
783 783
      *  Return label of a status
784 784
      *
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
      */
792 792
     public function LibStatut($paye, $status, $mode = 0, $alreadypaid = -1, $type = -1)
793 793
     {
794
-		// phpcs:enable
794
+        // phpcs:enable
795 795
         global $langs, $hookmanager;
796 796
         $langs->load('bills');
797 797
 
@@ -861,7 +861,7 @@  discard block
 block discarded – undo
861 861
         return dolGetStatus($labelStatus, $labelStatusShort, '', $statusType, $mode);
862 862
     }
863 863
 
864
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
864
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
865 865
     /**
866 866
      *  Returns an invoice payment deadline based on the invoice settlement
867 867
      *  conditions and billing date.
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
      */
872 872
     public function calculate_date_lim_reglement($cond_reglement = 0)
873 873
     {
874
-		// phpcs:enable
874
+        // phpcs:enable
875 875
         if (!$cond_reglement) {
876 876
             $cond_reglement = $this->cond_reglement_code;
877 877
         }
@@ -957,7 +957,7 @@  discard block
 block discarded – undo
957 957
         return $datelim;
958 958
     }
959 959
 
960
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
960
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
961 961
     /**
962 962
      *  Create a withdrawal request for a direct debit order or a credit transfer order.
963 963
      *  Use the remain to pay excluding all existing open direct debit requests.
@@ -971,7 +971,7 @@  discard block
 block discarded – undo
971 971
      */
972 972
     public function demande_prelevement($fuser, $amount = 0, $type = 'direct-debit', $sourcetype = 'facture', $checkduplicateamongall = 0)
973 973
     {
974
-		// phpcs:enable
974
+        // phpcs:enable
975 975
         global $conf;
976 976
 
977 977
         $error = 0;
@@ -1624,7 +1624,7 @@  discard block
 block discarded – undo
1624 1624
         }
1625 1625
     }
1626 1626
 
1627
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1627
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1628 1628
     /**
1629 1629
      *  Remove a direct debit request or a credit transfer request
1630 1630
      *
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
      */
1635 1635
     public function demande_prelevement_delete($fuser, $did)
1636 1636
     {
1637
-		// phpcs:enable
1637
+        // phpcs:enable
1638 1638
         $sql = 'DELETE FROM ' . $this->db->prefix() . 'prelevement_demande';
1639 1639
         $sql .= ' WHERE rowid = ' . ((int) $did);
1640 1640
         $sql .= ' AND traite = 0';
Please login to merge, or discard this patch.
Spacing   +40 added lines, -40 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public $revenuestamp;
101 101
 
102
-    public $totalpaid;          // duplicate with sumpayed
103
-    public $totaldeposits;      // duplicate with sumdeposit
104
-    public $totalcreditnotes;   // duplicate with sumcreditnote
102
+    public $totalpaid; // duplicate with sumpayed
103
+    public $totaldeposits; // duplicate with sumdeposit
104
+    public $totalcreditnotes; // duplicate with sumcreditnote
105 105
 
106 106
     public $sumpayed;
107 107
     public $sumpayed_multicurrency;
@@ -1138,7 +1138,7 @@  discard block
 block discarded – undo
1138 1138
 
1139 1139
         if ($this->status > self::STATUS_DRAFT && $this->paye == 0) {
1140 1140
             // Get the default payment mode for BAN payment of the third party
1141
-            $bac = new CompanyBankAccount($this->db);   // Table societe_rib
1141
+            $bac = new CompanyBankAccount($this->db); // Table societe_rib
1142 1142
             $result = $bac->fetch(0, '', $this->socid, 1, 'ban');
1143 1143
             if ($result <= 0 || empty($bac->id)) {
1144 1144
                 $this->error = $langs->trans("ThirdpartyHasNoDefaultBanAccount");
@@ -1152,16 +1152,16 @@  discard block
 block discarded – undo
1152 1152
             $sql .= " FROM " . $this->db->prefix() . "prelevement_demande";
1153 1153
             $sql .= " WHERE rowid = " . ((int) $did);
1154 1154
             if ($type != 'bank-transfer' && $type != 'credit-transfer') {
1155
-                $sql .= " AND fk_facture = " . ((int) $this->id);             // Add a protection to not pay another invoice than current one
1155
+                $sql .= " AND fk_facture = " . ((int) $this->id); // Add a protection to not pay another invoice than current one
1156 1156
             }
1157 1157
             if ($type != 'direct-debit') {
1158 1158
                 if ($sourcetype == 'salary') {
1159
-                    $sql .= " AND fk_salary = " . ((int) $this->id);          // Add a protection to not pay another salary than current one
1159
+                    $sql .= " AND fk_salary = " . ((int) $this->id); // Add a protection to not pay another salary than current one
1160 1160
                 } else {
1161
-                    $sql .= " AND fk_facture_fourn = " . ((int) $this->id);   // Add a protection to not pay another invoice than current one
1161
+                    $sql .= " AND fk_facture_fourn = " . ((int) $this->id); // Add a protection to not pay another invoice than current one
1162 1162
                 }
1163 1163
             }
1164
-            $sql .= " AND traite = 0";  // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0)
1164
+            $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0)
1165 1165
 
1166 1166
             dol_syslog(get_class($this) . "::makeStripeSepaRequest load requests to process", LOG_DEBUG);
1167 1167
             $resql = $this->db->query($sql);
@@ -1176,7 +1176,7 @@  discard block
 block discarded – undo
1176 1176
                 $amount = $obj->amount;
1177 1177
 
1178 1178
                 if (is_numeric($amount) && $amount != 0) {
1179
-                    $companypaymentmode = new CompanyPaymentMode($this->db);    // table societe_rib
1179
+                    $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib
1180 1180
                     $companypaymentmode->fetch($bac->id);
1181 1181
 
1182 1182
                     $this->stripechargedone = 0;
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
 
1187 1187
                     $currency = $conf->currency;
1188 1188
 
1189
-                    $errorforinvoice = 0;     // We reset the $errorforinvoice at each invoice loop
1189
+                    $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop
1190 1190
 
1191 1191
                     $this->fetch_thirdparty();
1192 1192
 
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
                         $amountstripe = $amountstripe * 100;
1206 1206
                     }
1207 1207
 
1208
-                    $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');     // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr.
1208
+                    $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr.
1209 1209
                     if (!($fk_bank_account > 0)) {
1210 1210
                         $error++;
1211 1211
                         $errorforinvoice++;
@@ -1265,7 +1265,7 @@  discard block
 block discarded – undo
1265 1265
                                 $thirdparty = new Societe($this->db);
1266 1266
                                 $resultthirdparty = $thirdparty->fetch($this->socid);
1267 1267
 
1268
-                                include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php';        // This include the include of htdocs/stripe/config.php
1268
+                                include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php
1269 1269
                                 // So it inits or erases the $stripearrayofkeysbyenv
1270 1270
                                 $stripe = new Stripe($this->db);
1271 1271
 
@@ -1278,26 +1278,26 @@  discard block
 block discarded – undo
1278 1278
                                 $foundalternativestripeaccount = '';
1279 1279
 
1280 1280
                                 // Force stripe to another value (by default this value is empty)
1281
-                                if (! empty($forcestripe)) {
1281
+                                if (!empty($forcestripe)) {
1282 1282
                                     dol_syslog("makeStripeSepaRequest A dedicated stripe account was forced, so we switch to it.");
1283 1283
 
1284 1284
                                     $tmparray = explode('@', $forcestripe);
1285
-                                    if (! empty($tmparray[1])) {
1285
+                                    if (!empty($tmparray[1])) {
1286 1286
                                         $tmparray2 = explode(':', $tmparray[1]);
1287
-                                        if (! empty($tmparray2[1])) {
1287
+                                        if (!empty($tmparray2[1])) {
1288 1288
                                             $stripearrayofkeysbyenv[$servicestatus]["publishable_key"] = $tmparray2[0];
1289 1289
                                             $stripearrayofkeysbyenv[$servicestatus]["secret_key"] = $tmparray2[1];
1290 1290
 
1291 1291
                                             $stripearrayofkeys = $stripearrayofkeysbyenv[$servicestatus];
1292 1292
                                             \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']);
1293 1293
 
1294
-                                            $foundalternativestripeaccount = $tmparray[0];    // Store the customer id
1294
+                                            $foundalternativestripeaccount = $tmparray[0]; // Store the customer id
1295 1295
 
1296 1296
                                             dol_syslog("makeStripeSepaRequest We use now customer=" . $foundalternativestripeaccount . " publishable_key=" . $stripearrayofkeys['publishable_key'], LOG_DEBUG);
1297 1297
                                         }
1298 1298
                                     }
1299 1299
 
1300
-                                    if (! $foundalternativestripeaccount) {
1300
+                                    if (!$foundalternativestripeaccount) {
1301 1301
                                         $stripearrayofkeysbyenv = $savstripearrayofkeysbyenv;
1302 1302
 
1303 1303
                                         $stripearrayofkeys = $savstripearrayofkeysbyenv[$servicestatus];
@@ -1312,7 +1312,7 @@  discard block
 block discarded – undo
1312 1312
                                     dol_syslog("makeStripeSepaRequest No dedicated Stripe Account requested, so we use global one, so " . $stripearrayofkeys['publishable_key'], LOG_DEBUG);
1313 1313
                                 }
1314 1314
 
1315
-                                $stripeacc = $stripe->getStripeAccount($service, $this->socid);                             // Get Stripe OAuth connect account if it exists (no network access here)
1315
+                                $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here)
1316 1316
 
1317 1317
                                 if ($foundalternativestripeaccount) {
1318 1318
                                     if (empty($stripeacc)) {                // If the Stripe connect account not set, we use common API usage
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
                                     }
1323 1323
                                 } else {
1324 1324
                                     $customer = $stripe->customerStripe($thirdparty, $stripeacc, $servicestatus, 0);
1325
-                                    if (empty($customer) && ! empty($stripe->error)) {
1325
+                                    if (empty($customer) && !empty($stripe->error)) {
1326 1326
                                         $this->errors[] = $stripe->error;
1327 1327
                                     }
1328 1328
                                     /*if (!empty($customer) && empty($customer->sources)) {
@@ -1378,7 +1378,7 @@  discard block
 block discarded – undo
1378 1378
                                                 $charge->failure_message = $stripe->error;
1379 1379
                                                 $charge->failure_declinecode = $stripe->declinecode;
1380 1380
                                                 $stripefailurecode = $stripe->code;
1381
-                                                $stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL;
1381
+                                                $stripefailuremessage = 'Action required. Contact the support at '; // . $conf->global->SELLYOURSAAS_MAIN_EMAIL;
1382 1382
                                                 $stripefailuredeclinecode = $stripe->declinecode;
1383 1383
                                             } else {
1384 1384
                                                 dol_syslog(var_export($paymentintent, true), LOG_DEBUG);
@@ -1518,18 +1518,18 @@  discard block
 block discarded – undo
1518 1518
                                     // Insert record of payment (success or error)
1519 1519
                                     $actioncomm = new ActionComm($this->db);
1520 1520
 
1521
-                                    $actioncomm->type_code = 'AC_OTH_AUTO';     // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
1521
+                                    $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
1522 1522
                                     $actioncomm->code = 'AC_' . $actioncode;
1523 1523
                                     $actioncomm->label = $description;
1524 1524
                                     $actioncomm->note_private = implode(",\n", $postactionmessages);
1525 1525
                                     $actioncomm->fk_project = $this->fk_project;
1526 1526
                                     $actioncomm->datep = $now;
1527 1527
                                     $actioncomm->datef = $now;
1528
-                                    $actioncomm->percentage = -1;   // Not applicable
1528
+                                    $actioncomm->percentage = -1; // Not applicable
1529 1529
                                     $actioncomm->socid = $thirdparty->id;
1530 1530
                                     $actioncomm->contactid = 0;
1531
-                                    $actioncomm->authorid = $user->id;   // User saving action
1532
-                                    $actioncomm->userownerid = $user->id;   // Owner of action
1531
+                                    $actioncomm->authorid = $user->id; // User saving action
1532
+                                    $actioncomm->userownerid = $user->id; // Owner of action
1533 1533
                                     // Fields when action is a real email (content is already into note)
1534 1534
                                     /*$actioncomm->email_msgid = $object->email_msgid;
1535 1535
                                      $actioncomm->email_from  = $object->email_from;
@@ -1665,10 +1665,10 @@  discard block
 block discarded – undo
1665 1665
 
1666 1666
         // Add the standard elements to the QR code
1667 1667
         $lines = [
1668
-            'BCD',  // Service Tag (optional)
1669
-            '002',  // Version (optional)
1670
-            '1',    // Character set (optional)
1671
-            'SCT',  // Identification (optional)
1668
+            'BCD', // Service Tag (optional)
1669
+            '002', // Version (optional)
1670
+            '1', // Character set (optional)
1671
+            'SCT', // Identification (optional)
1672 1672
         ];
1673 1673
 
1674 1674
         // Add the bank account information
@@ -1741,10 +1741,10 @@  discard block
 block discarded – undo
1741 1741
         $s .= pack('C1', 3) . pack('C1', strlen($datestring)) . $datestring;
1742 1742
         $s .= pack('C1', 4) . pack('C1', strlen($pricewithtaxstring)) . $pricewithtaxstring;
1743 1743
         $s .= pack('C1', 5) . pack('C1', strlen($pricetaxstring)) . $pricetaxstring;
1744
-        $s .= '';                   // Hash of xml invoice
1745
-        $s .= '';                   // ecda signature
1746
-        $s .= '';                   // ecda public key
1747
-        $s .= '';                   // ecda signature of public key stamp
1744
+        $s .= ''; // Hash of xml invoice
1745
+        $s .= ''; // ecda signature
1746
+        $s .= ''; // ecda public key
1747
+        $s .= ''; // ecda signature of public key stamp
1748 1748
 
1749 1749
         $s = base64_encode($s);
1750 1750
 
@@ -1811,8 +1811,8 @@  discard block
 block discarded – undo
1811 1811
             $s .= "S\n";
1812 1812
             $s .= dol_trunc($bankaccount->proprio, 70, 'right', 'UTF-8', 1) . "\n";
1813 1813
             $addresslinearray = explode("\n", $bankaccount->owner_address);
1814
-            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1815
-            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1814
+            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1815
+            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1816 1816
             /*$s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n";
1817 1817
             $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n";
1818 1818
             $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n";*/
@@ -1820,8 +1820,8 @@  discard block
 block discarded – undo
1820 1820
             $s .= "S\n";
1821 1821
             $s .= dol_trunc($mysoc->name, 70, 'right', 'UTF-8', 1) . "\n";
1822 1822
             $addresslinearray = explode("\n", $mysoc->address);
1823
-            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1824
-            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1823
+            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1824
+            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1825 1825
             $s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1) . "\n";
1826 1826
             $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1) . "\n";
1827 1827
             $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1) . "\n";
@@ -1841,14 +1841,14 @@  discard block
 block discarded – undo
1841 1841
         $s .= "S\n";
1842 1842
         $s .= dol_trunc($this->thirdparty->name, 70, 'right', 'UTF-8', 1) . "\n";
1843 1843
         $addresslinearray = explode("\n", $this->thirdparty->address);
1844
-        $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1845
-        $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1844
+        $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1845
+        $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1846 1846
         $s .= dol_trunc($this->thirdparty->zip, 16, 'right', 'UTF-8', 1) . "\n";
1847 1847
         $s .= dol_trunc($this->thirdparty->town, 35, 'right', 'UTF-8', 1) . "\n";
1848 1848
         $s .= dol_trunc($this->thirdparty->country_code, 2, 'right', 'UTF-8', 1) . "\n";
1849 1849
         // ID of payment
1850
-        $s .= "NON\n";          // NON or QRR
1851
-        $s .= "\n";             // QR Code reference if previous field is QRR
1850
+        $s .= "NON\n"; // NON or QRR
1851
+        $s .= "\n"; // QR Code reference if previous field is QRR
1852 1852
         // Free text
1853 1853
         if ($complementaryinfo) {
1854 1854
             $s .= $complementaryinfo . "\n";
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormTicket.php 3 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1308,7 +1308,7 @@  discard block
 block discarded – undo
1308 1308
         print ajax_combobox('select' . $htmlname);
1309 1309
     }
1310 1310
 
1311
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1311
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1312 1312
     /**
1313 1313
      * Clear list of attached files in send mail form (also stored in session)
1314 1314
      *
@@ -1316,7 +1316,7 @@  discard block
 block discarded – undo
1316 1316
      */
1317 1317
     public function clear_attached_files()
1318 1318
     {
1319
-		// phpcs:enable
1319
+        // phpcs:enable
1320 1320
         global $conf, $user;
1321 1321
         require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/files.lib.php';
1322 1322
 
Please login to merge, or discard this 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.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -236,7 +236,9 @@
 block discarded – undo
236 236
         print '<form method="POST" ' . ($withdolfichehead ? '' : 'style="margin-bottom: 30px;" ') . 'name="ticket" id="form_create_ticket" enctype="multipart/form-data" action="' . (!empty($this->param["returnurl"]) ? $this->param["returnurl"] : $_SERVER['PHP_SELF']) . '">';
237 237
         print '<input type="hidden" name="token" value="' . newToken() . '">';
238 238
         print '<input type="hidden" name="action" value="' . $this->action . '">';
239
-        if (!empty($object->id)) print '<input type="hidden" name="id" value="' . $object->id . '">';
239
+        if (!empty($object->id)) {
240
+            print '<input type="hidden" name="id" value="' . $object->id . '">';
241
+        }
240 242
         print '<input type="hidden" name="trackid" value="' . $this->trackid . '">';
241 243
         foreach ($this->param as $key => $value) {
242 244
             print '<input type="hidden" name="' . $key . '" value="' . $value . '">';
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/DiscountAbsolute.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
 
416 416
 
417 417
 
418
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
418
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
419 419
     /**
420 420
      *  Link the discount to a particular invoice line or a particular invoice.
421 421
      *  When discount is a global discount used as an invoice line, we link using rowidline.
@@ -427,7 +427,7 @@  discard block
 block discarded – undo
427 427
      */
428 428
     public function link_to_invoice($rowidline, $rowidinvoice)
429 429
     {
430
-		// phpcs:enable
430
+        // phpcs:enable
431 431
         // Check parameters
432 432
         if (!$rowidline && !$rowidinvoice) {
433 433
             $this->error = 'ErrorBadParameters';
@@ -474,7 +474,7 @@  discard block
 block discarded – undo
474 474
     }
475 475
 
476 476
 
477
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
477
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
478 478
     /**
479 479
      *  Link the discount to a particular invoice line or a particular invoice.
480 480
      *  Do not call this if discount is linked to a reconcialiated invoice
@@ -483,7 +483,7 @@  discard block
 block discarded – undo
483 483
      */
484 484
     public function unlink_invoice()
485 485
     {
486
-		// phpcs:enable
486
+        // phpcs:enable
487 487
         $sql = "UPDATE " . $this->db->prefix() . "societe_remise_except";
488 488
         if (!empty($this->discount_type)) {
489 489
             $sql .= " SET fk_invoice_supplier_line = NULL, fk_invoice_supplier = NULL";
Please login to merge, or discard this 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 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
         return $this->LibStatut($this->status, $mode);
401 401
     }
402 402
 
403
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
403
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
404 404
     /**
405 405
      *  Give a label from a status
406 406
      *
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
      */
411 411
     public function LibStatut($status, $mode = 0)
412 412
     {
413
-		// phpcs:enable
413
+        // phpcs:enable
414 414
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
415 415
             global $langs;
416 416
             //$langs->load("mymodule@mymodule");
Please login to merge, or discard this 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.