Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/projet/tasks/list.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 $search_date_endday = GETPOSTINT('search_date_endday');
97 97
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
98 98
 $search_date_endyear = GETPOSTINT('search_date_endyear');
99
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
99
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
100 100
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
101 101
 $search_datelimit_startday = GETPOSTINT('search_datelimit_startday');
102 102
 $search_datelimit_startmonth = GETPOSTINT('search_datelimit_startmonth');
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
 $object->fields = dol_sort_array($object->fields, 'position');
188 188
 $arrayfields = dol_sort_array($arrayfields, 'position');
189
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
189
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
190 190
 
191 191
 $permissiontoread = $user->hasRight('projet', 'lire');
192 192
 $permissiontocreate = $user->hasRight('projet', 'creer');
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 // Direct jump if only one record found
590 590
 if ($num == 1 && getDolGlobalString('MAIN_SEARCH_DIRECT_OPEN_IF_ONLY_ONE') && $search_all) {
591 591
     $obj = $db->fetch_object($resql);
592
-    $id = $obj->id;     // in select, task id has been aliases into 'id'
592
+    $id = $obj->id; // in select, task id has been aliases into 'id'
593 593
     header("Location: " . constant('BASE_URL') . '/projet/tasks/task.php?id=' . $id . '&withproject=1');
594 594
     exit;
595 595
 }
@@ -598,7 +598,7 @@  discard block
 block discarded – undo
598 598
 // Output page
599 599
 // --------------------------------------------------------------------
600 600
 
601
-llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist');   // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
601
+llxHeader('', $title, $help_url, '', 0, 0, $morejs, $morecss, '', 'bodyforlist'); // Can use also classforhorizontalscrolloftabs instead of bodyforlist for no horizontal scroll
602 602
 
603 603
 $arrayofselected = is_array($toselect) ? $toselect : array();
604 604
 
@@ -837,7 +837,7 @@  discard block
 block discarded – undo
837 837
 }
838 838
 
839 839
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
840
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
840
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
841 841
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
842 842
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
843 843
 
Please login to merge, or discard this patch.
public/htdocs/projet/tasks/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 
126 126
 $title = $object->ref . ' - ' . $langs->trans("Documents");
127 127
 if (!empty($withproject)) {
128
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
128
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
129 129
 }
130 130
 $help_url = '';
131 131
 
Please login to merge, or discard this patch.
public/htdocs/projet/tasks/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -119,7 +119,7 @@
 block discarded – undo
119 119
 
120 120
 $title = $object->ref . ' - ' . $langs->trans("Notes");
121 121
 if (!empty($withproject)) {
122
-    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '')  ;
122
+    $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '');
123 123
 }
124 124
 $help_url = '';
125 125
 
Please login to merge, or discard this patch.
public/htdocs/projet/class/api_tasks.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -466,7 +466,7 @@
 block discarded – undo
466 466
             }
467 467
             if ($field == 'array_options' && is_array($value)) {
468 468
                 foreach ($value as $index => $val) {
469
-                    $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);;
469
+                    $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task); ;
470 470
                 }
471 471
                 continue;
472 472
             }
Please login to merge, or discard this patch.
public/htdocs/projet/class/projectstats.class.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -331,7 +331,7 @@  discard block
 block discarded – undo
331 331
         if ($foundintocache) {    // Cache file found and is not too old
332 332
             dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . ".");
333 333
             $data = json_decode(file_get_contents($newpathofdestfile), true);
334
-            '@phan-var-force array $data';  // Phan can not interpret json_decode
334
+            '@phan-var-force array $data'; // Phan can not interpret json_decode
335 335
         } else {
336 336
             $year = $startyear;
337 337
             while ($year <= $endyear) {
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
         if ($foundintocache) { // Cache file found and is not too old
443 443
             dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . ".");
444 444
             $data = json_decode(file_get_contents($newpathofdestfile), true);
445
-            '@phan-var-force array $data';  // Phan can not interpret json_decode
445
+            '@phan-var-force array $data'; // Phan can not interpret json_decode
446 446
         } else {
447 447
             $year = $startyear;
448 448
             while ($year <= $endyear) {
Please login to merge, or discard this patch.
public/htdocs/projet/class/project.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -746,7 +746,7 @@  discard block
 block discarded – undo
746 746
                 $this->statut = $obj->status; // deprecated
747 747
                 $this->status = $obj->status;
748 748
                 $this->opp_status = $obj->fk_opp_status;
749
-                $this->opp_amount   = $obj->opp_amount;
749
+                $this->opp_amount = $obj->opp_amount;
750 750
                 $this->opp_percent = $obj->opp_percent;
751 751
                 $this->budget_amount = $obj->budget_amount;
752 752
                 $this->model_pdf = $obj->model_pdf;
@@ -1703,7 +1703,7 @@  discard block
 block discarded – undo
1703 1703
         global $langs, $conf;
1704 1704
 
1705 1705
         $error = 0;
1706
-        $clone_project_id = 0;   // For static toolcheck
1706
+        $clone_project_id = 0; // For static toolcheck
1707 1707
 
1708 1708
         dol_syslog("createFromClone clone_contact=" . json_encode($clone_contact) . " clone_task=" . json_encode($clone_task) . " clone_project_file=" . json_encode($clone_project_file) . " clone_note=" . json_encode($clone_note) . " move_date=" . json_encode($move_date), LOG_DEBUG);
1709 1709
 
@@ -1997,7 +1997,7 @@  discard block
 block discarded – undo
1997 1997
         if ($tableName == "actioncomm") {
1998 1998
             $sql .= " SET fk_project=" . $this->id;
1999 1999
             $sql .= " WHERE id=" . ((int) $elementSelectId);
2000
-        } elseif (in_array($tableName, ["entrepot","mrp_mo","stocktransfer_stocktransfer"])) {
2000
+        } elseif (in_array($tableName, ["entrepot", "mrp_mo", "stocktransfer_stocktransfer"])) {
2001 2001
             $sql .= " SET fk_project=" . $this->id;
2002 2002
             $sql .= " WHERE rowid=" . ((int) $elementSelectId);
2003 2003
         } else {
@@ -2188,7 +2188,7 @@  discard block
 block discarded – undo
2188 2188
                     $date = explode('-', $obj->element_date);
2189 2189
                     $week_number = getWeekNumber($date[2], $date[1], $date[0]);
2190 2190
                 }
2191
-                '@phan-var-force int $week_number';  // Needed because phan considers it might be null
2191
+                '@phan-var-force int $week_number'; // Needed because phan considers it might be null
2192 2192
                 if (empty($weekalreadyfound[$week_number])) {
2193 2193
                     $this->monthWorkLoad[$week_number] = $obj->element_duration;
2194 2194
                     $this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = $obj->element_duration;
@@ -2535,7 +2535,7 @@  discard block
 block discarded – undo
2535 2535
         if (method_exists($this, 'getLibStatut')) {
2536 2536
             $return .= '<div class="info-box-status small inline-block valignmiddle">' . $this->getLibStatut(3) . '</div>';
2537 2537
         }
2538
-        $return .= '</div>';    // end div line status
2538
+        $return .= '</div>'; // end div line status
2539 2539
 
2540 2540
         $return .= '</div>';
2541 2541
         $return .= '</div>';
Please login to merge, or discard this patch.
public/htdocs/projet/class/task.class.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -536,7 +536,7 @@  discard block
 block discarded – undo
536 536
                          * @param Task $task
537 537
                          * @return bool
538 538
                          */
539
-                        static function ($allTasksCompleted, $task) {
539
+                        static function($allTasksCompleted, $task) {
540 540
                             return $allTasksCompleted && $task->progress >= 100;
541 541
                         },
542 542
                         1
@@ -1596,11 +1596,11 @@  discard block
 block discarded – undo
1596 1596
                 $newobj->timespent_line_id = $obj->rowid;
1597 1597
                 $newobj->timespent_line_ref_ext = $obj->ref_ext;
1598 1598
                 $newobj->timespent_line_date = $this->db->jdate($obj->task_date);
1599
-                $newobj->timespent_line_datehour    = $this->db->jdate($obj->task_datehour);
1599
+                $newobj->timespent_line_datehour = $this->db->jdate($obj->task_datehour);
1600 1600
                 $newobj->timespent_line_withhour = $obj->task_date_withhour;
1601 1601
                 $newobj->timespent_line_duration = $obj->task_duration;
1602 1602
                 $newobj->timespent_line_fk_user = $obj->fk_user;
1603
-                $newobj->timespent_line_thm = $obj->thm;    // hourly rate
1603
+                $newobj->timespent_line_thm = $obj->thm; // hourly rate
1604 1604
                 $newobj->timespent_line_note = $obj->note;
1605 1605
 
1606 1606
                 $arrayres[] = $newobj;
@@ -2139,7 +2139,7 @@  discard block
 block discarded – undo
2139 2139
         }
2140 2140
         // End
2141 2141
         if ($error) {
2142
-            $clone_task_id = 0;  // For static tool check
2142
+            $clone_task_id = 0; // For static tool check
2143 2143
         } else {
2144 2144
             $clone_task_id = $clone_task->id;
2145 2145
             $clone_task_ref = $clone_task->ref;
@@ -2588,7 +2588,7 @@  discard block
 block discarded – undo
2588 2588
         global $langs, $hookmanager, $user, $action;
2589 2589
 
2590 2590
         $error = 0;
2591
-        $task_origin = new Task($this->db);     // The thirdparty that we will delete
2591
+        $task_origin = new Task($this->db); // The thirdparty that we will delete
2592 2592
 
2593 2593
         dol_syslog("mergeTask merge task id=" . $task_origin_id . " (will be deleted) into the task id=" . $this->id);
2594 2594
 
Please login to merge, or discard this patch.
public/htdocs/projet/class/api_projects.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -125,7 +125,7 @@
 block discarded – undo
125 125
 
126 126
         $sql = "SELECT t.rowid";
127 127
         $sql .= " FROM " . MAIN_DB_PREFIX . "projet as t";
128
-        $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "projet_extrafields AS ef ON ef.fk_object = t.rowid";  // So we will be able to filter on extrafields
128
+        $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "projet_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields
129 129
         if ($category > 0) {
130 130
             $sql .= ", " . MAIN_DB_PREFIX . "categorie_project as c";
131 131
         }
Please login to merge, or discard this patch.
public/htdocs/projet/index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
     while ($i < $num) {
156 156
         $objp = $db->fetch_object($resql);
157 157
         $listofoppstatus[$objp->rowid] = $objp->percent;
158
-        $listofopplabel[$objp->rowid] = $objp->label;       // default label if translation from "OppStatus".code not found.
158
+        $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found.
159 159
         $listofoppcode[$objp->rowid] = $objp->code;
160 160
         switch ($objp->code) {
161 161
             case 'PROSP':
Please login to merge, or discard this patch.