Passed
Pull Request — dev (#14)
by Rafael
51:23
created
Dolibarr/Code/Core/Classes/SMTPs.php 2 patches
Indentation   +23 added lines, -23 removed lines patch added patch discarded remove patch
@@ -141,9 +141,9 @@  discard block
 block discarded – undo
141 141
      * Message Sensitivity
142 142
      */
143 143
     private $_arySensitivity = array(false,
144
-                                  'Personal',
145
-                                  'Private',
146
-                                  'Company Confidential');
144
+                                    'Personal',
145
+                                    'Private',
146
+                                    'Company Confidential');
147 147
 
148 148
     /**
149 149
      * Message Sensitivity
@@ -171,12 +171,12 @@  discard block
 block discarded – undo
171 171
      * Content-Transfer-Encoding
172 172
      */
173 173
     private $_smtpsTransEncodeTypes = array('7bit', // Simple 7-bit ASCII
174
-                                         '8bit', // 8-bit coding with line termination characters
175
-                                         'base64', // 3 octets encoded into 4 sextets with offset
176
-                                         'binary', // Arbitrary binary stream
177
-                                         'mac-binhex40', // Macintosh binary to hex encoding
178
-                                         'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH"
179
-                                         'uuencode'); // UUENCODE encoding
174
+                                            '8bit', // 8-bit coding with line termination characters
175
+                                            'base64', // 3 octets encoded into 4 sextets with offset
176
+                                            'binary', // Arbitrary binary stream
177
+                                            'mac-binhex40', // Macintosh binary to hex encoding
178
+                                            'quoted-printable', // Mostly 7-bit, with 8-bit characters encoded as "=HH"
179
+                                            'uuencode'); // UUENCODE encoding
180 180
 
181 181
     /**
182 182
      * Content-Transfer-Encoding
@@ -401,7 +401,7 @@  discard block
 block discarded – undo
401 401
         $_aryToList = $this->getTo();
402 402
     }
403 403
 
404
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
404
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
405 405
     /**
406 406
      * Attempt a connection to mail server
407 407
      *
@@ -409,7 +409,7 @@  discard block
 block discarded – undo
409 409
      */
410 410
     private function _server_connect()
411 411
     {
412
-		// phpcs:enable
412
+        // phpcs:enable
413 413
         // Default return value
414 414
         $_retVal = true;
415 415
 
@@ -479,7 +479,7 @@  discard block
 block discarded – undo
479 479
         return $_retVal;
480 480
     }
481 481
 
482
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
482
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
483 483
     /**
484 484
      * Attempt mail server authentication for a secure connection
485 485
      *
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
      */
488 488
     private function _server_authenticate()
489 489
     {
490
-		// phpcs:enable
490
+        // phpcs:enable
491 491
         global $conf;
492 492
 
493 493
         require_once constant('DOL_DOCUMENT_ROOT') . '/core/lib/geturl.lib.php';
@@ -1264,7 +1264,7 @@  discard block
 block discarded – undo
1264 1264
         $this->_msgRecipients = $aryHost;
1265 1265
     }
1266 1266
 
1267
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1267
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1268 1268
     /**
1269 1269
      * Returns an array of the various parts of an email address
1270 1270
      * This assumes a well formed address:
@@ -1283,7 +1283,7 @@  discard block
 block discarded – undo
1283 1283
      */
1284 1284
     private function _strip_email($_strAddr)
1285 1285
     {
1286
-		// phpcs:enable
1286
+        // phpcs:enable
1287 1287
         $_aryEmail = array();
1288 1288
         // Keep the original
1289 1289
         $_aryEmail['org'] = $_strAddr;
@@ -1320,7 +1320,7 @@  discard block
 block discarded – undo
1320 1320
         return $_aryEmail;
1321 1321
     }
1322 1322
 
1323
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1323
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1324 1324
     /**
1325 1325
      * Returns an array of bares addresses for use with 'RCPT TO:'
1326 1326
      * This is a "build as you go" method. Each time this method is called
@@ -1330,7 +1330,7 @@  discard block
 block discarded – undo
1330 1330
      */
1331 1331
     public function get_RCPT_list()
1332 1332
     {
1333
-		// phpcs:enable
1333
+        // phpcs:enable
1334 1334
         /**
1335 1335
          * An array of bares addresses for use with 'RCPT TO:'
1336 1336
          */
@@ -1349,7 +1349,7 @@  discard block
 block discarded – undo
1349 1349
         return $_RCPT_list;
1350 1350
     }
1351 1351
 
1352
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1352
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1353 1353
     /**
1354 1354
      * Returns an array of addresses for a specific type; TO, CC or BCC
1355 1355
      *
@@ -1358,7 +1358,7 @@  discard block
 block discarded – undo
1358 1358
      */
1359 1359
     public function get_email_list($_which = null)
1360 1360
     {
1361
-		// phpcs:enable
1361
+        // phpcs:enable
1362 1362
         // We need to know which address segment to pull
1363 1363
         if ($_which) {
1364 1364
             // Make sure we have addresses to process
@@ -1971,7 +1971,7 @@  discard block
 block discarded – undo
1971 1971
         return '';
1972 1972
     }
1973 1973
 
1974
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1974
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1975 1975
     /**
1976 1976
      * This function has been modified as provided by SirSir to allow multiline responses when
1977 1977
      * using SMTP Extensions
@@ -1984,7 +1984,7 @@  discard block
 block discarded – undo
1984 1984
      */
1985 1985
     public function server_parse($socket, $response)
1986 1986
     {
1987
-		// phpcs:enable
1987
+        // phpcs:enable
1988 1988
         /**
1989 1989
          * Returns constructed SELECT Object string or boolean upon failure
1990 1990
          * Default value is set at true
@@ -2016,7 +2016,7 @@  discard block
 block discarded – undo
2016 2016
         return $_retVal;
2017 2017
     }
2018 2018
 
2019
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2019
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2020 2020
     /**
2021 2021
      * Send str
2022 2022
      *
@@ -2027,7 +2027,7 @@  discard block
 block discarded – undo
2027 2027
      */
2028 2028
     public function socket_send_str($_strSend, $_returnCode = null, $CRLF = "\r\n")
2029 2029
     {
2030
-		// phpcs:enable
2030
+        // phpcs:enable
2031 2031
         if ($this->_debug) {
2032 2032
             $this->log .= $_strSend; // @CHANGE LDR for log
2033 2033
         }
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
                 }
589 589
                 // Most servers expect a 2nd pass of EHLO after TLS is established to get another time
590 590
                 // the answer with list of supported AUTH methods. They may differs between non STARTTLS and with STARTTLS.
591
-                if (! $_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) {
591
+                if (!$_retVal = $this->socket_send_str('EHLO ' . $hosth, '250')) {
592 592
                     $this->_setErr(126, '"' . $hosth . '" does not support authenticated connections or temporary error. Error after 2nd sending EHLO ' . $hosth . ' : ' . $this->lastretval);
593 593
                     return $_retVal;
594 594
                 }
@@ -1709,7 +1709,7 @@  discard block
 block discarded – undo
1709 1709
             $this->_msgContent['attachment'][$strFileName]['mimeType'] = $strMimeType;
1710 1710
             $this->_msgContent['attachment'][$strFileName]['fileName'] = $strFileName;
1711 1711
             $this->_msgContent['attachment'][$strFileName]['data']     = $strContent;
1712
-            $this->_msgContent['attachment'][$strFileName]['cid']      = $strCid;       // If defined, it means this attachment must be shown inline
1712
+            $this->_msgContent['attachment'][$strFileName]['cid']      = $strCid; // If defined, it means this attachment must be shown inline
1713 1713
 
1714 1714
             if ($this->getMD5flag()) {
1715 1715
                 $this->_msgContent['attachment'][$strFileName]['md5'] = dol_hash($strContent, 3);
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/Interfaces.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@  discard block
 block discarded – undo
59 59
         $this->db = $db;
60 60
     }
61 61
 
62
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
62
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
63 63
     /**
64 64
      *   Function called when a Dolibarr business event occurs
65 65
      *   This function call all qualified triggers.
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
      */
74 74
     public function run_triggers($action, $object, $user, $langs, $conf)
75 75
     {
76
-		// phpcs:enable
76
+        // phpcs:enable
77 77
 
78 78
         if (getDolGlobalInt('MAIN_TRIGGER_DEBUG')) {
79 79
             // This his too much verbose, enabled if const enabled only
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -94,10 +94,10 @@
 block discarded – undo
94 94
             return -1;
95 95
         }
96 96
         if (!is_object($langs)) {   // Warning
97
-            dol_syslog(get_only_class($this) . '::run_triggers was called with wrong parameters action=' . $action . ' object=' . ((string)(int)is_object($object)) . ' user=' . ((string)(int)is_object($user)) . ' langs=' . ((string)(int)is_object($langs)) . ' conf=' . ((string)(int)is_object($conf)), LOG_WARNING);
97
+            dol_syslog(get_only_class($this) . '::run_triggers was called with wrong parameters action=' . $action . ' object=' . ((string) (int) is_object($object)) . ' user=' . ((string) (int) is_object($user)) . ' langs=' . ((string) (int) is_object($langs)) . ' conf=' . ((string) (int) is_object($conf)), LOG_WARNING);
98 98
         }
99 99
         if (!is_object($user)) {        // Warning
100
-            dol_syslog(get_only_class($this) . '::run_triggers was called with wrong parameters action=' . $action . ' object=' . ((string)(int)is_object($object)) . ' user=' . ((string)(int)is_object($user)) . ' langs=' . ((string)(int)is_object($langs)) . ' conf=' . ((string)(int)is_object($conf)), LOG_WARNING);
100
+            dol_syslog(get_only_class($this) . '::run_triggers was called with wrong parameters action=' . $action . ' object=' . ((string) (int) is_object($object)) . ' user=' . ((string) (int) is_object($user)) . ' langs=' . ((string) (int) is_object($langs)) . ' conf=' . ((string) (int) is_object($conf)), LOG_WARNING);
101 101
             $user = new User($this->db);
102 102
         }
103 103
 
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormSms.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
         $this->withbodyreadonly = 0;
123 123
     }
124 124
 
125
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
125
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
126 126
     /**
127 127
      *  Show the form to input an sms.
128 128
      *
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      */
133 133
     public function show_form($morecss = 'titlefield', $showform = 1)
134 134
     {
135
-		// phpcs:enable
135
+        // phpcs:enable
136 136
         global $conf, $langs, $form;
137 137
 
138 138
         if (!is_object($form)) {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -209,10 +209,10 @@
 block discarded – undo
209 209
             } else {
210 210
                 print '<tr><td class="' . $morecss . '">' . $langs->trans("SmsFrom") . "</td><td>";
211 211
                 if (getDolGlobalString('MAIN_SMS_SENDMODE')) {
212
-                    $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE');    // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
213
-                    $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode);  // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
212
+                    $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
213
+                    $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
214 214
                     if ($classmoduleofsender == 'ovh') {
215
-                        $classmoduleofsender = 'ovhsms@ovh';    // For backward compatibility
215
+                        $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility
216 216
                     }
217 217
 
218 218
                     $tmp = explode('@', $classmoduleofsender);
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormActions.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
     }
54 54
 
55 55
 
56
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
56
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
57 57
     /**
58 58
      *  Show list of action status
59 59
      *
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      */
69 69
     public function form_select_status_action($formname, $selected, $canedit = 1, $htmlname = 'complete', $showempty = 0, $onlyselect = 0, $morecss = 'maxwidth100')
70 70
     {
71
-		// phpcs:enable
71
+        // phpcs:enable
72 72
         global $langs, $conf;
73 73
 
74 74
         $listofstatus = array(
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
     }
366 366
 
367 367
 
368
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
368
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
369 369
     /**
370 370
      *  Output html select list of type of event
371 371
      *
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
      */
382 382
     public function select_type_actions($selected = '', $htmlname = 'actioncode', $excludetype = '', $onlyautoornot = 0, $hideinfohelp = 0, $multiselect = 0, $nooutput = 0, $morecss = 'minwidth300')
383 383
     {
384
-		// phpcs:enable
384
+        // phpcs:enable
385 385
         global $langs, $user, $form;
386 386
 
387 387
         if (!is_object($form)) {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -366,7 +366,7 @@
 block discarded – undo
366 366
         $caction = new CActionComm($this->db);
367 367
 
368 368
         // Suggest a list with manual events or all auto events
369
-        $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0);     // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
369
+        $arraylist = $caction->liste_array(1, 'code', $excludetype, $onlyautoornot, '', 0); // If we use param 'all' instead of 'code', there is no group by include in answer but the key 'type' of answer array contains the key for the group by.
370 370
         if (empty($multiselect)) {
371 371
             // Add empty line at start only if no multiselect
372 372
             array_unshift($arraylist, '&nbsp;');
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormProjets.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -792,7 +792,7 @@
 block discarded – undo
792 792
         if (is_array($selected)) {
793 793
             $selectedarray = $selected;
794 794
         } elseif ($selected == 99) {
795
-            $selectedarray = array(0,1);
795
+            $selectedarray = array(0, 1);
796 796
         } else {
797 797
             $selectedarray = explode(',', $selected);
798 798
         }
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $this->db = $db;
65 65
     }
66 66
 
67
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
67
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
68 68
 
69 69
     /**
70 70
      * Output a combo list with projects qualified for a third party / user
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
      */
90 90
     public function select_projects($socid = -1, $selected = '', $htmlname = 'projectid', $maxlength = 16, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $morecss = '', $htmlid = '', $morefilter = '')
91 91
     {
92
-		// phpcs:enable
92
+        // phpcs:enable
93 93
         global $langs, $conf, $form;
94 94
 
95 95
         $selected_input_value = '';
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
         }
133 133
     }
134 134
 
135
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
135
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
136 136
 
137 137
     /**
138 138
      * Returns an array with projects qualified for a third party
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
      */
158 158
     public function select_projects_list($socid = -1, $selected = 0, $htmlname = 'projectid', $maxlength = 24, $option_only = 0, $show_empty = 1, $discard_closed = 0, $forcefocus = 0, $disabled = 0, $mode = 0, $filterkey = '', $nooutput = 0, $forceaddid = 0, $htmlid = '', $morecss = 'maxwidth500', $morefilter = '')
159 159
     {
160
-		// phpcs:enable
160
+        // phpcs:enable
161 161
         global $user, $conf, $langs;
162 162
 
163 163
 
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
     }
530 530
 
531 531
 
532
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
532
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
533 533
 
534 534
     /**
535 535
      *    Build a HTML select list of element of same thirdparty to suggest to link them to project
@@ -544,7 +544,7 @@  discard block
 block discarded – undo
544 544
      */
545 545
     public function select_element($table_element, $socid = 0, $morecss = '', $limitonstatus = -2, $projectkey = "fk_projet", $placeholder = '')
546 546
     {
547
-		// phpcs:enable
547
+        // phpcs:enable
548 548
         global $conf, $langs;
549 549
 
550 550
         if ($table_element == 'projet_task') {
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/CMailFile.php 2 patches
Indentation   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -1337,7 +1337,7 @@  discard block
 block discarded – undo
1337 1337
         return '=?' . $conf->file->character_set_client . '?B?' . base64_encode($stringtoencode) . '?=';
1338 1338
     }
1339 1339
 
1340
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1340
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1341 1341
     /**
1342 1342
      * Read a file on disk and return encoded content for emails (mode = 'mail')
1343 1343
      *
@@ -1346,7 +1346,7 @@  discard block
 block discarded – undo
1346 1346
      */
1347 1347
     private function _encode_file($sourcefile)
1348 1348
     {
1349
-		// phpcs:enable
1349
+        // phpcs:enable
1350 1350
         $newsourcefile = dol_osencode($sourcefile);
1351 1351
 
1352 1352
         if (is_readable($newsourcefile)) {
@@ -1361,7 +1361,7 @@  discard block
 block discarded – undo
1361 1361
     }
1362 1362
 
1363 1363
 
1364
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1364
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1365 1365
     /**
1366 1366
      *  Write content of a SMTP request into a dump file (mode = all)
1367 1367
      *  Used for debugging.
@@ -1371,7 +1371,7 @@  discard block
 block discarded – undo
1371 1371
      */
1372 1372
     public function dump_mail()
1373 1373
     {
1374
-		// phpcs:enable
1374
+        // phpcs:enable
1375 1375
         global $dolibarr_main_data_root;
1376 1376
 
1377 1377
         if (@is_writable($dolibarr_main_data_root)) {   // Avoid fatal error on fopen with open_basedir
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
         }
1403 1403
     }
1404 1404
 
1405
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1405
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1406 1406
     /**
1407 1407
      *  Save content if mail is in error
1408 1408
      *  Used for debugging.
@@ -1499,7 +1499,7 @@  discard block
 block discarded – undo
1499 1499
     }
1500 1500
 
1501 1501
 
1502
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1502
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1503 1503
     /**
1504 1504
      * Create SMTP headers (mode = 'mail')
1505 1505
      *
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
      */
1508 1508
     public function write_smtpheaders()
1509 1509
     {
1510
-		// phpcs:enable
1510
+        // phpcs:enable
1511 1511
         $out = "";
1512 1512
         $host = dol_getprefix('email');
1513 1513
 
@@ -1571,7 +1571,7 @@  discard block
 block discarded – undo
1571 1571
     }
1572 1572
 
1573 1573
 
1574
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1574
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1575 1575
     /**
1576 1576
      * Create header MIME (mode = 'mail')
1577 1577
      *
@@ -1581,7 +1581,7 @@  discard block
 block discarded – undo
1581 1581
      */
1582 1582
     public function write_mimeheaders($filename_list, $mimefilename_list)
1583 1583
     {
1584
-		// phpcs:enable
1584
+        // phpcs:enable
1585 1585
         $mimedone = 0;
1586 1586
         $out = "";
1587 1587
 
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
         return $out;
1602 1602
     }
1603 1603
 
1604
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1604
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1605 1605
     /**
1606 1606
      * Return email content (mode = 'mail')
1607 1607
      *
@@ -1610,7 +1610,7 @@  discard block
 block discarded – undo
1610 1610
      */
1611 1611
     public function write_body($msgtext)
1612 1612
     {
1613
-		// phpcs:enable
1613
+        // phpcs:enable
1614 1614
         global $conf;
1615 1615
 
1616 1616
         $out = '';
@@ -1694,7 +1694,7 @@  discard block
 block discarded – undo
1694 1694
         return $out;
1695 1695
     }
1696 1696
 
1697
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1697
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1698 1698
     /**
1699 1699
      * Attach file to email (mode = 'mail')
1700 1700
      *
@@ -1706,7 +1706,7 @@  discard block
 block discarded – undo
1706 1706
      */
1707 1707
     private function write_files($filename_list, $mimetype_list, $mimefilename_list, $cidlist)
1708 1708
     {
1709
-		// phpcs:enable
1709
+        // phpcs:enable
1710 1710
         $out = '';
1711 1711
 
1712 1712
         $filename_list_size = count($filename_list);
@@ -1745,7 +1745,7 @@  discard block
 block discarded – undo
1745 1745
     }
1746 1746
 
1747 1747
 
1748
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1748
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1749 1749
     /**
1750 1750
      * Attach an image to email (mode = 'mail')
1751 1751
      *
@@ -1754,7 +1754,7 @@  discard block
 block discarded – undo
1754 1754
      */
1755 1755
     public function write_images($images_list)
1756 1756
     {
1757
-		// phpcs:enable
1757
+        // phpcs:enable
1758 1758
         $out = '';
1759 1759
 
1760 1760
         if (is_array($images_list)) {
@@ -1776,7 +1776,7 @@  discard block
 block discarded – undo
1776 1776
     }
1777 1777
 
1778 1778
 
1779
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1779
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1780 1780
     /**
1781 1781
      * Try to create a socket connection
1782 1782
      *
@@ -1786,7 +1786,7 @@  discard block
 block discarded – undo
1786 1786
      */
1787 1787
     public function check_server_port($host, $port)
1788 1788
     {
1789
-		// phpcs:enable
1789
+        // phpcs:enable
1790 1790
         global $conf;
1791 1791
 
1792 1792
         $_retVal = 0;
@@ -1857,7 +1857,7 @@  discard block
 block discarded – undo
1857 1857
         return $_retVal;
1858 1858
     }
1859 1859
 
1860
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1860
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1861 1861
     /**
1862 1862
      * This function has been modified as provided by SirSir to allow multiline responses when
1863 1863
      * using SMTP Extensions.
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
      */
1869 1869
     public function server_parse($socket, $response)
1870 1870
     {
1871
-		// phpcs:enable
1871
+        // phpcs:enable
1872 1872
         $_retVal = true; // Indicates if Object was created or not
1873 1873
         $server_response = '';
1874 1874
 
Please login to merge, or discard this patch.
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
                     }
366 366
                 }
367 367
                 if ($emailtoadd && preg_match('/' . preg_quote($emailtoadd, '/') . '/i', $to)) {
368
-                    $emailtoadd = '';   // Email already in the "To"
368
+                    $emailtoadd = ''; // Email already in the "To"
369 369
                 }
370 370
                 if ($emailtoadd) {
371 371
                     $listofemailstoadd[$key] = $emailtoadd;
@@ -559,7 +559,7 @@  discard block
 block discarded – undo
559 559
                     $this->buildCSS();
560 560
                 }
561 561
                 $msg = $this->html;
562
-                $msg = $this->checkIfHTML($msg);        // This add a header and a body including custom CSS to the HTML content
562
+                $msg = $this->checkIfHTML($msg); // This add a header and a body including custom CSS to the HTML content
563 563
             }
564 564
 
565 565
             // Replace . alone on a new line with .. to avoid to have SMTP interpret this as end of message
@@ -706,7 +706,7 @@  discard block
 block discarded – undo
706 706
                     $this->buildCSS();
707 707
                 }
708 708
                 $msg = $this->html;
709
-                $msg = $this->checkIfHTML($msg);        // This add a header and a body including custom CSS to the HTML content
709
+                $msg = $this->checkIfHTML($msg); // This add a header and a body including custom CSS to the HTML content
710 710
             }
711 711
 
712 712
             if ($this->atleastoneimage) {
@@ -1149,8 +1149,8 @@  discard block
 block discarded – undo
1149 1149
                     }
1150 1150
 
1151 1151
                     $smtperrorcode = 0;
1152
-                    if (! $result) {
1153
-                        $smtperrorcode = $this->smtps->lastretval;  // SMTP error code
1152
+                    if (!$result) {
1153
+                        $smtperrorcode = $this->smtps->lastretval; // SMTP error code
1154 1154
                         dol_syslog("CMailFile::sendfile: mail SMTP error code " . $smtperrorcode, LOG_WARNING);
1155 1155
 
1156 1156
                         if ($smtperrorcode == '421') {  // Try later
@@ -1168,7 +1168,7 @@  discard block
 block discarded – undo
1168 1168
                         }
1169 1169
                     }
1170 1170
 
1171
-                    $result = $this->smtps->getErrors();    // applicative error code (not SMTP error code)
1171
+                    $result = $this->smtps->getErrors(); // applicative error code (not SMTP error code)
1172 1172
                     if (empty($this->error) && empty($result)) {
1173 1173
                         dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG);
1174 1174
                         $res = true;
@@ -1418,7 +1418,7 @@  discard block
 block discarded – undo
1418 1418
 
1419 1419
         if (@is_writable($dolibarr_main_data_root)) {   // Avoid fatal error on fopen with open_basedir
1420 1420
             $outputfile = $dolibarr_main_data_root . "/dolibarr_mail.log";
1421
-            $fp = fopen($outputfile, "w");  // overwrite
1421
+            $fp = fopen($outputfile, "w"); // overwrite
1422 1422
 
1423 1423
             if ($this->sendmode == 'mail') {
1424 1424
                 fwrite($fp, $this->headers);
@@ -1683,11 +1683,11 @@  discard block
 block discarded – undo
1683 1683
             // Similar code to forge a text from html is also in smtps.class.php
1684 1684
             $strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent);
1685 1685
             // TODO We could replace <img ...> with [Filename.ext] like Gmail do.
1686
-            $strContentAltText = html_entity_decode(strip_tags($strContentAltText));    // Remove any HTML tags
1686
+            $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); // Remove any HTML tags
1687 1687
             $strContentAltText = trim(wordwrap($strContentAltText, 75, !getDolGlobalString('MAIN_FIX_FOR_BUGGED_MTA') ? "\r\n" : "\n"));
1688 1688
 
1689 1689
             // Check if html header already in message, if not complete the message
1690
-            $strContent = $this->checkIfHTML($strContent);      // This add a header and a body including custom CSS to the HTML content
1690
+            $strContent = $this->checkIfHTML($strContent); // This add a header and a body including custom CSS to the HTML content
1691 1691
         }
1692 1692
 
1693 1693
         // Make RFC2045 Compliant, split lines
@@ -2075,7 +2075,7 @@  discard block
 block discarded – undo
2075 2075
                 // We save the image to send in disk
2076 2076
                 $filecontent = $matches[2][$key];
2077 2077
 
2078
-                $cid = 'cid000' . dol_hash($filecontent, 'md5');      // The id must not change if image is same
2078
+                $cid = 'cid000' . dol_hash($filecontent, 'md5'); // The id must not change if image is same
2079 2079
 
2080 2080
                 $destfiletmp = $images_dir . '/' . $cid . '.' . $ext;
2081 2081
 
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/CommonDocGenerator.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
     }
194 194
 
195 195
 
196
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
196
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
197 197
     /**
198 198
      * Define array with couple substitution key => substitution value
199 199
      *
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
      */
204 204
     public function get_substitutionarray_user($user, $outputlangs)
205 205
     {
206
-		// phpcs:enable
206
+        // phpcs:enable
207 207
         global $conf, $extrafields;
208 208
 
209 209
         $logotouse = $conf->user->dir_output . '/' . get_exdir(0, 0, 0, 0, $user, 'user') . 'photos/' . getImageFileNameForSize($user->photo, '_small');
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
     }
290 290
 
291 291
 
292
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
292
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
293 293
     /**
294 294
      * Define array with couple substitution key => substitution value
295 295
      *
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
      */
300 300
     public function get_substitutionarray_mysoc($mysoc, $outputlangs)
301 301
     {
302
-		// phpcs:enable
302
+        // phpcs:enable
303 303
         global $conf;
304 304
 
305 305
         if (empty($mysoc->forme_juridique) && !empty($mysoc->forme_juridique_code)) {
@@ -346,7 +346,7 @@  discard block
 block discarded – undo
346 346
     }
347 347
 
348 348
 
349
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
349
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
350 350
     /**
351 351
      * Define array with couple substitution key => substitution value
352 352
      * For example {company_name}, {company_name_alias}
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
      */
359 359
     public function get_substitutionarray_thirdparty($object, $outputlangs, $array_key = 'company')
360 360
     {
361
-		// phpcs:enable
361
+        // phpcs:enable
362 362
         global $extrafields;
363 363
 
364 364
         if (empty($object->country) && !empty($object->country_code)) {
@@ -412,7 +412,7 @@  discard block
 block discarded – undo
412 412
         return $array_thirdparty;
413 413
     }
414 414
 
415
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
415
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
416 416
     /**
417 417
      * Define array with couple substitution key => substitution value
418 418
      *
@@ -423,7 +423,7 @@  discard block
 block discarded – undo
423 423
      */
424 424
     public function get_substitutionarray_contact($object, $outputlangs, $array_key = 'object')
425 425
     {
426
-		// phpcs:enable
426
+        // phpcs:enable
427 427
         global $conf, $extrafields;
428 428
 
429 429
         if (empty($object->country) && !empty($object->country_code)) {
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
     }
473 473
 
474 474
 
475
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
475
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
476 476
     /**
477 477
      * Define array with couple substitution key => substitution value
478 478
      *
@@ -481,7 +481,7 @@  discard block
 block discarded – undo
481 481
      */
482 482
     public function get_substitutionarray_other($outputlangs)
483 483
     {
484
-		// phpcs:enable
484
+        // phpcs:enable
485 485
         global $conf;
486 486
 
487 487
         $now = dol_now('gmt'); // gmt
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
     }
513 513
 
514 514
 
515
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
515
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
516 516
     /**
517 517
      * Define array with couple substitution key => substitution value
518 518
      * Note that vars into substitutions array are formatted.
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
      */
525 525
     public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
526 526
     {
527
-		// phpcs:enable
527
+        // phpcs:enable
528 528
         global $extrafields;
529 529
 
530 530
         $sumpayed = $sumdeposit = $sumcreditnote = '';
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
         return $resarray;
716 716
     }
717 717
 
718
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
718
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
719 719
     /**
720 720
      *  Define array with couple substitution key => substitution value
721 721
      *  Note that vars into substitutions array are formatted.
@@ -727,7 +727,7 @@  discard block
 block discarded – undo
727 727
      */
728 728
     public function get_substitutionarray_lines($line, $outputlangs, $linenumber = 0)
729 729
     {
730
-		// phpcs:enable
730
+        // phpcs:enable
731 731
         $resarray = array(
732 732
             'line_pos' => $linenumber,
733 733
             'line_fulldesc' => doc_getlinedesc($line, $outputlangs),
@@ -839,7 +839,7 @@  discard block
 block discarded – undo
839 839
         return $resarray;
840 840
     }
841 841
 
842
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
842
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
843 843
     /**
844 844
      * Define array with couple substitution key => substitution value
845 845
      * Note that vars into substitutions array are formatted.
@@ -851,7 +851,7 @@  discard block
 block discarded – undo
851 851
      */
852 852
     public function get_substitutionarray_shipment($object, $outputlangs, $array_key = 'object')
853 853
     {
854
-		// phpcs:enable
854
+        // phpcs:enable
855 855
         global $extrafields;
856 856
 
857 857
         include_once DOL_DOCUMENT_ROOT . '/core/lib/product.lib.php';
@@ -908,7 +908,7 @@  discard block
 block discarded – undo
908 908
     }
909 909
 
910 910
 
911
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
911
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
912 912
     /**
913 913
      * Define array with couple substitution key => substitution value
914 914
      *
@@ -919,7 +919,7 @@  discard block
 block discarded – undo
919 919
      */
920 920
     public function get_substitutionarray_each_var_object(&$object, $outputlangs, $recursive = 1)
921 921
     {
922
-		// phpcs:enable
922
+        // phpcs:enable
923 923
         $array_other = array();
924 924
         if (!empty($object)) {
925 925
             foreach ($object as $key => $value) {
@@ -948,7 +948,7 @@  discard block
 block discarded – undo
948 948
     }
949 949
 
950 950
 
951
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
951
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
952 952
     /**
953 953
      *  Fill array with couple extrafield key => extrafield value
954 954
      *  Note that vars into substitutions array are formatted.
@@ -962,7 +962,7 @@  discard block
 block discarded – undo
962 962
      */
963 963
     public function fill_substitutionarray_with_extrafields($object, $array_to_fill, $extrafields, $array_key, $outputlangs)
964 964
     {
965
-		// phpcs:enable
965
+        // phpcs:enable
966 966
         global $conf;
967 967
 
968 968
         if ($extrafields->attributes[$object->table_element]['count'] > 0) {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -184,8 +184,8 @@  discard block
 block discarded – undo
184 184
     public $posxlabel;
185 185
     public $posxup;
186 186
     public $posxref;
187
-    public $posxpicture;    // For picture
188
-    public $posxdesc;       // For description
187
+    public $posxpicture; // For picture
188
+    public $posxdesc; // For description
189 189
     public $posxqty;
190 190
     public $posxpuht;
191 191
     public $posxtva;
@@ -565,7 +565,7 @@  discard block
 block discarded – undo
565 565
 
566 566
         if (get_only_class($object) == 'CommandeFournisseur') {
567 567
             /** @var CommandeFournisseur $object*/
568
-            $object->date_validation =  $object->date_valid;
568
+            $object->date_validation = $object->date_valid;
569 569
             $object->date_commande = $object->date;
570 570
         }
571 571
         $resarray = array(
@@ -1528,7 +1528,7 @@  discard block
 block discarded – undo
1528 1528
                  * @param stdClass $b
1529 1529
                  * @return int<-1,1>
1530 1530
                  */
1531
-                static function ($a, $b) {
1531
+                static function($a, $b) {
1532 1532
                     return  ($a->rank > $b->rank) ? 1 : -1;
1533 1533
                 }
1534 1534
             );
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormSocialContrib.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
         $this->db = $db;
50 50
     }
51 51
 
52
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
52
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
53 53
     /**
54 54
      *  Return list of social contributions.
55 55
      *  Use mysoc->country_id or mysoc->country_code so they must be defined.
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
      */
66 66
     public function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300', $noerrorifempty = 0)
67 67
     {
68
-		// phpcs:enable
68
+        // phpcs:enable
69 69
         global $conf, $db, $langs, $user, $mysoc;
70 70
 
71 71
         if (empty($mysoc->country_id) && empty($mysoc->country_code)) {
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/ExtraLanguages.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
     }
69 69
 
70 70
 
71
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
71
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
72 72
     /**
73 73
      *  Load array this->attributes with list of fields per object that need an alternate translation. The object and field must be managed with
74 74
      *  the widgetForTranslation() method.
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
      */
82 82
     public function fetch_name_extralanguages($elementtype, $forceload = false)
83 83
     {
84
-		// phpcs:enable
84
+        // phpcs:enable
85 85
         global $conf;
86 86
 
87 87
         if (empty($elementtype)) {
Please login to merge, or discard this patch.