Passed
Push — GENERAL_BUG_REVIEW_240911 ( 776d89...c757bd )
by Rafael
50:33
created
public/htdocs/core/lib/company.lib.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
                 $nbContact = $obj->nb;
86 86
             }
87 87
 
88
-            dol_setcache($cachekey, $nbContact, 120);   // If setting cache fails, this is not a problem, so we do not test result.
88
+            dol_setcache($cachekey, $nbContact, 120); // If setting cache fails, this is not a problem, so we do not test result.
89 89
         }
90 90
 
91 91
         $head[$h][0] = constant('BASE_URL') . '/societe/contact.php?socid=' . $object->id;
@@ -164,7 +164,7 @@  discard block
 block discarded – undo
164 164
             } else {
165 165
                 dol_print_error($db);
166 166
             }
167
-            dol_setcache($cachekey, $nbProject, 120);   // If setting cache fails, this is not a problem, so we do not test result.
167
+            dol_setcache($cachekey, $nbProject, 120); // If setting cache fails, this is not a problem, so we do not test result.
168 168
         }
169 169
         $head[$h][0] = constant('BASE_URL') . '/societe/project.php?socid=' . $object->id;
170 170
         $head[$h][1] = $langs->trans("Projects");
@@ -330,7 +330,7 @@  discard block
 block discarded – undo
330 330
             } else {
331 331
                 dol_print_error($db);
332 332
             }
333
-            dol_setcache($cachekey, $nbTicket, 120);        // If setting cache fails, this is not a problem, so we do not test result.
333
+            dol_setcache($cachekey, $nbTicket, 120); // If setting cache fails, this is not a problem, so we do not test result.
334 334
         }
335 335
 
336 336
         $head[$h][0] = constant('BASE_URL') . '/ticket/list.php?socid=' . urlencode((string) ($object->id));
@@ -376,7 +376,7 @@  discard block
 block discarded – undo
376 376
                 } else {
377 377
                     dol_print_error($db);
378 378
                 }
379
-                dol_setcache($cachekey, $nbNotif, 120);     // If setting cache fails, this is not a problem, so we do not test result.
379
+                dol_setcache($cachekey, $nbNotif, 120); // If setting cache fails, this is not a problem, so we do not test result.
380 380
             }
381 381
 
382 382
             $head[$h][0] = constant('BASE_URL') . '/societe/notify/card.php?socid=' . urlencode((string) ($object->id));
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
             $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
420 420
             $nbLinks = Link::count($db, $object->element, $object->id);
421 421
             $totalAttached = $nbFiles + $nbLinks;
422
-            dol_setcache($cachekey, $totalAttached, 120);       // If setting cache fails, this is not a problem, so we do not test result.
422
+            dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
423 423
         }
424 424
 
425 425
         $head[$h][0] = constant('BASE_URL') . '/societe/document.php?socid=' . $object->id;
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
             } else {
454 454
                 dol_syslog('Failed to count actioncomm ' . $db->lasterror(), LOG_ERR);
455 455
             }
456
-            dol_setcache($cachekey, $nbEvent, 120);     // If setting cache fails, this is not a problem, so we do not test result.
456
+            dol_setcache($cachekey, $nbEvent, 120); // If setting cache fails, this is not a problem, so we do not test result.
457 457
         }
458 458
 
459 459
         $head[$h][1] .= '/';
@@ -854,7 +854,7 @@  discard block
 block discarded – undo
854 854
         return false;
855 855
     }
856 856
 
857
-    $country_code_in_EEC = getCountriesInEEC();     // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
857
+    $country_code_in_EEC = getCountriesInEEC(); // This make a database call but there is a cache done into $conf->cache['country_code_in_EEC']
858 858
 
859 859
     //print "dd".$object->country_code;
860 860
     return in_array($object->country_code, $country_code_in_EEC);
@@ -1300,7 +1300,7 @@  discard block
 block discarded – undo
1300 1300
     $mode = 'view';
1301 1301
 
1302 1302
     $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1303
-    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1303
+    $htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1304 1304
     $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1305 1305
     $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
1306 1306
 
@@ -1846,7 +1846,7 @@  discard block
 block discarded – undo
1846 1846
 
1847 1847
         // Fields from hook
1848 1848
         $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1849
-        $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters);    // Note that $action and $object may have been modified by hook
1849
+        $reshook = $hookmanager->executeHooks('showActionsDoneListSelect', $parameters); // Note that $action and $object may have been modified by hook
1850 1850
         if (!empty($hookmanager->resPrint)) {
1851 1851
             $sql .= $hookmanager->resPrint;
1852 1852
         }
@@ -1868,7 +1868,7 @@  discard block
 block discarded – undo
1868 1868
 
1869 1869
         // Fields from hook
1870 1870
         $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon);
1871
-        $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters);    // Note that $action and $object may have been modified by hook
1871
+        $reshook = $hookmanager->executeHooks('showActionsDoneListFrom', $parameters); // Note that $action and $object may have been modified by hook
1872 1872
         if (!empty($hookmanager->resPrint)) {
1873 1873
             $sql .= $hookmanager->resPrint;
1874 1874
         }
@@ -1993,7 +1993,7 @@  discard block
 block discarded – undo
1993 1993
 
1994 1994
         // Fields from hook
1995 1995
         $parameters = array('sql' => &$sql, 'filterobj' => $filterobj, 'objcon' => $objcon, 'module' => $module);
1996
-        $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters);    // Note that $action and $object may have been modified by hook
1996
+        $reshook = $hookmanager->executeHooks('showActionsDoneListWhere', $parameters); // Note that $action and $object may have been modified by hook
1997 1997
         if (!empty($hookmanager->resPrint)) {
1998 1998
             $sql .= $hookmanager->resPrint;
1999 1999
         }
@@ -2693,14 +2693,14 @@  discard block
 block discarded – undo
2693 2693
         $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORM_' . $suffix;
2694 2694
         if (getDolGlobalString($parammessageform) !== '') {
2695 2695
             print $langs->transnoentities(getDolGlobalString($parammessageform));
2696
-        } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM')  !== '') {
2696
+        } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM') !== '') {
2697 2697
             print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORM'));
2698 2698
         }
2699 2699
 
2700 2700
         // Add other message if VAT exists
2701 2701
         if (!empty($object->total_vat) || !empty($object->total_tva)) {
2702 2702
             $parammessageform = 'ONLINE_PAYMENT_MESSAGE_FORMIFVAT_' . $suffix;
2703
-            if (getDolGlobalString($parammessageform)  !== '') {
2703
+            if (getDolGlobalString($parammessageform) !== '') {
2704 2704
                 print $langs->transnoentities(getDolGlobalString($parammessageform));
2705 2705
             } elseif (getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT') !== '') {
2706 2706
                 print $langs->transnoentities(getDolGlobalString('ONLINE_PAYMENT_MESSAGE_FORMIFVAT'));
Please login to merge, or discard this patch.
public/htdocs/core/lib/price.lib.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -414,9 +414,9 @@
 block discarded – undo
414 414
 
415 415
         if ($multicurrency_code) {
416 416
             // Restore setup of currency accurency
417
-            $conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
418
-            $conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
419
-            $conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT;  // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
417
+            $conf->global->MAIN_MAX_DECIMALS_UNIT = $savMAIN_MAX_DECIMALS_UNIT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
418
+            $conf->global->MAIN_MAX_DECIMALS_TOT = $savMAIN_MAX_DECIMALS_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
419
+            $conf->global->MAIN_ROUNDING_RULE_TOT = $savMAIN_ROUNDING_RULE_TOT; // @phan-suppress-current-line PhanPossiblyUndeclaredVariable
420 420
         }
421 421
 
422 422
         $result[16] = $newresult[0];
Please login to merge, or discard this patch.
public/htdocs/core/lib/geturl.lib.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
     // Turning on or off the ssl target certificate
82 82
     if ($ssl_verifypeer < 0) {
83 83
         global $dolibarr_main_prod;
84
-        $ssl_verifypeer =  ($dolibarr_main_prod ? true : false);
84
+        $ssl_verifypeer = ($dolibarr_main_prod ? true : false);
85 85
     }
86 86
     if (getDolGlobalString('MAIN_CURL_DISABLE_VERIFYPEER')) {
87 87
         $ssl_verifypeer = 0;
Please login to merge, or discard this patch.
public/htdocs/core/lib/parsemd.lib.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
     $content = preg_replace('/<a href="([^"]+)" target="([^"]+)">([^<]+)<\/a>/', '[\3](\1)', $content);
40 40
 
41 41
     // Replace HTML comments
42
-    $content = preg_replace('/<!--.*-->/Ums', '', $content);    // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true.
42
+    $content = preg_replace('/<!--.*-->/Ums', '', $content); // We remove HTML comment that are not MD comment because they will be escaped and output when setSafeMode is set to true.
43 43
 
44 44
     if (is_array($replaceimagepath)) {
45 45
         foreach ($replaceimagepath as $key => $val) {
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
     if ($parser == 'parsedown') {
52 52
         include_once DOL_DOCUMENT_ROOT . '/includes/parsedown/Parsedown.php';
53 53
         $parsedown = new Parsedown();
54
-        $parsedown->setSafeMode(true);      // This will escape HTML link <a href=""> into html entities but markdown links are ok
54
+        $parsedown->setSafeMode(true); // This will escape HTML link <a href=""> into html entities but markdown links are ok
55 55
 
56 56
         // Because HTML will be HTML entity encoded, we replace tag we want to keep
57 57
         $content = preg_replace('/<span style="([^"]+)">/', '<!-- SPAN_STYLE_\1 -->', $content);
Please login to merge, or discard this patch.
public/htdocs/core/lib/project.lib.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
         $nbContacts = $dataretrieved;
62 62
     } else {
63 63
         $nbContacts = count($project->liste_contact(-1, 'internal')) + count($project->liste_contact(-1, 'external'));
64
-        dol_setcache($cachekey, $nbContacts, 120);  // If setting cache fails, this is not a problem, so we do not test result.
64
+        dol_setcache($cachekey, $nbContacts, 120); // If setting cache fails, this is not a problem, so we do not test result.
65 65
     }
66 66
     $head[$h][0] = constant('BASE_URL') . '/projet/contact.php?id=' . ((int) $project->id) . ($moreparam ? '&' . $moreparam : '');
67 67
     $head[$h][1] = $langs->trans("ProjectContact");
@@ -206,7 +206,7 @@  discard block
 block discarded – undo
206 206
             if (isModEnabled("bank")) {
207 207
                 $nbElements += $project->getElementCount('variouspayment', 'payment_various');
208 208
             }
209
-            dol_setcache($cachekey, $nbElements, 120);  // If setting cache fails, this is not a problem, so we do not test result.
209
+            dol_setcache($cachekey, $nbElements, 120); // If setting cache fails, this is not a problem, so we do not test result.
210 210
         }
211 211
         $head[$h][0] = constant('BASE_URL') . '/projet/element.php?id=' . $project->id;
212 212
         $head[$h][1] = $langs->trans("ProjectOverview");
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
             } else {
254 254
                 $nbConfOrBooth = count($result);
255 255
             }
256
-            dol_setcache($cachekey, $nbConfOrBooth, 120);   // If setting cache fails, this is not a problem, so we do not test result.
256
+            dol_setcache($cachekey, $nbConfOrBooth, 120); // If setting cache fails, this is not a problem, so we do not test result.
257 257
         }
258 258
         $cachekey = 'count_attendees_' . $project->id;
259 259
         $dataretrieved = dol_getcache($cachekey);
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
         $nbFiles = count(dol_dir_list($upload_dir, 'files', 0, '', '(\.meta|_preview.*\.png)$'));
322 322
         $nbLinks = Link::count($db, $project->element, $project->id);
323 323
         $totalAttached = $nbFiles + $nbLinks;
324
-        dol_setcache($cachekey, $totalAttached, 120);       // If setting cache fails, this is not a problem, so we do not test result.
324
+        dol_setcache($cachekey, $totalAttached, 120); // If setting cache fails, this is not a problem, so we do not test result.
325 325
     }
326 326
     $head[$h][0] = constant('BASE_URL') . '/projet/document.php?id=' . $project->id;
327 327
     $head[$h][1] = $langs->trans('Documents');
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
             $nbComments = $dataretrieved;
343 343
         } else {
344 344
             $nbComments = $project->getNbComments();
345
-            dol_setcache($cachekey, $nbComments, 120);      // If setting cache fails, this is not a problem, so we do not test result.
345
+            dol_setcache($cachekey, $nbComments, 120); // If setting cache fails, this is not a problem, so we do not test result.
346 346
         }
347 347
         $head[$h][0] = constant('BASE_URL') . '/projet/comment.php?id=' . $project->id;
348 348
         $head[$h][1] = $langs->trans("CommentLink");
@@ -688,7 +688,7 @@  discard block
 block discarded – undo
688 688
                 $taskstatic->label = (!empty($taskrole[$lines[$i]->id]) ? $langs->trans("YourRole") . ': ' . $taskrole[$lines[$i]->id] : '');
689 689
                 $taskstatic->projectstatus = $lines[$i]->projectstatus;
690 690
                 $taskstatic->progress = $lines[$i]->progress;
691
-                $taskstatic->fk_statut = $lines[$i]->status;    // deprecated
691
+                $taskstatic->fk_statut = $lines[$i]->status; // deprecated
692 692
                 $taskstatic->status = $lines[$i]->status;
693 693
                 $taskstatic->date_start = $lines[$i]->date_start;
694 694
                 $taskstatic->date_end = $lines[$i]->date_end;
@@ -2104,7 +2104,7 @@  discard block
 block discarded – undo
2104 2104
 
2105 2105
                     $disabledtaskday = $disabledtask;
2106 2106
 
2107
-                    if (! $disabledtask && $restrictBefore && $tmpday < $restrictBefore) {
2107
+                    if (!$disabledtask && $restrictBefore && $tmpday < $restrictBefore) {
2108 2108
                         $disabledtaskday = 1;
2109 2109
                     }
2110 2110
 
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
                 $j = 0;
2389 2389
                 foreach ($TWeek as $weekIndex => $weekNb) {
2390 2390
                     $j++;
2391
-                    $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0 ;
2391
+                    $weekWorkLoad = !empty($projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id]) ? $projectstatic->monthWorkLoadPerTask[$weekNb][$lines[$i]->id] : 0;
2392 2392
                     if (!isset($totalforeachweek[$weekNb])) {
2393 2393
                         $totalforeachweek[$weekNb] = 0;
2394 2394
                     }
@@ -2403,7 +2403,7 @@  discard block
 block discarded – undo
2403 2403
                     $disabledtaskweek = $disabledtask;
2404 2404
                     $firstdayofweek = dol_mktime(0, 0, 0, $month, $TFirstDay[$weekIndex], $year);
2405 2405
 
2406
-                    if (! $disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) {
2406
+                    if (!$disabledtask && $restrictBefore && $firstdayofweek < $restrictBefore) {
2407 2407
                         $disabledtaskweek = 1;
2408 2408
                     }
2409 2409
 
Please login to merge, or discard this patch.
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.