Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
Dolibarr/Code/Core/Classes/FormSms.php 1 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/Translate.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -319,7 +319,7 @@  discard block
 block discarded – undo
319 319
             $file_lang_osencoded = dol_osencode($file_lang);
320 320
 
321 321
             //$filelangexists = is_file($file_lang_osencoded);
322
-            $filelangexists = @is_file($file_lang_osencoded);   // avoid [php:warn]
322
+            $filelangexists = @is_file($file_lang_osencoded); // avoid [php:warn]
323 323
 
324 324
             //dol_syslog(get_class($this).'::Load Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' file_lang='.$file_lang." => filelangexists=".$filelangexists);
325 325
             //print 'Try to read for alt='.$alt.' langofdir='.$langofdir.' domain='.$domain.' newdomain='.$newdomain.' modulename='.$modulename.' this->_tab_loaded[newdomain]='.$this->_tab_loaded[$newdomain].' file_lang='.$file_lang." => filelangexists=".$filelangexists."\n";
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
                 if ($obj) {
1187 1187
                     // If a translation exists, we use it lese we use the default label
1188 1188
                     $this->cache_currencies[$obj->code_iso]['label'] = ($obj->code_iso && $this->trans("Currency" . $obj->code_iso) != "Currency" . $obj->code_iso ? $this->trans("Currency" . $obj->code_iso) : ($obj->label != '-' ? $obj->label : ''));
1189
-                    $this->cache_currencies[$obj->code_iso]['unicode'] = (array)json_decode((empty($obj->unicode) ? '' : $obj->unicode), true);
1189
+                    $this->cache_currencies[$obj->code_iso]['unicode'] = (array) json_decode((empty($obj->unicode) ? '' : $obj->unicode), true);
1190 1190
                     $label[$obj->code_iso] = $this->cache_currencies[$obj->code_iso]['label'];
1191 1191
                 }
1192 1192
                 $i++;
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/FormActions.php 1 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 1 patch
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.
Dolibarr/Code/Core/Classes/CMailFile.php 1 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 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -166,8 +166,8 @@  discard block
 block discarded – undo
166 166
     public $posxlabel;
167 167
     public $posxup;
168 168
     public $posxref;
169
-    public $posxpicture;    // For picture
170
-    public $posxdesc;       // For description
169
+    public $posxpicture; // For picture
170
+    public $posxdesc; // For description
171 171
     public $posxqty;
172 172
     public $posxpuht;
173 173
     public $posxtva;
@@ -546,7 +546,7 @@  discard block
 block discarded – undo
546 546
 
547 547
         if (get_class($object) == 'CommandeFournisseur') {
548 548
             /** @var CommandeFournisseur $object*/
549
-            $object->date_validation =  $object->date_valid;
549
+            $object->date_validation = $object->date_valid;
550 550
             $object->date_commande = $object->date;
551 551
         }
552 552
         $resarray = array(
@@ -1500,7 +1500,7 @@  discard block
 block discarded – undo
1500 1500
                  * @param stdClass $b
1501 1501
                  * @return int<-1,1>
1502 1502
                  */
1503
-                static function ($a, $b) {
1503
+                static function($a, $b) {
1504 1504
                     return  ($a->rank > $b->rank) ? 1 : -1;
1505 1505
                 }
1506 1506
             );
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/CGenericDic.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@
 block discarded – undo
37 37
     /**
38 38
      * @var string Id to identify managed objects
39 39
      */
40
-    public $element = 'undefined';  // Will be defined into constructor
40
+    public $element = 'undefined'; // Will be defined into constructor
41 41
 
42 42
     /**
43 43
      * @var string Name of table without prefix where object is stored
44 44
      */
45
-    public $table_element = 'undefined';    // Will be defined into constructor
45
+    public $table_element = 'undefined'; // Will be defined into constructor
46 46
 
47 47
     /**
48 48
      * @var CtyperesourceLine[] Lines
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/lessc_formatter_classic.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@  discard block
 block discarded – undo
88 88
 
89 89
 	public function property($name, $value)
90 90
 	{
91
-		return $name.$this->assignSeparator.$value.";";
91
+		return $name . $this->assignSeparator . $value . ";";
92 92
 	}
93 93
 
94 94
 	protected function isEmpty($block)
@@ -120,25 +120,25 @@  discard block
 block discarded – undo
120 120
 			$this->indentLevel++;
121 121
 
122 122
 			if ($this->breakSelectors) {
123
-				$selectorSeparator = $this->selectorSeparator.$this->break.$pre;
123
+				$selectorSeparator = $this->selectorSeparator . $this->break . $pre;
124 124
 			} else {
125 125
 				$selectorSeparator = $this->selectorSeparator;
126 126
 			}
127 127
 
128
-			echo $pre.
128
+			echo $pre .
129 129
 				implode($selectorSeparator, $block->selectors);
130 130
 			if ($isSingle) {
131 131
 				echo $this->openSingle;
132 132
 				$inner = "";
133 133
 			} else {
134
-				echo $this->open.$this->break;
134
+				echo $this->open . $this->break;
135 135
 				$inner = $this->indentStr();
136 136
 			}
137 137
 		}
138 138
 
139 139
 		if (!empty($block->lines)) {
140
-			$glue = $this->break.$inner;
141
-			echo $inner.implode($glue, $block->lines);
140
+			$glue = $this->break . $inner;
141
+			echo $inner . implode($glue, $block->lines);
142 142
 			if (!$isSingle && !empty($block->children)) {
143 143
 				echo $this->break;
144 144
 			}
@@ -154,9 +154,9 @@  discard block
 block discarded – undo
154 154
 			}
155 155
 
156 156
 			if ($isSingle) {
157
-				echo $this->closeSingle.$this->break;
157
+				echo $this->closeSingle . $this->break;
158 158
 			} else {
159
-				echo $pre.$this->close.$this->break;
159
+				echo $pre . $this->close . $this->break;
160 160
 			}
161 161
 
162 162
 			$this->indentLevel--;
Please login to merge, or discard this patch.
Dolibarr/Code/Core/Classes/CSMSFile.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -154,10 +154,10 @@
 block discarded – undo
154 154
         if (!getDolGlobalString('MAIN_DISABLE_ALL_SMS')) {
155 155
             // Action according to the chose sending method
156 156
             if (getDolGlobalString('MAIN_SMS_SENDMODE')) {
157
-                $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE');    // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
158
-                $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode);  // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
157
+                $sendmode = getDolGlobalString('MAIN_SMS_SENDMODE'); // $conf->global->MAIN_SMS_SENDMODE looks like a value 'module'
158
+                $classmoduleofsender = getDolGlobalString('MAIN_MODULE_' . strtoupper($sendmode) . '_SMS', $sendmode); // $conf->global->MAIN_MODULE_XXX_SMS looks like a value 'class@module'
159 159
                 if ($classmoduleofsender == 'ovh') {
160
-                    $classmoduleofsender = 'ovhsms@ovh';    // For backward compatibility
160
+                    $classmoduleofsender = 'ovhsms@ovh'; // For backward compatibility
161 161
                 }
162 162
 
163 163
                 $tmp = explode('@', $classmoduleofsender);
Please login to merge, or discard this patch.