Passed
Push — main ( b1e4ca...d8f8f2 )
by Rafael
44:33
created
htdocs/core/class/stats.class.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
     // Here we have low level of shared code called by XxxStats.class.php
382 382
 
383 383
 
384
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
384
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
385 385
     /**
386 386
      *  Return nb of elements by year
387 387
      *
@@ -390,7 +390,7 @@  discard block
 block discarded – undo
390 390
      */
391 391
     protected function _getNbByYear($sql)
392 392
     {
393
-		// phpcs:enable
393
+        // phpcs:enable
394 394
         $result = array();
395 395
 
396 396
         dol_syslog(get_class($this) . '::' . __FUNCTION__, LOG_DEBUG);
@@ -410,7 +410,7 @@  discard block
 block discarded – undo
410 410
         return $result;
411 411
     }
412 412
 
413
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
413
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
414 414
     /**
415 415
      *  Return nb of elements, total amount and avg amount each year
416 416
      *
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
      */
420 420
     protected function _getAllByYear($sql)
421 421
     {
422
-		// phpcs:enable
422
+        // phpcs:enable
423 423
         $result = array();
424 424
 
425 425
         dol_syslog(get_class($this) . '::' . __FUNCTION__, LOG_DEBUG);
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
         return $result;
465 465
     }
466 466
 
467
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
467
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
468 468
     /**
469 469
      *     Renvoie le nombre de documents par mois pour une annee donnee
470 470
      *     Return number of documents per month for a given year
@@ -476,7 +476,7 @@  discard block
 block discarded – undo
476 476
      */
477 477
     protected function _getNbByMonth($year, $sql, $format = 0)
478 478
     {
479
-		// phpcs:enable
479
+        // phpcs:enable
480 480
         global $langs;
481 481
 
482 482
         $result = array();
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
         return $data;
523 523
     }
524 524
 
525
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
525
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
526 526
     /**
527 527
      *     Return the amount per month for a given year
528 528
      *
@@ -533,7 +533,7 @@  discard block
 block discarded – undo
533 533
      */
534 534
     protected function _getAmountByMonth($year, $sql, $format = 0)
535 535
     {
536
-		// phpcs:enable
536
+        // phpcs:enable
537 537
         global $langs;
538 538
 
539 539
         $result = array();
@@ -579,7 +579,7 @@  discard block
 block discarded – undo
579 579
         return $data;
580 580
     }
581 581
 
582
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
582
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
583 583
     /**
584 584
      *  Renvoie le montant moyen par mois pour une annee donnee
585 585
      *  Return the amount average par month for a given year
@@ -591,7 +591,7 @@  discard block
 block discarded – undo
591 591
      */
592 592
     protected function _getAverageByMonth($year, $sql, $format = 0)
593 593
     {
594
-		// phpcs:enable
594
+        // phpcs:enable
595 595
         global $langs;
596 596
 
597 597
         $result = array();
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
     }
639 639
 
640 640
 
641
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
641
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
642 642
     /**
643 643
      *  Return number or total of product refs
644 644
      *
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
      */
649 649
     protected function _getAllByProduct($sql, $limit = 10)
650 650
     {
651
-		// phpcs:enable
651
+        // phpcs:enable
652 652
         global $langs;
653 653
 
654 654
         $result = array();
@@ -679,7 +679,7 @@  discard block
 block discarded – undo
679 679
         return $result;
680 680
     }
681 681
 
682
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
682
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
683 683
     /**
684 684
      *  Returns the summed amounts per year for a given number of past years ending now
685 685
      *  @param  string  $sql    SQL
Please login to merge, or discard this patch.
htdocs/core/class/antivir.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
         $this->db = $db;
61 61
     }
62 62
 
63
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
63
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
64 64
     /**
65 65
      *  Scan a file with antivirus.
66 66
      *  This function runs the command defined in setup. This antivirus command must return 0 if OK.
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
      */
72 72
     public function dol_avscan_file($file)
73 73
     {
74
-		// phpcs:enable
74
+        // phpcs:enable
75 75
         global $conf;
76 76
 
77 77
         if (preg_match('/\.virus$/i', $file)) {
Please login to merge, or discard this patch.
htdocs/core/class/commonstickergenerator.class.php 1 patch
Indentation   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 
71 71
     public $code; // Code of format
72 72
 
73
-	// phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore
73
+    // phpcs:disable PEAR.NamingConventions.ValidVariableName.PublicUnderscore
74 74
     // protected
75 75
     // Name of stick
76 76
     protected $_Avery_Name = '';
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
      * @var array
110 110
      */
111 111
     public $_Avery_Labels;
112
-	// phpcs:enable
112
+    // phpcs:enable
113 113
 
114 114
     /**
115 115
      *  Constructor
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
         $this->db = $db;
122 122
     }
123 123
 
124
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
124
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
125 125
     /**
126 126
      *  Function to build PDF on disk, then output on HTTP stream.
127 127
      *
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
      *  @return int                             1=OK, 0=KO
133 133
      */
134 134
     abstract public function write_file($arrayofrecords, $outputlangs, $srctemplatepath, $outputdir = '');
135
-	// phpcs:enable
135
+    // phpcs:enable
136 136
 
137 137
     /**
138 138
      * Output a sticker on page at position _COUNTX, _COUNTY (_COUNTX and _COUNTY start from 0)
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
      */
145 145
     abstract public function addSticker(&$pdf, $outputlangs, $param);
146 146
 
147
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
147
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
148 148
     /**
149 149
      * Methode qui permet de modifier la taille des caracteres
150 150
      * Cela modiera aussi l'espace entre chaque ligne
@@ -155,7 +155,7 @@  discard block
 block discarded – undo
155 155
      */
156 156
     public function Set_Char_Size(&$pdf, $pt)
157 157
     {
158
-		// phpcs:enable
158
+        // phpcs:enable
159 159
         if ($pt > 3) {
160 160
             $this->_Char_Size = $pt;
161 161
             $this->_Line_Height = $this->_Get_Height_Chars($pt);
@@ -163,8 +163,8 @@  discard block
 block discarded – undo
163 163
         }
164 164
     }
165 165
 
166
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
167
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
166
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
167
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
168 168
     /**
169 169
      * protected Print dot line
170 170
      *
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
      */
180 180
     protected function _Pointille(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $nbPointilles = 15)
181 181
     {
182
-		// phpcs:enable
182
+        // phpcs:enable
183 183
         $pdf->SetLineWidth($epaisseur);
184 184
         $length = abs($x1 - $x2);
185 185
         $hauteur = abs($y1 - $y2);
@@ -210,8 +210,8 @@  discard block
 block discarded – undo
210 210
         }
211 211
     }
212 212
 
213
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
214
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
213
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
214
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
215 215
     /**
216 216
      * protected Function realisant une croix aux 4 coins des cartes
217 217
      *
@@ -228,7 +228,7 @@  discard block
 block discarded – undo
228 228
      */
229 229
     protected function _Croix(&$pdf, $x1 = 0, $y1 = 0, $x2 = 210, $y2 = 297, $epaisseur = 1, $taille = 4)
230 230
     {
231
-		// phpcs:enable
231
+        // phpcs:enable
232 232
         $pdf->SetDrawColor(192, 192, 192);
233 233
 
234 234
         $pdf->SetLineWidth($epaisseur);
@@ -271,8 +271,8 @@  discard block
 block discarded – undo
271 271
         return $value;
272 272
     }
273 273
 
274
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
275
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
274
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
275
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
276 276
     /**
277 277
      * protected Give the height for a char size given.
278 278
      *
@@ -281,7 +281,7 @@  discard block
 block discarded – undo
281 281
      */
282 282
     protected function _Get_Height_Chars($pt)
283 283
     {
284
-		// phpcs:enable
284
+        // phpcs:enable
285 285
         // Array for link between height of characters and space between lines
286 286
         $_Table_Hauteur_Chars = array(6 => 2, 7 => 2.5, 8 => 3, 9 => 3.5, 10 => 4, 11 => 6, 12 => 7, 13 => 8, 14 => 9, 15 => 10);
287 287
         if (in_array($pt, array_keys($_Table_Hauteur_Chars))) {
@@ -291,8 +291,8 @@  discard block
 block discarded – undo
291 291
         }
292 292
     }
293 293
 
294
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
295
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
294
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
295
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
296 296
     /**
297 297
      * protected Set format
298 298
      *
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
      */
303 303
     protected function _Set_Format(&$pdf, $format)
304 304
     {
305
-		// phpcs:enable
305
+        // phpcs:enable
306 306
         $this->_Metric = $format['metric'];
307 307
         $this->_Avery_Name = $format['name'];
308 308
         $this->_Avery_Code = empty($format['code']) ? '' : $format['code'];
Please login to merge, or discard this patch.
htdocs/core/class/extralanguages.class.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.
htdocs/core/class/CSMSFile.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -222,7 +222,7 @@  discard block
 block discarded – undo
222 222
     }
223 223
 
224 224
 
225
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
225
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
226 226
     /**
227 227
      *  Write content of a SendSms request into a dump file (mode = all)
228 228
      *  Used for debugging.
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
      */
232 232
     public function dump_sms()
233 233
     {
234
-		// phpcs:enable
234
+        // phpcs:enable
235 235
         global $conf, $dolibarr_main_data_root;
236 236
 
237 237
         if (@is_writable($dolibarr_main_data_root)) {   // Avoid fatal error on fopen with open_basedir
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
         }
253 253
     }
254 254
 
255
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
255
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
256 256
     /**
257 257
      *  Write content of a SendSms result into a dump file (mode = all)
258 258
      *  Used for debugging.
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
      */
263 263
     public function dump_sms_result($result)
264 264
     {
265
-		// phpcs:enable
265
+        // phpcs:enable
266 266
         global $dolibarr_main_data_root;
267 267
 
268 268
         if (@is_writable($dolibarr_main_data_root)) {    // Avoid fatal error on fopen with open_basedir
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -150,10 +150,10 @@  discard block
 block discarded – undo
150 150
         if (!getDolGlobalString('MAIN_DISABLE_ALL_SMS')) {
151 151
             // Action according to the chose sending method
152 152
             if (getDolGlobalString('MAIN_SMS_SENDMODE')) {
153
-                $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE');    // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
154
-                $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode);  // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
153
+                $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
154
+                $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
155 155
                 if ($classmoduleofsender == 'ovh') {
156
-                    $classmoduleofsender = 'ovhsms@ovh';    // For backward compatibility
156
+                    $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility
157 157
                 }
158 158
 
159 159
                 $tmp = explode('@', $classmoduleofsender);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
                 // Send sms method not correctly defined
210 210
                 // --------------------------------------
211 211
                 $this->error = 'Bad value for MAIN_SMS_SENDMODE constant';
212
-                $res = false;  // @phan-suppress-current-line PhanPluginRedundantAssignment
212
+                $res = false; // @phan-suppress-current-line PhanPluginRedundantAssignment
213 213
             }
214 214
         } else {
215 215
             $this->error = 'No sms sent. Feature is disabled by option MAIN_DISABLE_ALL_SMS';
Please login to merge, or discard this patch.
htdocs/core/class/canvas.class.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
         //print ' => template_dir='.$this->template_dir.'<br>';
140 140
     }
141 141
 
142
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
142
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
143 143
     /**
144 144
      *  Shared method for canvas to assign values for templates
145 145
      *
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
      */
151 151
     public function assign_values(&$action = 'view', $id = 0, $ref = '')
152 152
     {
153
-		// phpcs:enable
153
+        // phpcs:enable
154 154
         if (is_object($this->control) && method_exists($this->control, 'assign_values')) {
155 155
             $this->control->assign_values($action, $id, $ref);
156 156
         }
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
         }
177 177
     }
178 178
 
179
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
179
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
180 180
     /**
181 181
      *  Display a canvas page. This will include the template for output.
182 182
      *  Variables used by templates may have been defined or loaded before into the assign_values function.
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
      */
187 187
     public function display_canvas($action)
188 188
     {
189
-		// phpcs:enable
189
+        // phpcs:enable
190 190
         global $db, $conf, $langs, $user, $canvas;
191 191
         global $form, $formfile;
192 192
 
Please login to merge, or discard this patch.
htdocs/core/class/timespent.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -847,7 +847,7 @@  discard block
 block discarded – undo
847 847
         return $this->LibStatut($this->status, $mode);
848 848
     }
849 849
 
850
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
850
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
851 851
     /**
852 852
      *  Return the status
853 853
      *
@@ -857,7 +857,7 @@  discard block
 block discarded – undo
857 857
      */
858 858
     public function LibStatut($status, $mode = 0)
859 859
     {
860
-		// phpcs:enable
860
+        // phpcs:enable
861 861
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
862 862
             global $langs;
863 863
             //$langs->load("timespent@timespent");
Please login to merge, or discard this patch.
htdocs/core/class/doleditor.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
         }
118 118
     }
119 119
 
120
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
120
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
121 121
     /**
122 122
      *  Output edit area inside the HTML stream.
123 123
      *  Output depends on this->tool (fckeditor, ckeditor, textarea, ...)
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
      */
134 134
     public function Create($noprint = 0, $morejs = '', $disallowAnyContent = true, $titlecontent = '', $option = '', $moreparam = '', $morecss = '')
135 135
     {
136
-		// phpcs:enable
136
+        // phpcs:enable
137 137
         global $conf, $langs;
138 138
 
139 139
         $fullpage = false;
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
                     define('REQUIRE_CKEDITOR', '1');
159 159
                 }
160 160
 
161
-                $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa');     // default with ckeditor 4.6 : moono-lisa
161
+                $skin = getDolGlobalString('FCKEDITOR_SKIN', 'moono-lisa'); // default with ckeditor 4.6 : moono-lisa
162 162
 
163 163
                 $pluginstodisable = 'elementspath,save,flash,div,anchor';
164 164
                 if (!getDolGlobalString('FCKEDITOR_ENABLE_SPECIALCHAR')) {
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
                                filebrowserImageWindowWidth : \'900\',
260 260
                                filebrowserImageWindowHeight : \'500\'';
261 261
                 }
262
-                $out .= '	})' . $morejs;    // end CKEditor.replace
262
+                $out .= '	})' . $morejs; // end CKEditor.replace
263 263
                 // Show the CKEditor javascript object once loaded is ready 'For debug)
264 264
                 //$out .= '; CKEDITOR.on(\'instanceReady\', function(ck) { ck.editor.removeMenuItem(\'maximize\'); ck.editor.removeMenuItem(\'Undo\'); ck.editor.removeMenuItem(\'undo\'); console.log(ck.editor); console.log(ck.editor.toolbar[0]); }); ';
265 265
                 $out .= '});' . "\n"; // end document.ready
Please login to merge, or discard this patch.
htdocs/core/class/CMailFile.class.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   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -350,7 +350,7 @@  discard block
 block discarded – undo
350 350
                     }
351 351
                 }
352 352
                 if ($emailtoadd && preg_match('/' . preg_quote($emailtoadd, '/') . '/i', $to)) {
353
-                    $emailtoadd = '';   // Email already in the "To"
353
+                    $emailtoadd = ''; // Email already in the "To"
354 354
                 }
355 355
                 if ($emailtoadd) {
356 356
                     $listofemailstoadd[$key] = $emailtoadd;
@@ -1107,8 +1107,8 @@  discard block
 block discarded – undo
1107 1107
                     }
1108 1108
 
1109 1109
                     $smtperrorcode = 0;
1110
-                    if (! $result) {
1111
-                        $smtperrorcode = $this->smtps->lastretval;  // SMTP error code
1110
+                    if (!$result) {
1111
+                        $smtperrorcode = $this->smtps->lastretval; // SMTP error code
1112 1112
                         dol_syslog("CMailFile::sendfile: mail SMTP error code " . $smtperrorcode, LOG_WARNING);
1113 1113
 
1114 1114
                         if ($smtperrorcode == '421') {  // Try later
@@ -1126,10 +1126,10 @@  discard block
 block discarded – undo
1126 1126
                         }
1127 1127
                     }
1128 1128
 
1129
-                    $result = $this->smtps->getErrors();    // applicative error code (not SMTP error code)
1129
+                    $result = $this->smtps->getErrors(); // applicative error code (not SMTP error code)
1130 1130
                     if (empty($this->error) && empty($result)) {
1131 1131
                         dol_syslog("CMailFile::sendfile: mail end success", LOG_DEBUG);
1132
-                        $res = true;  // @phan-suppress-current-line PhanPluginRedundantAssignment
1132
+                        $res = true; // @phan-suppress-current-line PhanPluginRedundantAssignment
1133 1133
                     } else {
1134 1134
                         if (empty($this->error)) {
1135 1135
                             $this->error = $result;
@@ -1376,7 +1376,7 @@  discard block
 block discarded – undo
1376 1376
 
1377 1377
         if (@is_writable($dolibarr_main_data_root)) {   // Avoid fatal error on fopen with open_basedir
1378 1378
             $outputfile = $dolibarr_main_data_root . "/dolibarr_mail.log";
1379
-            $fp = fopen($outputfile, "w");  // overwrite
1379
+            $fp = fopen($outputfile, "w"); // overwrite
1380 1380
 
1381 1381
             if ($this->sendmode == 'mail') {
1382 1382
                 fwrite($fp, $this->headers);
@@ -1634,7 +1634,7 @@  discard block
 block discarded – undo
1634 1634
             // Similar code to forge a text from html is also in smtps.class.php
1635 1635
             $strContentAltText = preg_replace("/<br\s*[^>]*>/", " ", $strContent);
1636 1636
             // TODO We could replace <img ...> with [Filename.ext] like Gmail do.
1637
-            $strContentAltText = html_entity_decode(strip_tags($strContentAltText));    // Remove any HTML tags
1637
+            $strContentAltText = html_entity_decode(strip_tags($strContentAltText)); // Remove any HTML tags
1638 1638
             $strContentAltText = trim(wordwrap($strContentAltText, 75, !getDolGlobalString('MAIN_FIX_FOR_BUGGED_MTA') ? "\r\n" : "\n"));
1639 1639
 
1640 1640
             // Check if html header already in message, if not complete the message
@@ -2019,7 +2019,7 @@  discard block
 block discarded – undo
2019 2019
                 // We save the image to send in disk
2020 2020
                 $filecontent = $matches[2][$key];
2021 2021
 
2022
-                $cid = 'cid000' . dol_hash($filecontent, 'md5');      // The id must not change if image is same
2022
+                $cid = 'cid000' . dol_hash($filecontent, 'md5'); // The id must not change if image is same
2023 2023
 
2024 2024
                 $destfiletmp = $images_dir . '/' . $cid . '.' . $ext;
2025 2025
 
Please login to merge, or discard this patch.