Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/core/lib/json.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -299,7 +299,7 @@
 block discarded – undo
299 299
     if ($out != '') {
300 300
         try {
301 301
             // @phan-suppress-next-line PhanPluginUnsafeEval
302
-            eval('$array = ' . $out . ';');     // not secured but this is no mode used as php json lib is always expected to be loaded now.
302
+            eval('$array = ' . $out . ';'); // not secured but this is no mode used as php json lib is always expected to be loaded now.
303 303
         } catch (Exception $e) {
304 304
             $array = array();
305 305
         }
Please login to merge, or discard this patch.
public/htdocs/core/lib/website2.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
     if (dol_is_file($filetpl)) {
153 153
         if ($backupold) {
154 154
             $result = archiveOrBackupFile($filetpl);
155
-            if (! $result) {
155
+            if (!$result) {
156 156
                 return false;
157 157
             }
158 158
         } else {
@@ -356,7 +356,7 @@  discard block
 block discarded – undo
356 356
                         $indexcontent .= "	require_once DOL_DOCUMENT_ROOT.'/core/website.inc.php';\n";
357 357
                         $indexcontent .= '	redirectToContainer($_GET[\'pageref\'], $_GET[\'pagealiasalt\'], $_GET[\'pageid\']);' . "\n";
358 358
                         $indexcontent .= "}\n";
359
-                        $indexcontent .= "include_once '" . $relpath . "/" . basename($filetpl) . "'\n";    // use .. instead of .
359
+                        $indexcontent .= "include_once '" . $relpath . "/" . basename($filetpl) . "'\n"; // use .. instead of .
360 360
                         $indexcontent .= '// END PHP ?>' . "\n";
361 361
                         $result = file_put_contents($fileindexsub, $indexcontent);
362 362
                         if ($result === false) {
Please login to merge, or discard this patch.
public/htdocs/core/lib/date.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
 
186 186
         $newtimeyear = (int) dol_print_date($newtime, '%Y');
187 187
         $newtimemonth = (int) dol_print_date($newtime, '%m');
188
-        $newtimetotalmonths = (($newtimeyear * 12) +  $newtimemonth);
188
+        $newtimetotalmonths = (($newtimeyear * 12) + $newtimemonth);
189 189
 
190 190
         if ($monthsexpected < $newtimetotalmonths) {
191 191
             $newtimehours = (int) dol_print_date($newtime, '%H');
Please login to merge, or discard this patch.
public/htdocs/core/lib/sendings.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -249,7 +249,7 @@
 block discarded – undo
249 249
     $sql .= ' p.description as product_desc';
250 250
     $sql .= " FROM " . MAIN_DB_PREFIX . "expeditiondet as ed,";
251 251
     $sql .= " " . MAIN_DB_PREFIX . "expedition as e,";
252
-    $sql .= " " . MAIN_DB_PREFIX . $origin . "det as obj";    // for example llx_commandedet
252
+    $sql .= " " . MAIN_DB_PREFIX . $origin . "det as obj"; // for example llx_commandedet
253 253
     $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "product as p ON obj.fk_product = p.rowid";
254 254
     //TODO Add link to expeditiondet_batch
255 255
     $sql .= " WHERE e.entity IN (" . getEntity('expedition') . ")";
Please login to merge, or discard this patch.
public/htdocs/core/lib/fourn.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -178,10 +178,10 @@
 block discarded – undo
178 178
             $dispachedLines = $object->getDispachedLines(1);
179 179
             $nbDispachedLines = count($dispachedLines);
180 180
 
181
-            for ($line = 0 ; $line < $nbDispachedLines; $line++) {
181
+            for ($line = 0; $line < $nbDispachedLines; $line++) {
182 182
                 $sumQtyAllreadyDispatched = $sumQtyAllreadyDispatched + $dispachedLines[$line]['qty'];
183 183
             }
184
-            for ($line = 0 ; $line < $nbLinesOrdered; $line++) {
184
+            for ($line = 0; $line < $nbLinesOrdered; $line++) {
185 185
                 //If line is a product of conf to manage stocks for services
186 186
                 if ($object->lines[$line]->product_type == 0 || getDolGlobalString('STOCK_SUPPORTS_SERVICES')) {
187 187
                     $sumQtyOrdered = $sumQtyOrdered + $object->lines[$line]->qty;
Please login to merge, or discard this patch.
public/htdocs/core/lib/customreports.lib.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -210,10 +210,10 @@  discard block
 block discarded – undo
210 210
             ) {
211 211
                 continue;
212 212
             }
213
-            if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {
213
+            if (isset($val['enabled']) && !(int) dol_eval($val['enabled'], 1, 1, '1')) {
214 214
                 continue;
215 215
             }
216
-            if (isset($val['visible']) && ! (int) dol_eval($val['visible'], 1, 1, '1')) {
216
+            if (isset($val['visible']) && !(int) dol_eval($val['visible'], 1, 1, '1')) {
217 217
                 continue;
218 218
             }
219 219
             if (preg_match('/^fk_/', $key) && !preg_match('/^fk_statu/', $key)) {
@@ -377,10 +377,10 @@  discard block
 block discarded – undo
377 377
             ) {
378 378
                 continue;
379 379
             }
380
-            if (isset($val['enabled']) && ! (int) dol_eval($val['enabled'], 1, 1, '1')) {
380
+            if (isset($val['enabled']) && !(int) dol_eval($val['enabled'], 1, 1, '1')) {
381 381
                 continue;
382 382
             }
383
-            if (isset($val['visible']) && ! (int) dol_eval($val['visible'], 1, 1, '1')) {
383
+            if (isset($val['visible']) && !(int) dol_eval($val['visible'], 1, 1, '1')) {
384 384
                 continue;
385 385
             }
386 386
             if (preg_match('/^fk_/', $key) && !preg_match('/^fk_statu/', $key)) {
Please login to merge, or discard this patch.
public/htdocs/core/lib/invoice.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
             } else {
144 144
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
145 145
             }
146
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
146
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
147 147
         }
148 148
 
149 149
         $head[$h][1] .= '/';
@@ -285,7 +285,7 @@  discard block
 block discarded – undo
285 285
             } else {
286 286
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
287 287
             }
288
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
288
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
289 289
         }
290 290
 
291 291
         $head[$h][1] .= '/';
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 $dolgraph->setShowPercent(1);
454 454
                 $dolgraph->SetType(array('bars', 'bars', 'bars', 'bars', 'bars', 'bars'));
455 455
                 //$dolgraph->SetType(array('pie'));
456
-                $dolgraph->setHeight('160');    /* 160 min is required to show the 6 lines of legend */
456
+                $dolgraph->setHeight('160'); /* 160 min is required to show the 6 lines of legend */
457 457
                 $dolgraph->setWidth('450');
458 458
                 $dolgraph->setHideXValues(true);
459 459
                 if ($mode == 'customers') {
Please login to merge, or discard this patch.
public/htdocs/core/lib/files.lib.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
             'types' => $types,
118 118
             'recursive' => $recursive,
119 119
             'filter' => $filter,
120
-            'excludefilter' => $exclude_array,  // Already converted to array.
120
+            'excludefilter' => $exclude_array, // Already converted to array.
121 121
             'sortcriteria' => $sortcriteria,
122 122
             'sortorder' => $sortorder,
123 123
             'loaddate' => $loaddate,
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
                 $qualified = 1;
153 153
 
154
-                $utf8_fullpathfile = "$utf8_path/$utf8_file";  // Temp variable for speed
154
+                $utf8_fullpathfile = "$utf8_path/$utf8_file"; // Temp variable for speed
155 155
 
156 156
                 // Check if file is qualified
157 157
                 foreach ($excludefilterarray as $filt) {
@@ -1955,7 +1955,7 @@  discard block
 block discarded – undo
1955 1955
                     $maxwidthmini = $tmparraysize['maxwidthmini'];
1956 1956
                     $maxheightmini = $tmparraysize['maxheightmini'];
1957 1957
                     //$quality = $tmparraysize['quality'];
1958
-                    $quality = 50;  // For thumbs, we force quality to 50
1958
+                    $quality = 50; // For thumbs, we force quality to 50
1959 1959
 
1960 1960
                     // Generate thumbs.
1961 1961
                     if ($generatethumbs) {
@@ -2383,9 +2383,9 @@  discard block
 block discarded – undo
2383 2383
                     // Skip directories (they would be added automatically)
2384 2384
                     if (!$file->isDir()) {
2385 2385
                         // Get real and relative path for current file
2386
-                        $filePath = $file->getPath();               // the full path with filename using the $inputdir root.
2386
+                        $filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2387 2387
                         $fileName = $file->getFilename();
2388
-                        $fileFullRealPath = $file->getRealPath();   // the full path with name and transformed to use real path directory.
2388
+                        $fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2389 2389
 
2390 2390
                         //$relativePath = substr($fileFullRealPath, strlen($rootPath) + 1);
2391 2391
                         $relativePath = substr(($filePath ? $filePath . '/' : '') . $fileName, strlen($rootPath) + 1);
@@ -2656,9 +2656,9 @@  discard block
 block discarded – undo
2656 2656
                     // Skip directories (they would be added automatically)
2657 2657
                     if (!$file->isDir()) {
2658 2658
                         // Get real and relative path for current file
2659
-                        $filePath = $file->getPath();               // the full path with filename using the $inputdir root.
2659
+                        $filePath = $file->getPath(); // the full path with filename using the $inputdir root.
2660 2660
                         $fileName = $file->getFilename();
2661
-                        $fileFullRealPath = $file->getRealPath();   // the full path with name and transformed to use real path directory.
2661
+                        $fileFullRealPath = $file->getRealPath(); // the full path with name and transformed to use real path directory.
2662 2662
 
2663 2663
                         //$relativePath = ($rootdirinzip ? $rootdirinzip.'/' : '').substr($fileFullRealPath, strlen($inputdir) + 1);
2664 2664
                         $relativePath = ($rootdirinzip ? $rootdirinzip . '/' : '') . substr(($filePath ? $filePath . '/' : '') . $fileName, strlen($inputdir) + 1);
Please login to merge, or discard this patch.
public/htdocs/core/lib/xcal.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
                     // the default behaviour but there is no way to change keeping old saved date compatible.
211 211
                     $tzforfullday = getDolGlobalString('MAIN_STORE_FULL_EVENT_IN_GMT');
212 212
                     // Local time should be used to prevent users in time zones earlier than GMT from being one day earlier
213
-                    $prefix     = ";VALUE=DATE";
213
+                    $prefix = ";VALUE=DATE";
214 214
                     if ($tzforfullday) {
215 215
                         $startdatef = dol_print_date($startdate, "dayxcard", 'gmt');
216 216
                     } else {
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                 $enddatef = dol_print_date($enddate, "dayhourxcard", 'gmt');
239 239
 
240 240
                 if ($fulldayevent) {
241
-                    $prefix   = ";VALUE=DATE";
241
+                    $prefix = ";VALUE=DATE";
242 242
                     // We add 1 second so we reach the +1 day needed for full day event (DTEND must be next day after event)
243 243
                     // This is mention in https://datatracker.ietf.org/doc/html/rfc5545:
244 244
                     // "The "DTEND" property for a "VEVENT" calendar component specifies the non-inclusive end of the event."
Please login to merge, or discard this patch.