Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/contrat/agenda.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
90 90
 $hookmanager->initHooks(array('agendacontract', 'globalcard'));
91 91
 
92
-$permissiontoadd = $user->hasRight('contrat', 'creer');     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
92
+$permissiontoadd = $user->hasRight('contrat', 'creer'); //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
93 93
 
94 94
 $result = restrictedArea($user, 'contrat', $object->id);
95 95
 
Please login to merge, or discard this patch.
public/htdocs/contrat/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -54,7 +54,7 @@
 block discarded – undo
54 54
 // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
55 55
 $hookmanager->initHooks(array('contractcontactcard', 'globalcard'));
56 56
 
57
-$permissiontoadd   = $user->hasRight('contrat', 'creer');     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
57
+$permissiontoadd = $user->hasRight('contrat', 'creer'); //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
58 58
 
59 59
 $result = restrictedArea($user, 'contrat', $object->id);
60 60
 
Please login to merge, or discard this patch.
public/htdocs/contrat/list.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 $search_date_endday = GETPOSTINT('search_date_endday');
86 86
 $search_date_endmonth = GETPOSTINT('search_date_endmonth');
87 87
 $search_date_endyear = GETPOSTINT('search_date_endyear');
88
-$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
88
+$search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
89 89
 $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
90 90
 $searchCategoryCustomerOperator = 0;
91 91
 if (GETPOSTISSET('formfilteraction')) {
@@ -98,20 +98,20 @@  discard block
 block discarded – undo
98 98
 $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth');
99 99
 $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear');
100 100
 $search_date_creation_startday = GETPOSTINT('search_date_creation_startday');
101
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);   // Use tzserver
101
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
102 102
 $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth');
103 103
 $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear');
104 104
 $search_date_creation_endday = GETPOSTINT('search_date_creation_endday');
105
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);    // Use tzserver
105
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
106 106
 
107 107
 $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth');
108 108
 $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear');
109 109
 $search_date_modif_startday = GETPOSTINT('search_date_modif_startday');
110
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);   // Use tzserver
110
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
111 111
 $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth');
112 112
 $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear');
113 113
 $search_date_modif_endday = GETPOSTINT('search_date_modif_endday');
114
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);    // Use tzserver
114
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
115 115
 
116 116
 // Load variable for pagination
117 117
 $limit = GETPOSTINT('limit') ? GETPOSTINT('limit') : $conf->liste_limit;
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 
201 201
 $object->fields = dol_sort_array($object->fields, 'position');
202 202
 $arrayfields = dol_sort_array($arrayfields, 'position');
203
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
203
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
204 204
 
205 205
 if (!$user->hasRight('societe', 'client', 'voir')) {
206 206
     $search_sale = $user->id;
@@ -534,7 +534,7 @@  discard block
 block discarded – undo
534 534
         $resql = $db->query($sql, 0, 'auto', 1);
535 535
         while ($db->fetch_object($resql)) {
536 536
             if (empty($nbtotalofrecords)) {
537
-                $nbtotalofrecords = 1;    // We can't make +1 because init value is ''
537
+                $nbtotalofrecords = 1; // We can't make +1 because init value is ''
538 538
             } else {
539 539
                 $nbtotalofrecords++;
540 540
             }
@@ -986,55 +986,55 @@  discard block
 block discarded – undo
986 986
 print '<tr class="liste_titre">';
987 987
 if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
988 988
     print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
989
-    $totalarray['nbfield']++;   // For the column action
989
+    $totalarray['nbfield']++; // For the column action
990 990
 }
991 991
 if (!empty($arrayfields['c.ref']['checked'])) {
992 992
     print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], "c.ref", "", $param, '', $sortfield, $sortorder);
993
-    $totalarray['nbfield']++;   // For the column action
993
+    $totalarray['nbfield']++; // For the column action
994 994
 }
995 995
 if (!empty($arrayfields['c.ref_customer']['checked'])) {
996 996
     print_liste_field_titre($arrayfields['c.ref_customer']['label'], $_SERVER["PHP_SELF"], "c.ref_customer", "", $param, '', $sortfield, $sortorder);
997
-    $totalarray['nbfield']++;   // For the column action
997
+    $totalarray['nbfield']++; // For the column action
998 998
 }
999 999
 if (!empty($arrayfields['c.ref_supplier']['checked'])) {
1000 1000
     print_liste_field_titre($arrayfields['c.ref_supplier']['label'], $_SERVER["PHP_SELF"], "c.ref_supplier", "", $param, '', $sortfield, $sortorder);
1001
-    $totalarray['nbfield']++;   // For the column action
1001
+    $totalarray['nbfield']++; // For the column action
1002 1002
 }
1003 1003
 if (!empty($arrayfields['s.nom']['checked'])) {
1004 1004
     print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], "s.nom", "", $param, '', $sortfield, $sortorder);
1005
-    $totalarray['nbfield']++;   // For the column action
1005
+    $totalarray['nbfield']++; // For the column action
1006 1006
 }
1007 1007
 if (!empty($arrayfields['s.email']['checked'])) {
1008 1008
     print_liste_field_titre($arrayfields['s.email']['label'], $_SERVER["PHP_SELF"], "s.email", "", $param, '', $sortfield, $sortorder);
1009
-    $totalarray['nbfield']++;   // For the column action
1009
+    $totalarray['nbfield']++; // For the column action
1010 1010
 }
1011 1011
 if (!empty($arrayfields['s.town']['checked'])) {
1012 1012
     print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder);
1013
-    $totalarray['nbfield']++;   // For the column action
1013
+    $totalarray['nbfield']++; // For the column action
1014 1014
 }
1015 1015
 if (!empty($arrayfields['s.zip']['checked'])) {
1016 1016
     print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder);
1017
-    $totalarray['nbfield']++;   // For the column action
1017
+    $totalarray['nbfield']++; // For the column action
1018 1018
 }
1019 1019
 if (!empty($arrayfields['state.nom']['checked'])) {
1020 1020
     print_liste_field_titre($arrayfields['state.nom']['label'], $_SERVER["PHP_SELF"], "state.nom", "", $param, '', $sortfield, $sortorder);
1021
-    $totalarray['nbfield']++;   // For the column action
1021
+    $totalarray['nbfield']++; // For the column action
1022 1022
 }
1023 1023
 if (!empty($arrayfields['country.code_iso']['checked'])) {
1024 1024
     print_liste_field_titre($arrayfields['country.code_iso']['label'], $_SERVER["PHP_SELF"], "country.code_iso", "", $param, '', $sortfield, $sortorder, 'center ');
1025
-    $totalarray['nbfield']++;   // For the column action
1025
+    $totalarray['nbfield']++; // For the column action
1026 1026
 }
1027 1027
 if (!empty($arrayfields['typent.code']['checked'])) {
1028 1028
     print_liste_field_titre($arrayfields['typent.code']['label'], $_SERVER["PHP_SELF"], "typent.code", "", $param, '', $sortfield, $sortorder, 'center ');
1029
-    $totalarray['nbfield']++;   // For the column action
1029
+    $totalarray['nbfield']++; // For the column action
1030 1030
 }
1031 1031
 if (!empty($arrayfields['sale_representative']['checked'])) {
1032 1032
     print_liste_field_titre($arrayfields['sale_representative']['label'], $_SERVER["PHP_SELF"], "", "", $param, '', $sortfield, $sortorder);
1033
-    $totalarray['nbfield']++;   // For the column action
1033
+    $totalarray['nbfield']++; // For the column action
1034 1034
 }
1035 1035
 if (!empty($arrayfields['c.date_contrat']['checked'])) {
1036 1036
     print_liste_field_titre($arrayfields['c.date_contrat']['label'], $_SERVER["PHP_SELF"], "c.date_contrat", "", $param, '', $sortfield, $sortorder, 'center ');
1037
-    $totalarray['nbfield']++;   // For the column action
1037
+    $totalarray['nbfield']++; // For the column action
1038 1038
 }
1039 1039
 // Extra fields
1040 1040
 include DOL_DOCUMENT_ROOT . '/core/tpl/extrafields_list_search_title.tpl.php';
@@ -1044,29 +1044,29 @@  discard block
 block discarded – undo
1044 1044
 print $hookmanager->resPrint;
1045 1045
 if (!empty($arrayfields['c.datec']['checked'])) {
1046 1046
     print_liste_field_titre($arrayfields['c.datec']['label'], $_SERVER["PHP_SELF"], "c.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1047
-    $totalarray['nbfield']++;   // For the column action
1047
+    $totalarray['nbfield']++; // For the column action
1048 1048
 }
1049 1049
 if (!empty($arrayfields['c.tms']['checked'])) {
1050 1050
     print_liste_field_titre($arrayfields['c.tms']['label'], $_SERVER["PHP_SELF"], "c.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1051
-    $totalarray['nbfield']++;   // For the column action
1051
+    $totalarray['nbfield']++; // For the column action
1052 1052
 }
1053 1053
 if (!empty($arrayfields['lower_planned_end_date']['checked'])) {
1054 1054
     print_liste_field_titre($arrayfields['lower_planned_end_date']['label'], $_SERVER["PHP_SELF"], "lower_planned_end_date", "", $param, '', $sortfield, $sortorder, 'center ');
1055
-    $totalarray['nbfield']++;   // For the column action
1055
+    $totalarray['nbfield']++; // For the column action
1056 1056
 }
1057 1057
 if (!empty($arrayfields['status']['checked'])) {
1058 1058
     print_liste_field_titre($staticcontratligne->LibStatut(0, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1059
-    $totalarray['nbfield']++;   // For the column action
1059
+    $totalarray['nbfield']++; // For the column action
1060 1060
     print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 0, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1061
-    $totalarray['nbfield']++;   // For the column action
1061
+    $totalarray['nbfield']++; // For the column action
1062 1062
     print_liste_field_titre($staticcontratligne->LibStatut(4, 3, 1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1063
-    $totalarray['nbfield']++;   // For the column action
1063
+    $totalarray['nbfield']++; // For the column action
1064 1064
     print_liste_field_titre($staticcontratligne->LibStatut(5, 3, -1, 'class="nochangebackground"'), '', '', '', '', 'width="16"');
1065
-    $totalarray['nbfield']++;   // For the column action
1065
+    $totalarray['nbfield']++; // For the column action
1066 1066
 }
1067 1067
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
1068 1068
     print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
1069
-    $totalarray['nbfield']++;   // For the column action
1069
+    $totalarray['nbfield']++; // For the column action
1070 1070
 }
1071 1071
 print "</tr>\n";
1072 1072
 
@@ -1356,7 +1356,7 @@  discard block
 block discarded – undo
1356 1356
 
1357 1357
 // If no record found
1358 1358
 if ($num == 0) {
1359
-    $colspan = 4;   // Include the 4 columns of status
1359
+    $colspan = 4; // Include the 4 columns of status
1360 1360
     foreach ($arrayfields as $key => $val) {
1361 1361
         if (!empty($val['checked'])) {
1362 1362
             $colspan++;
Please login to merge, or discard this patch.
public/htdocs/contrat/class/contrat.class.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -357,7 +357,7 @@  discard block
 block discarded – undo
357 357
         }
358 358
     }
359 359
 
360
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
360
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
361 361
     /**
362 362
      *  Activate a contract line
363 363
      *
@@ -370,7 +370,7 @@  discard block
 block discarded – undo
370 370
      */
371 371
     public function active_line($user, $line_id, $date_start, $date_end = '', $comment = '')
372 372
     {
373
-		// phpcs:enable
373
+        // phpcs:enable
374 374
         $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date_start, $date_end, $comment);
375 375
         if ($result < 0) {
376 376
             $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error;
@@ -380,7 +380,7 @@  discard block
 block discarded – undo
380 380
     }
381 381
 
382 382
 
383
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
383
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
384 384
     /**
385 385
      *  Close a contract line
386 386
      *
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
      */
393 393
     public function close_line($user, $line_id, $date_end, $comment = '')
394 394
     {
395
-		// phpcs:enable
395
+        // phpcs:enable
396 396
         $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
397 397
         if ($result < 0) {
398 398
             $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error;
@@ -814,7 +814,7 @@  discard block
 block discarded – undo
814 814
         }
815 815
     }
816 816
 
817
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
817
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
818 818
     /**
819 819
      *  Load lines array into this->lines.
820 820
      *  This set also nbofserviceswait, nbofservicesopened, nbofservicesexpired and nbofservicesclosed
@@ -826,7 +826,7 @@  discard block
 block discarded – undo
826 826
      */
827 827
     public function fetch_lines($only_services = 0, $loadalsotranslation = 0, $noextrafields = 0)
828 828
     {
829
-		// phpcs:enable
829
+        // phpcs:enable
830 830
         $this->nbofservices = 0;
831 831
         $this->nbofserviceswait = 0;
832 832
         $this->nbofservicesopened = 0;
@@ -1921,7 +1921,7 @@  discard block
 block discarded – undo
1921 1921
     }
1922 1922
 
1923 1923
 
1924
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1924
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1925 1925
     /**
1926 1926
      *  Update statut of contract according to services
1927 1927
      *
@@ -1931,7 +1931,7 @@  discard block
 block discarded – undo
1931 1931
      */
1932 1932
     public function update_statut($user)
1933 1933
     {
1934
-		// phpcs:enable
1934
+        // phpcs:enable
1935 1935
         dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
1936 1936
 
1937 1937
         // If draft, we keep it (should not happen)
@@ -1963,7 +1963,7 @@  discard block
 block discarded – undo
1963 1963
         return $this->LibStatut($this->statut, $mode);
1964 1964
     }
1965 1965
 
1966
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1966
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1967 1967
     /**
1968 1968
      *  Return the label of a given contrat status
1969 1969
      *
@@ -1973,7 +1973,7 @@  discard block
 block discarded – undo
1973 1973
      */
1974 1974
     public function LibStatut($status, $mode)
1975 1975
     {
1976
-		// phpcs:enable
1976
+        // phpcs:enable
1977 1977
         global $langs;
1978 1978
 
1979 1979
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -2183,7 +2183,7 @@  discard block
 block discarded – undo
2183 2183
         }
2184 2184
     }
2185 2185
 
2186
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2186
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2187 2187
     /**
2188 2188
      *  Return list of line rowid
2189 2189
      *
@@ -2192,7 +2192,7 @@  discard block
 block discarded – undo
2192 2192
      */
2193 2193
     public function array_detail($status = -1)
2194 2194
     {
2195
-		// phpcs:enable
2195
+        // phpcs:enable
2196 2196
         $tab = array();
2197 2197
 
2198 2198
         $sql = "SELECT cd.rowid";
@@ -2264,7 +2264,7 @@  discard block
 block discarded – undo
2264 2264
     }
2265 2265
 
2266 2266
 
2267
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2267
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2268 2268
     /**
2269 2269
      *      Load indicators for dashboard (this->nbtodo and this->nbtodolate)
2270 2270
      *
@@ -2274,7 +2274,7 @@  discard block
 block discarded – undo
2274 2274
      */
2275 2275
     public function load_board($user, $mode)
2276 2276
     {
2277
-		// phpcs:enable
2277
+        // phpcs:enable
2278 2278
         global $conf, $langs;
2279 2279
 
2280 2280
         $this->from = " FROM " . MAIN_DB_PREFIX . "contrat as c";
@@ -3176,7 +3176,7 @@  discard block
 block discarded – undo
3176 3176
         return $this->LibStatut($this->statut, $mode, ((!empty($this->date_end)) ? ($this->date_end < dol_now() ? 1 : 0) : -1));
3177 3177
     }
3178 3178
 
3179
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3179
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3180 3180
     /**
3181 3181
      *  Return label of a contract line status
3182 3182
      *
@@ -3189,7 +3189,7 @@  discard block
 block discarded – undo
3189 3189
      */
3190 3190
     public static function LibStatut($status, $mode, $expired = -1, $moreatt = '', $morelabel = '')
3191 3191
     {
3192
-		// phpcs:enable
3192
+        // phpcs:enable
3193 3193
         global $langs;
3194 3194
         $langs->load("contracts");
3195 3195
 
@@ -3625,7 +3625,7 @@  discard block
 block discarded – undo
3625 3625
     }
3626 3626
 
3627 3627
 
3628
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3628
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3629 3629
     /**
3630 3630
      *  Update in database the fields total_xxx of lines
3631 3631
      *  Used by migration process
@@ -3634,7 +3634,7 @@  discard block
 block discarded – undo
3634 3634
      */
3635 3635
     public function update_total()
3636 3636
     {
3637
-		// phpcs:enable
3637
+        // phpcs:enable
3638 3638
         $this->db->begin();
3639 3639
 
3640 3640
         // Mise a jour ligne en base
@@ -3752,7 +3752,7 @@  discard block
 block discarded – undo
3752 3752
         }
3753 3753
     }
3754 3754
 
3755
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3755
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3756 3756
     /**
3757 3757
      *  Activate a contract line
3758 3758
      *
@@ -3764,7 +3764,7 @@  discard block
 block discarded – undo
3764 3764
      */
3765 3765
     public function active_line($user, $date, $date_end = '', $comment = '')
3766 3766
     {
3767
-		// phpcs:enable
3767
+        // phpcs:enable
3768 3768
         $error = 0;
3769 3769
 
3770 3770
         $this->db->begin();
@@ -3810,7 +3810,7 @@  discard block
 block discarded – undo
3810 3810
         }
3811 3811
     }
3812 3812
 
3813
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3813
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3814 3814
     /**
3815 3815
      *  Close a contract line
3816 3816
      *
@@ -3822,7 +3822,7 @@  discard block
 block discarded – undo
3822 3822
      */
3823 3823
     public function close_line($user, $date_end_real, $comment = '', $notrigger = 0)
3824 3824
     {
3825
-		// phpcs:enable
3825
+        // phpcs:enable
3826 3826
         $this->date_cloture = $date_end_real;
3827 3827
         $this->date_end_real = $date_end_real;
3828 3828
         $this->user_closing_id = $user->id;
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -286,12 +286,12 @@  discard block
 block discarded – undo
286 286
     /*
287 287
      * No signature
288 288
      */
289
-    const STATUS_NO_SIGNATURE    = 0;
289
+    const STATUS_NO_SIGNATURE = 0;
290 290
 
291 291
     /*
292 292
      * Signed by sender
293 293
      */
294
-    const STATUS_SIGNED_SENDER   = 1;
294
+    const STATUS_SIGNED_SENDER = 1;
295 295
 
296 296
     /*
297 297
      * Signed by receiver
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     /*
302 302
      * Signed by all
303 303
      */
304
-    const STATUS_SIGNED_ALL      = 9; // To handle future kind of signature (ex: tripartite contract)
304
+    const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
305 305
 
306 306
 
307 307
     /**
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             if ($contratline->statut != ContratLigne::STATUS_OPEN) {
438 438
                 $contratline->context = $this->context;
439 439
 
440
-                $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment);  // This call trigger LINECONTRACT_ACTIVATE
440
+                $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE
441 441
                 if ($result < 0) {
442 442
                     $error++;
443 443
                     $this->error = $contratline->error;
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             // Close lines not already closed
488 488
             if ($contratline->statut != ContratLigne::STATUS_CLOSED) {
489 489
                 $contratline->date_end_real = $now;
490
-                $contratline->date_cloture = $now;  // For backward compatibility
490
+                $contratline->date_cloture = $now; // For backward compatibility
491 491
                 $contratline->user_closing_id = $user->id;
492 492
                 $contratline->statut = ContratLigne::STATUS_CLOSED;
493 493
                 $result = $contratline->close_line($user, $now, $comment, $notrigger);
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
                 //$line->date_fin_prevue   = $this->db->jdate($objp->date_fin_validite);
943 943
                 //$line->date_fin_reel     = $this->db->jdate($objp->date_cloture);
944 944
 
945
-                $line->rang     = $objp->rang;
945
+                $line->rang = $objp->rang;
946 946
 
947 947
                 // Retrieve all extrafields for contract line
948 948
                 // fetch optionals attributes and labels
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
         }
1455 1455
 
1456 1456
         if (!$error) {
1457
-            $result = $this->insertExtraFields();   // This delete and reinsert extrafields
1457
+            $result = $this->insertExtraFields(); // This delete and reinsert extrafields
1458 1458
             if ($result < 0) {
1459 1459
                 $error++;
1460 1460
             }
@@ -2558,7 +2558,7 @@  discard block
 block discarded – undo
2558 2558
         global $user;
2559 2559
 
2560 2560
         $ticket = new Ticket($this->db);
2561
-        $nbTicket =  $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2561
+        $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2562 2562
 
2563 2563
         return ($nbTicket < 0 ? $nbTicket : $ticket->lines);
2564 2564
     }
@@ -2580,7 +2580,7 @@  discard block
 block discarded – undo
2580 2580
         global $conf, $langs;
2581 2581
 
2582 2582
         if (!dol_strlen($modele)) {
2583
-            $modele = '';   // No doc template/generation by default
2583
+            $modele = ''; // No doc template/generation by default
2584 2584
 
2585 2585
             if (!empty($this->model_pdf)) {
2586 2586
                 $modele = $this->model_pdf;
@@ -2806,7 +2806,7 @@  discard block
 block discarded – undo
2806 2806
 
2807 2807
                     // Load contract
2808 2808
                     $object = new Contrat($this->db);
2809
-                    $object->fetch($obj->rowid);        // fetch also lines
2809
+                    $object->fetch($obj->rowid); // fetch also lines
2810 2810
                     //$object->fetch_thirdparty();
2811 2811
 
2812 2812
                     if ($object->id <= 0) {
@@ -2853,7 +2853,7 @@  discard block
 block discarded – undo
2853 2853
                     if ($expirationdate && $expirationdate < $enddatetoscan) {
2854 2854
                         dol_syslog("Define the newdate of end of services from expirationdate=" . $expirationdate);
2855 2855
                         $newdate = $expirationdate;
2856
-                        $protecti = 0;  //$protecti is to avoid infinite loop
2856
+                        $protecti = 0; //$protecti is to avoid infinite loop
2857 2857
                         while ($newdate < $enddatetoscan && $protecti < 1000) {
2858 2858
                             $newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit);
2859 2859
                             $protecti++;
@@ -2881,20 +2881,20 @@  discard block
 block discarded – undo
2881 2881
 
2882 2882
                                 // Create an event
2883 2883
                                 $actioncomm = new ActionComm($this->db);
2884
-                                $actioncomm->type_code    = 'AC_OTH_AUTO';      // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2884
+                                $actioncomm->type_code    = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2885 2885
                                 $actioncomm->code         = 'AC_' . $actioncode;
2886 2886
                                 $actioncomm->label        = $label;
2887 2887
                                 $actioncomm->datep        = $now;
2888 2888
                                 $actioncomm->datef        = $now;
2889
-                                $actioncomm->percentage   = -1;   // Not applicable
2889
+                                $actioncomm->percentage   = -1; // Not applicable
2890 2890
                                 $actioncomm->socid        = $object->socid;
2891
-                                $actioncomm->authorid     = $user->id;   // User saving action
2892
-                                $actioncomm->userownerid  = $user->id;  // Owner of action
2891
+                                $actioncomm->authorid     = $user->id; // User saving action
2892
+                                $actioncomm->userownerid  = $user->id; // Owner of action
2893 2893
                                 $actioncomm->fk_element   = $object->id;
2894 2894
                                 $actioncomm->elementtype  = 'contract';
2895 2895
                                 $actioncomm->note_private = $comment;
2896 2896
 
2897
-                                $ret = $actioncomm->create($user);       // User creating action
2897
+                                $ret = $actioncomm->create($user); // User creating action
2898 2898
                             } else {
2899 2899
                                 $contracterror[$object->id] = $object->ref;
2900 2900
 
@@ -2903,7 +2903,7 @@  discard block
 block discarded – undo
2903 2903
                                 $this->error = $this->db->lasterror();
2904 2904
                             }
2905 2905
 
2906
-                            if (! $errorforlocaltransaction) {
2906
+                            if (!$errorforlocaltransaction) {
2907 2907
                                 $this->db->commit();
2908 2908
                             } else {
2909 2909
                                 $this->db->rollback();
Please login to merge, or discard this patch.
public/htdocs/contrat/class/api_contracts.class.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -19,9 +19,9 @@  discard block
 block discarded – undo
19 19
  * along with this program. If not, see <https://www.gnu.org/licenses/>.
20 20
  */
21 21
 
22
- use Luracast\Restler\RestException;
22
+    use Luracast\Restler\RestException;
23 23
 
24
- require_once constant('DOL_DOCUMENT_ROOT') . '/contrat/class/contrat.class.php';
24
+    require_once constant('DOL_DOCUMENT_ROOT') . '/contrat/class/contrat.class.php';
25 25
 
26 26
 /**
27 27
  * API class for contracts
@@ -653,7 +653,7 @@  discard block
 block discarded – undo
653 653
 
654 654
 
655 655
 
656
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
656
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
657 657
     /**
658 658
      * Clean sensible object datas
659 659
      *
@@ -662,7 +662,7 @@  discard block
 block discarded – undo
662 662
      */
663 663
     protected function _cleanObjectDatas($object)
664 664
     {
665
-		// phpcs:enable
665
+        // phpcs:enable
666 666
         $object = parent::_cleanObjectDatas($object);
667 667
 
668 668
         unset($object->address);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -511,7 +511,7 @@
 block discarded – undo
511 511
             }
512 512
             if ($field == 'array_options' && is_array($value)) {
513 513
                 foreach ($value as $index => $val) {
514
-                    $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract);;
514
+                    $this->contract->array_options[$index] = $this->_checkValForAPI($field, $val, $this->contract); ;
515 515
                 }
516 516
                 continue;
517 517
             }
Please login to merge, or discard this patch.
public/htdocs/contrat/note.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -53,7 +53,7 @@
 block discarded – undo
53 53
 $object = new Contrat($db);
54 54
 $object->fetch($id, $ref);
55 55
 
56
-$permissiontoadd   = $user->hasRight('contrat', 'creer');     //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
56
+$permissiontoadd = $user->hasRight('contrat', 'creer'); //  Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
57 57
 $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php
58 58
 
59 59
 $result = restrictedArea($user, 'contrat', $object->id);
Please login to merge, or discard this patch.
public/htdocs/exports/class/export.class.php 2 patches
Indentation   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
     }
98 98
 
99 99
 
100
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
100
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
101 101
     /**
102 102
      *    Load an exportable dataset
103 103
      *
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
      */
108 108
     public function load_arrays($user, $filter = '')
109 109
     {
110
-		// phpcs:enable
110
+        // phpcs:enable
111 111
         global $langs, $conf, $mysoc;
112 112
 
113 113
         dol_syslog(get_class($this) . "::load_arrays user=" . $user->id . " filter=" . $filter);
@@ -240,7 +240,7 @@  discard block
 block discarded – undo
240 240
     }
241 241
 
242 242
 
243
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
243
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
244 244
     /**
245 245
      *      Build the sql export request.
246 246
      *      Arrays this->array_export_xxx are already loaded for required datatoexport
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
      */
253 253
     public function build_sql($indice, $array_selected, $array_filterValue)
254 254
     {
255
-		// phpcs:enable
255
+        // phpcs:enable
256 256
         // Build the sql request
257 257
         $sql = $this->array_export_sql_start[$indice];
258 258
         $i = 0;
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
         return $sql;
313 313
     }
314 314
 
315
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
315
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
316 316
     /**
317 317
      *      Build the conditional string from filter the query
318 318
      *
@@ -323,7 +323,7 @@  discard block
 block discarded – undo
323 323
      */
324 324
     public function build_filterQuery($TypeField, $NameField, $ValueField)
325 325
     {
326
-		// phpcs:enable
326
+        // phpcs:enable
327 327
         $NameField = sanitizeVal($NameField, 'aZ09');
328 328
         $szFilterQuery = '';
329 329
 
@@ -419,7 +419,7 @@  discard block
 block discarded – undo
419 419
         return $Condition;
420 420
     }
421 421
 
422
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
422
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
423 423
     /**
424 424
      *      Build an input field used to filter the query
425 425
      *
@@ -430,7 +430,7 @@  discard block
 block discarded – undo
430 430
      */
431 431
     public function build_filterField($TypeField, $NameField, $ValueField)
432 432
     {
433
-		// phpcs:enable
433
+        // phpcs:enable
434 434
         global $conf, $langs, $form;
435 435
 
436 436
         $szFilterField = '';
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
         return $szMsg;
586 586
     }
587 587
 
588
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
588
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
589 589
     /**
590 590
      *      Build export file.
591 591
      *      File is built into directory $conf->export->dir_temp.'/'.$user->id
@@ -602,7 +602,7 @@  discard block
 block discarded – undo
602 602
      */
603 603
     public function build_file($user, $model, $datatoexport, $array_selected, $array_filterValue, $sqlquery = '', $separator = '')
604 604
     {
605
-		// phpcs:enable
605
+        // phpcs:enable
606 606
         global $conf, $langs, $mysoc;
607 607
 
608 608
         $indice = 0;
@@ -909,7 +909,7 @@  discard block
 block discarded – undo
909 909
         }
910 910
     }
911 911
 
912
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
912
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
913 913
     /**
914 914
      *  Output list all export models
915 915
      *  --TODO Move this into a class htmlxxx.class.php--
@@ -918,7 +918,7 @@  discard block
 block discarded – undo
918 918
      */
919 919
     public function list_export_model()
920 920
     {
921
-		// phpcs:enable
921
+        // phpcs:enable
922 922
         global $conf, $langs;
923 923
 
924 924
         $sql = "SELECT em.rowid, em.field, em.label, em.type, em.filter";
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -376,7 +376,7 @@
 block discarded – undo
376 376
                 if (is_numeric($ValueField) && $ValueField > 0) {
377 377
                     $szFilterQuery = " " . $NameField . " = " . ((float) $ValueField);
378 378
                 } else {
379
-                    $szFilterQuery = " 1=1";    // Test always true
379
+                    $szFilterQuery = " 1=1"; // Test always true
380 380
                 }
381 381
                 break;
382 382
             case 'Status':
Please login to merge, or discard this patch.
public/htdocs/master.inc.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -85,7 +85,7 @@
 block discarded – undo
85 85
 $conf->file->main_force_https = empty($dolibarr_main_force_https) ? '' : $dolibarr_main_force_https; // Force https
86 86
 $conf->file->strict_mode = empty($dolibarr_strict_mode) ? '' : $dolibarr_strict_mode; // Force php strict mode (for debug)
87 87
 $conf->file->instance_unique_id = empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id; // Unique id of instance
88
-$conf->file->dol_main_url_root = $dolibarr_main_url_root;   // Define url inside the config file
88
+$conf->file->dol_main_url_root = $dolibarr_main_url_root; // Define url inside the config file
89 89
 $conf->file->dol_document_root = array('main' => (string) DOL_DOCUMENT_ROOT); // Define array of document root directories ('/home/htdocs')
90 90
 $conf->file->dol_url_root = array('main' => (string) DOL_URL_ROOT); // Define array of url root path ('' or '/dolibarr')
91 91
 if (!empty($dolibarr_main_document_root_alt)) {
Please login to merge, or discard this patch.
core/modules/knowledgemanagement/modules_knowledgerecord.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
  */
39 39
 abstract class ModelePDFKnowledgeRecord extends CommonDocGenerator
40 40
 {
41
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
41
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
42 42
     /**
43 43
      *  Return list of active generation modules
44 44
      *
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
      */
49 49
     public static function liste_modeles($db, $maxfilenamelength = 0)
50 50
     {
51
-		// phpcs:enable
51
+        // phpcs:enable
52 52
         global $conf;
53 53
 
54 54
         $type = 'knowledgerecord';
Please login to merge, or discard this patch.