Passed
Push — EXTRACT_CLASSES ( 0382f2...c25e41 )
by Rafael
52:18
created
public/htdocs/ticket/class/ticket.class.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1467,7 +1467,7 @@  discard block
 block discarded – undo
1467 1467
     }
1468 1468
 
1469 1469
 
1470
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1470
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1471 1471
     /**
1472 1472
      * Return status label of object
1473 1473
      *
@@ -1479,7 +1479,7 @@  discard block
 block discarded – undo
1479 1479
      */
1480 1480
     public function LibStatut($status, $mode = 0, $notooltip = 0, $progress = 0)
1481 1481
     {
1482
-		// phpcs:enable
1482
+        // phpcs:enable
1483 1483
         global $langs, $hookmanager;
1484 1484
 
1485 1485
         $labelStatus = (isset($status) && !empty($this->labelStatus[$status])) ? $this->labelStatus[$status] : '';
@@ -2433,7 +2433,7 @@  discard block
 block discarded – undo
2433 2433
     }
2434 2434
 
2435 2435
 
2436
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2436
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2437 2437
     /**
2438 2438
      *  Return if at least one photo is available
2439 2439
      *
@@ -2442,7 +2442,7 @@  discard block
 block discarded – undo
2442 2442
      */
2443 2443
     public function is_photo_available($sdir)
2444 2444
     {
2445
-		// phpcs:enable
2445
+        // phpcs:enable
2446 2446
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
2447 2447
 
2448 2448
         global $conf;
@@ -3059,7 +3059,7 @@  discard block
 block discarded – undo
3059 3059
         return $is_sent;
3060 3060
     }
3061 3061
 
3062
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3062
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3063 3063
     /**
3064 3064
      *  Load indicators for dashboard (this->nbtodo and this->nbtodolate)
3065 3065
      *
@@ -3069,7 +3069,7 @@  discard block
 block discarded – undo
3069 3069
      */
3070 3070
     public function load_board($user, $mode)
3071 3071
     {
3072
-		// phpcs:enable
3072
+        // phpcs:enable
3073 3073
         global $user, $langs;
3074 3074
 
3075 3075
         $now = dol_now();
Please login to merge, or discard this 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/api_expensereports.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 
718 718
 
719 719
 
720
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
720
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
721 721
     /**
722 722
      * Clean sensible object datas
723 723
      *
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
      */
727 727
     protected function _cleanObjectDatas($object)
728 728
     {
729
-		// phpcs:enable
729
+        // phpcs:enable
730 730
         $object = parent::_cleanObjectDatas($object);
731 731
 
732 732
         unset($object->fk_statut);
Please login to merge, or discard this patch.
public/htdocs/expensereport/class/expensereport.class.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
         }
768 768
     }
769 769
 
770
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
770
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
771 771
     /**
772 772
      *  Classify the expense report as paid
773 773
      *
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
      */
781 781
     public function set_paid($id, $fuser, $notrigger = 0)
782 782
     {
783
-		// phpcs:enable
783
+        // phpcs:enable
784 784
         dol_syslog(get_class($this) . "::set_paid is deprecated, use setPaid instead", LOG_NOTICE);
785 785
         return $this->setPaid($id, $fuser, $notrigger);
786 786
     }
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
         return $this->LibStatut($this->status, $mode);
847 847
     }
848 848
 
849
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
849
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
850 850
     /**
851 851
      *  Returns the label of a status
852 852
      *
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
      */
857 857
     public function LibStatut($status, $mode = 0)
858 858
     {
859
-		// phpcs:enable
859
+        // phpcs:enable
860 860
         global $langs;
861 861
 
862 862
         $labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
         return 1;
987 987
     }
988 988
 
989
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
989
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
990 990
     /**
991 991
      * fetch_line_by_project
992 992
      *
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
      */
997 997
     public function fetch_line_by_project($projectid, $user)
998 998
     {
999
-		// phpcs:enable
999
+        // phpcs:enable
1000 1000
         global $langs;
1001 1001
 
1002 1002
         $langs->load('trips');
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
         return 0;
1089 1089
     }
1090 1090
 
1091
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1091
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1092 1092
     /**
1093 1093
      * fetch_lines
1094 1094
      *
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
      */
1097 1097
     public function fetch_lines()
1098 1098
     {
1099
-		// phpcs:enable
1099
+        // phpcs:enable
1100 1100
         $this->lines = array();
1101 1101
 
1102 1102
         $sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date, de.rang,';
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
         }
1427 1427
     }
1428 1428
 
1429
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1429
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1430 1430
     /**
1431 1431
      * set_save_from_refuse
1432 1432
      *
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
      */
1436 1436
     public function set_save_from_refuse($fuser)
1437 1437
     {
1438
-		// phpcs:enable
1438
+        // phpcs:enable
1439 1439
         // Sélection de la date de début de la NDF
1440 1440
         $sql = 'SELECT date_debut';
1441 1441
         $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element;
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
         return 0;
1578 1578
     }
1579 1579
 
1580
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1580
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1581 1581
     /**
1582 1582
      * set_unpaid
1583 1583
      *
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
      */
1590 1590
     public function set_unpaid($fuser, $notrigger = 0)
1591 1591
     {
1592
-		// phpcs:enable
1592
+        // phpcs:enable
1593 1593
         dol_syslog(get_class($this) . "::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
1594 1594
         return $this->setUnpaid($fuser, $notrigger);
1595 1595
     }
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
         return 0;
1646 1646
     }
1647 1647
 
1648
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1648
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1649 1649
     /**
1650 1650
      * set_cancel
1651 1651
      *
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
      */
1657 1657
     public function set_cancel($fuser, $detail, $notrigger = 0)
1658 1658
     {
1659
-		// phpcs:enable
1659
+        // phpcs:enable
1660 1660
         $error = 0;
1661 1661
         $this->date_cancel = $this->db->idate(dol_now());
1662 1662
         if ($this->status != self::STATUS_CANCELED) {
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
         return $result;
1880 1880
     }
1881 1881
 
1882
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1882
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1883 1883
     /**
1884 1884
      *  Update total of an expense report when you add a line.
1885 1885
      *
@@ -1889,7 +1889,7 @@  discard block
 block discarded – undo
1889 1889
      */
1890 1890
     public function update_totaux_add($ligne_total_ht, $ligne_total_tva)
1891 1891
     {
1892
-		// phpcs:enable
1892
+        // phpcs:enable
1893 1893
         $this->total_ht += (float) $ligne_total_ht;
1894 1894
         $this->total_tva += (float) $ligne_total_tva;
1895 1895
         $this->total_ttc += $this->total_tva;
@@ -2375,7 +2375,7 @@  discard block
 block discarded – undo
2375 2375
         return 1;
2376 2376
     }
2377 2377
 
2378
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2378
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2379 2379
     /**
2380 2380
      * periode_existe
2381 2381
      *
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
     {
2389 2389
         global $conf;
2390 2390
 
2391
-		// phpcs:enable
2391
+        // phpcs:enable
2392 2392
         $sql = "SELECT rowid, date_debut, date_fin";
2393 2393
         $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
2394 2394
         $sql .= " WHERE entity = " . ((int) $conf->entity); // not shared, only for the current entity
@@ -2429,7 +2429,7 @@  discard block
 block discarded – undo
2429 2429
     }
2430 2430
 
2431 2431
 
2432
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2432
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2433 2433
     /**
2434 2434
      * Return list of people with permission to validate expense reports.
2435 2435
      * Search for permission "approve expense report"
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
      */
2439 2439
     public function fetch_users_approver_expensereport()
2440 2440
     {
2441
-		// phpcs:enable
2441
+        // phpcs:enable
2442 2442
         $users_validator = array();
2443 2443
 
2444 2444
         $sql = "SELECT DISTINCT ur.fk_user";
@@ -2564,7 +2564,7 @@  discard block
 block discarded – undo
2564 2564
         }
2565 2565
     }
2566 2566
 
2567
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2567
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2568 2568
     /**
2569 2569
      *      Load indicators for dashboard (this->nbtodo and this->nbtodolate)
2570 2570
      *
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
      */
2575 2575
     public function load_board($user, $option = 'topay')
2576 2576
     {
2577
-		// phpcs:enable
2577
+        // phpcs:enable
2578 2578
         global $conf, $langs;
2579 2579
 
2580 2580
         if ($user->socid) {
Please login to merge, or discard this 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.