Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/ticket/class/ticket.class.php 1 patch
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -263,14 +263,14 @@  discard block
 block discarded – undo
263 263
     /**
264 264
      * Status
265 265
      */
266
-    const STATUS_NOT_READ = 0;          // Draft. Not take into account yet.
267
-    const STATUS_READ = 1;              // Ticket was read.
268
-    const STATUS_ASSIGNED = 2;          // Ticket was just assigned to someone. Not in progress yet.
269
-    const STATUS_IN_PROGRESS = 3;       // In progress
270
-    const STATUS_NEED_MORE_INFO = 5;    // Waiting requester feedback
271
-    const STATUS_WAITING = 7;           // On hold
272
-    const STATUS_CLOSED = 8;            // Closed - Solved
273
-    const STATUS_CANCELED = 9;          // Closed - Not solved
266
+    const STATUS_NOT_READ = 0; // Draft. Not take into account yet.
267
+    const STATUS_READ = 1; // Ticket was read.
268
+    const STATUS_ASSIGNED = 2; // Ticket was just assigned to someone. Not in progress yet.
269
+    const STATUS_IN_PROGRESS = 3; // In progress
270
+    const STATUS_NEED_MORE_INFO = 5; // Waiting requester feedback
271
+    const STATUS_WAITING = 7; // On hold
272
+    const STATUS_CLOSED = 8; // Closed - Solved
273
+    const STATUS_CANCELED = 9; // Closed - Not solved
274 274
 
275 275
 
276 276
     /**
@@ -1854,7 +1854,7 @@  discard block
 block discarded – undo
1854 1854
         $actioncomm->socid = $this->socid;
1855 1855
         $actioncomm->label = $this->subject;
1856 1856
         $actioncomm->note_private = $this->message;
1857
-        $actioncomm->userassigned = array($user->id => array('id' => $user->id,'transparency' => 0));
1857
+        $actioncomm->userassigned = array($user->id => array('id' => $user->id, 'transparency' => 0));
1858 1858
         $actioncomm->userownerid = $user->id;
1859 1859
         $actioncomm->datep = $now;
1860 1860
         $actioncomm->percentage = -1; // percentage is not relevant for punctual events
@@ -2429,7 +2429,7 @@  discard block
 block discarded – undo
2429 2429
                         'email' => $obj->email,
2430 2430
                         'rowid' => $obj->rowid,
2431 2431
                         'code' => $obj->code,
2432
-                        'libelle' => $labelType,        // deprecated, replaced with labeltype
2432
+                        'libelle' => $labelType, // deprecated, replaced with labeltype
2433 2433
                         'labeltype' => $labelType,
2434 2434
                         'status' => $obj->statuslink,
2435 2435
                         'statuscontact' => $obj->statuscontact,
@@ -2514,7 +2514,7 @@  discard block
 block discarded – undo
2514 2514
             if (is_resource($handle)) {
2515 2515
                 while (($file = readdir($handle)) !== false) {
2516 2516
                     if (!utf8_check($file)) {
2517
-                        $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1');  // To be sure data is stored in UTF8 in memory
2517
+                        $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory
2518 2518
                     }
2519 2519
                     if (dol_is_file($dir . $file)) {
2520 2520
                         return true;
@@ -2552,7 +2552,7 @@  discard block
 block discarded – undo
2552 2552
         $formmail->trackid = (is_null($forcetrackid) ? 'tic' . $this->id : '');
2553 2553
         $attachedfiles = $formmail->get_attached_files();
2554 2554
 
2555
-        $filepath = $attachedfiles['paths'];    // path is for example user->dir_temp.'/'.$user->id.'/'...
2555
+        $filepath = $attachedfiles['paths']; // path is for example user->dir_temp.'/'.$user->id.'/'...
2556 2556
         $filename = $attachedfiles['names'];
2557 2557
         $mimetype = $attachedfiles['mimes'];
2558 2558
 
@@ -2980,7 +2980,7 @@  discard block
 block discarded – undo
2980 2980
                                     if ($result) {
2981 2981
                                         // update last_msg_sent date (for last message sent to external users)
2982 2982
                                         $this->date_last_msg_sent = dol_now();
2983
-                                        $this->update($user, 1);    // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2983
+                                        $this->update($user, 1); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2984 2984
                                     }
2985 2985
                                 }
2986 2986
                             }
Please login to merge, or discard this patch.
public/htdocs/expensereport/ajax/ajaxik.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -69,21 +69,21 @@
 block discarded – undo
69 69
 
70 70
 
71 71
 if (empty($fk_expense) || $fk_expense < 0) {
72
-    $rep->errorMessage =   $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense');
72
+    $rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_expense, 'fk_expense');
73 73
 } elseif (empty($fk_c_exp_tax_cat) || $fk_c_exp_tax_cat < 0) {
74
-    $rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
74
+    $rep->errorMessage = $langs->transnoentitiesnoconv('ErrorBadValueForParameter', $fk_c_exp_tax_cat, 'fk_c_exp_tax_cat');
75 75
 
76 76
     $rep->response_status = 'error';
77 77
 } else {
78 78
     // @see ndfp.class.php:3576 (method: compute_total_km)
79 79
     $expense = new ExpenseReport($db);
80 80
     if ($expense->fetch($fk_expense) <= 0) {
81
-        $rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorRecordNotFound');
81
+        $rep->errorMessage = $langs->transnoentitiesnoconv('ErrorRecordNotFound');
82 82
         $rep->response_status = 'error';
83 83
     } else {
84 84
         $userauthor = new User($db);
85 85
         if ($userauthor->fetch($expense->fk_user_author) <= 0) {
86
-            $rep->errorMessage =  $langs->transnoentitiesnoconv('ErrorRecordNotFound');
86
+            $rep->errorMessage = $langs->transnoentitiesnoconv('ErrorRecordNotFound');
87 87
             $rep->response_status = 'error';
88 88
         } else {
89 89
             $expense = new ExpenseReport($db);
Please login to merge, or discard this patch.
public/htdocs/expensereport/card.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -153,7 +153,7 @@  discard block
 block discarded – undo
153 153
 }
154 154
 $result = restrictedArea($user, 'expensereport', $object->id, 'expensereport');
155 155
 
156
-$permissiontoadd = $user->hasRight('expensereport', 'creer');   // Used by the include of actions_dellink.inc.php
156
+$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php
157 157
 
158 158
 
159 159
 /*
@@ -2384,7 +2384,7 @@  discard block
 block discarded – undo
2384 2384
 
2385 2385
                         // Quantity
2386 2386
                         print '<td class="right">';
2387
-                        print '<input type="text" min="0" class="input_qty right maxwidth50"  name="qty" value="' . dol_escape_htmltag($line->qty) . '" />';  // We must be able to enter decimal qty
2387
+                        print '<input type="text" min="0" class="input_qty right maxwidth50"  name="qty" value="' . dol_escape_htmltag($line->qty) . '" />'; // We must be able to enter decimal qty
2388 2388
                         print '</td>';
2389 2389
 
2390 2390
                         //print '<td class="right">'.$langs->trans('AmountHT').'</td>';
Please login to merge, or discard this patch.
public/htdocs/expensereport/payment/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@  discard block
 block discarded – undo
67 67
 $search_date_endday     = GETPOSTINT('search_date_endday');
68 68
 $search_date_endmonth   = GETPOSTINT('search_date_endmonth');
69 69
 $search_date_endyear    = GETPOSTINT('search_date_endyear');
70
-$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);  // Use tzserver
70
+$search_date_start      = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
71 71
 $search_date_end        = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
72 72
 $search_user            = GETPOST('search_user', 'alpha');
73 73
 $search_payment_type    = GETPOST('search_payment_type');
@@ -114,7 +114,7 @@  discard block
 block discarded – undo
114 114
     'pndf.amount'           => array('label' => "Amount", 'checked' => 1, 'position' => 70),
115 115
 );
116 116
 $arrayfields = dol_sort_array($arrayfields, 'position');
117
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
117
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
118 118
 
119 119
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
120 120
 $hookmanager->initHooks(array('paymentexpensereportlist'));
@@ -420,7 +420,7 @@  discard block
 block discarded – undo
420 420
 }
421 421
 
422 422
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
423
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
423
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
424 424
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
425 425
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
426 426
 
Please login to merge, or discard this patch.
public/htdocs/expensereport/list.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 $search_date_startendday    = GETPOSTINT('search_date_startendday');
118 118
 $search_date_startendmonth  = GETPOSTINT('search_date_startendmonth');
119 119
 $search_date_startendyear   = GETPOSTINT('search_date_startendyear');
120
-$search_date_start          = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);  // Use tzserver
120
+$search_date_start          = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
121 121
 $search_date_startend       = dol_mktime(23, 59, 59, $search_date_startendmonth, $search_date_startendday, $search_date_startendyear);
122 122
 
123 123
 $search_date_endday         = GETPOSTINT('search_date_endday');
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 $search_date_endendday      = GETPOSTINT('search_date_endendday');
127 127
 $search_date_endendmonth    = GETPOSTINT('search_date_endendmonth');
128 128
 $search_date_endendyear     = GETPOSTINT('search_date_endendyear');
129
-$search_date_end            = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear);    // Use tzserver
129
+$search_date_end            = dol_mktime(0, 0, 0, $search_date_endmonth, $search_date_endday, $search_date_endyear); // Use tzserver
130 130
 $search_date_endend         = dol_mktime(23, 59, 59, $search_date_endendmonth, $search_date_endendday, $search_date_endendyear);
131 131
 
132
-$optioncss    = GETPOST('optioncss', 'alpha');
132
+$optioncss = GETPOST('optioncss', 'alpha');
133 133
 
134 134
 if ($search_status == '') {
135 135
     $search_status = -1;
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 }
589 589
 
590 590
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
591
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
591
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
592 592
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
593 593
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
594 594
 
Please login to merge, or discard this patch.
public/htdocs/expensereport/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,7 @@
 block discarded – undo
96 96
     }
97 97
 }
98 98
 
99
-$permissiontoadd = $user->hasRight('expensereport', 'creer');   // Used by the include of actions_dellink.inc.php
99
+$permissiontoadd = $user->hasRight('expensereport', 'creer'); // Used by the include of actions_dellink.inc.php
100 100
 
101 101
 
102 102
 /*
Please login to merge, or discard this patch.
public/htdocs/expensereport/class/expensereport.class.php 1 patch
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -247,8 +247,8 @@  discard block
 block discarded – undo
247 247
      */
248 248
     public $fk_user_approve;
249 249
 
250
-    public $localtax1;  // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
251
-    public $localtax2;  // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
250
+    public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
251
+    public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
252 252
 
253 253
     /**
254 254
      * Draft status
@@ -339,8 +339,8 @@  discard block
 block discarded – undo
339 339
         $this->total_tva = 0;
340 340
         $this->total_localtax1 = 0;
341 341
         $this->total_localtax2 = 0;
342
-        $this->localtax1 = 0;   // For backward compatibility
343
-        $this->localtax2 = 0;   // For backward compatibility
342
+        $this->localtax1 = 0; // For backward compatibility
343
+        $this->localtax2 = 0; // For backward compatibility
344 344
         $this->modepaymentid = 0;
345 345
 
346 346
         // List of language codes for status
@@ -697,8 +697,8 @@  discard block
 block discarded – undo
697 697
                 $this->total_ht     = $obj->total_ht;
698 698
                 $this->total_tva    = $obj->total_tva;
699 699
                 $this->total_ttc    = $obj->total_ttc;
700
-                $this->localtax1    = $obj->total_localtax1;        // For backward compatibility
701
-                $this->localtax2    = $obj->total_localtax2;        // For backward compatibility
700
+                $this->localtax1    = $obj->total_localtax1; // For backward compatibility
701
+                $this->localtax2    = $obj->total_localtax2; // For backward compatibility
702 702
                 $this->total_localtax1 = $obj->total_localtax1;
703 703
                 $this->total_localtax2 = $obj->total_localtax2;
704 704
 
@@ -1165,7 +1165,7 @@  discard block
 block discarded – undo
1165 1165
 
1166 1166
                 $deplig->rule_warning_message = $objp->rule_warning_message;
1167 1167
 
1168
-                $deplig->rang               = $objp->rang;
1168
+                $deplig->rang = $objp->rang;
1169 1169
 
1170 1170
                 $this->lines[$i] = $deplig;
1171 1171
 
@@ -1961,8 +1961,8 @@  discard block
 block discarded – undo
1961 1961
             $this->line = new ExpenseReportLine($this->db);
1962 1962
 
1963 1963
             // We don't know seller and buyer for expense reports
1964
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
1965
-            $seller->tva_assuj = 1;     // Most seller uses vat
1964
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
1965
+            $seller->tva_assuj = 1; // Most seller uses vat
1966 1966
             $buyer = new Societe($this->db);
1967 1967
 
1968 1968
             $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -2044,8 +2044,8 @@  discard block
 block discarded – undo
2044 2044
 
2045 2045
         // We don't know seller and buyer for expense reports
2046 2046
         if (!is_object($seller)) {
2047
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2048
-            $seller->tva_assuj = 1;     // Most seller uses vat
2047
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2048
+            $seller->tva_assuj = 1; // Most seller uses vat
2049 2049
         }
2050 2050
 
2051 2051
         $expensereportrule = new ExpenseReportRule($db);
@@ -2129,8 +2129,8 @@  discard block
 block discarded – undo
2129 2129
 
2130 2130
         // We don't know seller and buyer for expense reports
2131 2131
         if (!is_object($seller)) {
2132
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2133
-            $seller->tva_assuj = 1;     // Most seller uses vat
2132
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2133
+            $seller->tva_assuj = 1; // Most seller uses vat
2134 2134
         }
2135 2135
 
2136 2136
         $expenseik = new ExpenseReportIk($this->db);
@@ -2224,10 +2224,10 @@  discard block
 block discarded – undo
2224 2224
             $type = 0; // TODO What if type is service ?
2225 2225
 
2226 2226
             // We don't know seller and buyer for expense reports
2227
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2228
-            $seller->tva_assuj = 1;     // Most seller uses vat
2229
-            $seller->localtax1_assuj = $mysoc->localtax1_assuj;     // We don't know, we reuse the state of company
2230
-            $seller->localtax2_assuj = $mysoc->localtax1_assuj;     // We don't know, we reuse the state of company
2227
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2228
+            $seller->tva_assuj = 1; // Most seller uses vat
2229
+            $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2230
+            $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2231 2231
             $buyer = new Societe($this->db);
2232 2232
 
2233 2233
             $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -3165,7 +3165,7 @@  discard block
 block discarded – undo
3165 3165
         } elseif ($mode == 'mon' || $mode == 'EX_MON') {
3166 3166
             $sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '" . dol_print_date($this->date, '%Y-%m') . "'"; // @todo DATE_FORMAT is forbidden
3167 3167
         } elseif ($mode == 'year' || $mode == 'EX_YEA') {
3168
-            $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'";     // @todo DATE_FORMAT is forbidden
3168
+            $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden
3169 3169
         }
3170 3170
 
3171 3171
         dol_syslog('ExpenseReportLine::getExpAmount');
Please login to merge, or discard this patch.
public/htdocs/expensereport/class/expensereport_ik.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         $default_range = (int) $userauthor->default_range; // if not defined, then 0
200 200
         $ranges = $this->getRangesByCategory($fk_c_exp_tax_cat);
201 201
         // prevent out of range -1 indice
202
-        $indice = $default_range  - 1;
202
+        $indice = $default_range - 1;
203 203
         // subtract 1 because array start from 0
204 204
         if (empty($ranges) || $indice < 0 || !isset($ranges[$indice])) {
205 205
             return false;
Please login to merge, or discard this patch.
public/htdocs/expensereport/class/paymentexpensereport.class.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
             $sql .= " '" . $this->db->idate($this->datep) . "',";
212 212
             $sql .= " " . price2num($totalamount) . ",";
213 213
             $sql .= " " . ((int) $this->fk_typepayment) . ", '" . $this->db->escape($this->num_payment) . "', '" . $this->db->escape($this->note_public) . "', " . ((int) $user->id) . ",";
214
-            $sql .= " 0)";  // fk_bank is ID of transaction into ll_bank
214
+            $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank
215 215
 
216 216
             dol_syslog(get_class($this) . "::create", LOG_DEBUG);
217 217
             $resql = $this->db->query($sql);
Please login to merge, or discard this patch.