Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/societe/checkvat/checkVatPopup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@
 block discarded – undo
22 22
  *      \brief      Popup screen to validate VAT
23 23
  */
24 24
 
25
-if (! defined('NOTOKENRENEWAL')) {
25
+if (!defined('NOTOKENRENEWAL')) {
26 26
     define('NOTOKENRENEWAL', '1');
27 27
 }       // Do not roll the Anti CSRF token (used if MAIN_SECURITY_CSRF_WITH_TOKEN is on)
28 28
 
Please login to merge, or discard this patch.
public/htdocs/societe/list.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -134,20 +134,20 @@  discard block
 block discarded – undo
134 134
 $search_date_creation_startmonth = GETPOSTINT('search_date_creation_startmonth');
135 135
 $search_date_creation_startyear = GETPOSTINT('search_date_creation_startyear');
136 136
 $search_date_creation_startday = GETPOSTINT('search_date_creation_startday');
137
-$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear);   // Use tzserver
137
+$search_date_creation_start = dol_mktime(0, 0, 0, $search_date_creation_startmonth, $search_date_creation_startday, $search_date_creation_startyear); // Use tzserver
138 138
 $search_date_creation_endmonth = GETPOSTINT('search_date_creation_endmonth');
139 139
 $search_date_creation_endyear = GETPOSTINT('search_date_creation_endyear');
140 140
 $search_date_creation_endday = GETPOSTINT('search_date_creation_endday');
141
-$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear);    // Use tzserver
141
+$search_date_creation_end = dol_mktime(23, 59, 59, $search_date_creation_endmonth, $search_date_creation_endday, $search_date_creation_endyear); // Use tzserver
142 142
 
143 143
 $search_date_modif_startmonth = GETPOSTINT('search_date_modif_startmonth');
144 144
 $search_date_modif_startyear = GETPOSTINT('search_date_modif_startyear');
145 145
 $search_date_modif_startday = GETPOSTINT('search_date_modif_startday');
146
-$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear);   // Use tzserver
146
+$search_date_modif_start = dol_mktime(0, 0, 0, $search_date_modif_startmonth, $search_date_modif_startday, $search_date_modif_startyear); // Use tzserver
147 147
 $search_date_modif_endmonth = GETPOSTINT('search_date_modif_endmonth');
148 148
 $search_date_modif_endyear = GETPOSTINT('search_date_modif_endyear');
149 149
 $search_date_modif_endday = GETPOSTINT('search_date_modif_endday');
150
-$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear);    // Use tzserver
150
+$search_date_modif_end = dol_mktime(23, 59, 59, $search_date_modif_endmonth, $search_date_modif_endday, $search_date_modif_endyear); // Use tzserver
151 151
 
152 152
 $type = GETPOST('type', 'alpha');
153 153
 $place = GETPOST('place', 'aZ09') ? GETPOST('place', 'aZ09') : '0'; // $place is string id of table for Bar or Restaurant
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
 
322 322
 $object->fields = dol_sort_array($object->fields, 'position');
323 323
 $arrayfields = dol_sort_array($arrayfields, 'position');
324
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
324
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
325 325
 
326 326
 // Security check
327 327
 $socid = GETPOSTINT('socid');
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
     if (!empty($socid)) {
1153 1153
         $url .= '&socid=' . $socid;
1154 1154
     }
1155
-    $newcardbutton   = '';
1155
+    $newcardbutton = '';
1156 1156
     $newcardbutton .= dolGetButtonTitle($langs->trans('ViewList'), '', 'fa fa-bars imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=common' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ((empty($mode) || $mode == 'common') ? 2 : 1), array('morecss' => 'reposition'));
1157 1157
     $newcardbutton .= dolGetButtonTitle($langs->trans('ViewKanban'), '', 'fa fa-th-list imgforviewmode', $_SERVER["PHP_SELF"] . '?mode=kanban' . preg_replace('/(&|\?)*mode=[^&]+/', '', $param), '', ($mode == 'kanban' ? 2 : 1), array('morecss' => 'reposition'));
1158 1158
     $newcardbutton .= dolGetButtonTitle($langs->trans($label), '', 'fa fa-plus-circle', $url, '', $user->hasRight('societe', 'creer'));
@@ -1262,7 +1262,7 @@  discard block
 block discarded – undo
1262 1262
 }
1263 1263
 
1264 1264
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
1265
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
1265
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
1266 1266
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
1267 1267
 $selectedfields .= ((count($arrayofmassactions) && $contextpage != 'poslist') ? $form->showCheckAddButtons('checkforselect', 1) : '');
1268 1268
 
@@ -1706,19 +1706,19 @@  discard block
 block discarded – undo
1706 1706
 print $hookmanager->resPrint;
1707 1707
 if (!empty($arrayfields['s.datec']['checked'])) {
1708 1708
     print_liste_field_titre($arrayfields['s.datec']['label'], $_SERVER["PHP_SELF"], "s.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1709
-    $totalarray['nbfield']++;   // For the column action
1709
+    $totalarray['nbfield']++; // For the column action
1710 1710
 }
1711 1711
 if (!empty($arrayfields['s.tms']['checked'])) {
1712 1712
     print_liste_field_titre($arrayfields['s.tms']['label'], $_SERVER["PHP_SELF"], "s.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
1713
-    $totalarray['nbfield']++;   // For the column action
1713
+    $totalarray['nbfield']++; // For the column action
1714 1714
 }
1715 1715
 if (!empty($arrayfields['s.status']['checked'])) {
1716 1716
     print_liste_field_titre($arrayfields['s.status']['label'], $_SERVER["PHP_SELF"], "s.status", "", $param, '', $sortfield, $sortorder, 'center ');
1717
-    $totalarray['nbfield']++;   // For the column action
1717
+    $totalarray['nbfield']++; // For the column action
1718 1718
 }
1719 1719
 if (!empty($arrayfields['s.import_key']['checked'])) {
1720 1720
     print_liste_field_titre($arrayfields['s.import_key']['label'], $_SERVER["PHP_SELF"], "s.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
1721
-    $totalarray['nbfield']++;   // For the column action
1721
+    $totalarray['nbfield']++; // For the column action
1722 1722
 }
1723 1723
 // Action column
1724 1724
 if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
Please login to merge, or discard this patch.
public/htdocs/societe/website.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 // Get parameters
47 47
 $id = GETPOSTINT('id') ? GETPOSTINT('id') : GETPOSTINT('socid');
48 48
 
49
-$action      = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view';               // The action 'add', 'create', 'edit', 'update', 'view', ...
49
+$action      = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'add', 'create', 'edit', 'update', 'view', ...
50 50
 $show_files  = GETPOSTINT('show_files');
51
-$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist';  // To manage different context of search
52
-$backtopage  = GETPOST('backtopage', 'alpha');                                              // Go back to a dedicated page
53
-$optioncss   = GETPOST('optioncss', 'aZ');                                                  // Option for the css output (always '' except when 'print')
51
+$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'websitelist'; // To manage different context of search
52
+$backtopage  = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
53
+$optioncss   = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
54 54
 $toselect   = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
55 55
 $optioncss  = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
56 56
 $mode       = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 }
490 490
 
491 491
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
492
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
492
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
493 493
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
494 494
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
495 495
 
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
584 584
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
585 585
     }
586
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
586
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
587 587
     if (!empty($arrayfields['t.' . $key]['checked'])) {
588 588
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
589 589
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/societe/class/societe.class.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1057,7 +1057,7 @@  discard block
 block discarded – undo
1057 1057
                 }
1058 1058
 
1059 1059
                 if ($ret >= 0) {
1060
-                    if (! $notrigger) {
1060
+                    if (!$notrigger) {
1061 1061
                         // Call trigger
1062 1062
                         $result = $this->call_trigger('COMPANY_CREATE', $user);
1063 1063
                         if ($result < 0) {
@@ -1986,7 +1986,7 @@  discard block
 block discarded – undo
1986 1986
                 $this->code_client = $obj->code_client;
1987 1987
                 $this->code_fournisseur = $obj->code_fournisseur;
1988 1988
 
1989
-                $this->code_compta = $obj->code_compta;         // For backward compatibility
1989
+                $this->code_compta = $obj->code_compta; // For backward compatibility
1990 1990
                 $this->code_compta_client = $obj->code_compta;
1991 1991
                 $this->code_compta_fournisseur = $obj->code_compta_fournisseur;
1992 1992
 
@@ -2566,10 +2566,10 @@  discard block
 block discarded – undo
2566 2566
                     $reparray[$i]['firstname'] = $obj->firstname;
2567 2567
                     $reparray[$i]['email'] = $obj->email;
2568 2568
                     $reparray[$i]['phone'] = $obj->office_phone;
2569
-                    $reparray[$i]['office_phone'] = $obj->office_phone;         // Pro phone
2569
+                    $reparray[$i]['office_phone'] = $obj->office_phone; // Pro phone
2570 2570
                     $reparray[$i]['office_fax'] = $obj->office_fax;
2571
-                    $reparray[$i]['user_mobile'] = $obj->user_mobile;           // Pro mobile
2572
-                    $reparray[$i]['personal_mobile'] = $obj->personal_mobile;   // Personal mobile
2571
+                    $reparray[$i]['user_mobile'] = $obj->user_mobile; // Pro mobile
2572
+                    $reparray[$i]['personal_mobile'] = $obj->personal_mobile; // Personal mobile
2573 2573
                     $reparray[$i]['job'] = $obj->job;
2574 2574
                     $reparray[$i]['statut'] = $obj->status; // deprecated
2575 2575
                     $reparray[$i]['status'] = $obj->status;
@@ -3735,7 +3735,7 @@  discard block
 block discarded – undo
3735 3735
         $sql .= ' WHERE rowid = ' . ((int) $idparent);
3736 3736
         $resql = $this->db->query($sql);
3737 3737
         if ($resql) {
3738
-            $obj    = $this->db->fetch_object($resql);
3738
+            $obj = $this->db->fetch_object($resql);
3739 3739
 
3740 3740
             if ($obj->parent == '') {
3741 3741
                 return 0;
@@ -4371,7 +4371,7 @@  discard block
 block discarded – undo
4371 4371
         $country_code = $country_label = '';
4372 4372
         if (getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY')) {
4373 4373
             $tmp = explode(':', getDolGlobalString('MAIN_INFO_SOCIETE_COUNTRY'));
4374
-            $country_id =  (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4374
+            $country_id = (is_numeric($tmp[0])) ? (int) $tmp[0] : 0;
4375 4375
             if (!empty($tmp[1])) {   // If $conf->global->MAIN_INFO_SOCIETE_COUNTRY is "id:code:label"
4376 4376
                 $country_code = $tmp[1];
4377 4377
                 $country_label = $tmp[2];
@@ -5343,7 +5343,7 @@  discard block
 block discarded – undo
5343 5343
         global $conf, $langs, $hookmanager, $user, $action;
5344 5344
 
5345 5345
         $error = 0;
5346
-        $soc_origin = new Societe($this->db);       // The thirdparty that we will delete
5346
+        $soc_origin = new Societe($this->db); // The thirdparty that we will delete
5347 5347
 
5348 5348
         dol_syslog("mergeCompany merge thirdparty id=" . $soc_origin_id . " (will be deleted) into the thirdparty id=" . $this->id);
5349 5349
 
Please login to merge, or discard this patch.
public/htdocs/societe/class/companypaymentmode.class.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -181,9 +181,9 @@
 block discarded – undo
181 181
     public $max_total_amount_of_all_payments;
182 182
     public $preapproval_key;
183 183
     public $total_amount_of_all_payments;
184
-    public $stripe_card_ref;    // External system payment mode ID
185
-    public $stripe_account;     // External system customer ID
186
-    public $ext_payment_site;   // External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...
184
+    public $stripe_card_ref; // External system payment mode ID
185
+    public $stripe_account; // External system customer ID
186
+    public $ext_payment_site; // External system 'StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...
187 187
 
188 188
     /**
189 189
      * @var int Status
Please login to merge, or discard this patch.
public/htdocs/societe/class/companybankaccount.class.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
     /**
254 254
      * @var string external payment site
255 255
      */
256
-    public $ext_payment_site;   // Name of the external payment system ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...)
256
+    public $ext_payment_site; // Name of the external payment system ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...)
257 257
 
258 258
     /**
259 259
      * @var string comment
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
                 $this->rum             = $obj->rum;
545 545
                 $this->frstrecur       = $obj->frstrecur;
546 546
                 $this->date_rum        = $this->db->jdate($obj->date_rum);
547
-                $this->stripe_card_ref = $obj->stripe_card_ref;     // External system payment mode ID
548
-                $this->stripe_account  = $obj->stripe_account;      // External system customer ID
549
-                $this->ext_payment_site = $obj->ext_payment_site;   // External system name ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...)
547
+                $this->stripe_card_ref = $obj->stripe_card_ref; // External system payment mode ID
548
+                $this->stripe_account  = $obj->stripe_account; // External system customer ID
549
+                $this->ext_payment_site = $obj->ext_payment_site; // External system name ('StripeLive', 'StripeTest', 'StancerLive', 'StancerTest', ...)
550 550
                 $this->last_main_doc   = $obj->last_main_doc;
551 551
                 $this->model_pdf       = $obj->model_pdf;
552 552
             }
Please login to merge, or discard this patch.
public/htdocs/societe/project.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/html.formother.class.php';
38 38
 require_once constant('DOL_DOCUMENT_ROOT') . '/core/class/html.formcompany.class.php';
39 39
 
40
-$form  = new Form($db);
40
+$form = new Form($db);
41 41
 
42 42
 // Load translation files required by the page
43 43
 $langs->loadLangs(array('companies', 'projects'));
@@ -89,7 +89,7 @@  discard block
 block discarded – undo
89 89
 if (!empty($permissiontodelete)) {
90 90
     $arrayofmassactions['predelete'] = img_picto('', 'delete', 'class="pictofixedwidth"') . $langs->trans("Delete");
91 91
 }
92
-if (in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
92
+if (in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
93 93
     $arrayofmassactions = array();
94 94
 }
95 95
 
Please login to merge, or discard this patch.
public/htdocs/workstation/workstation_list.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -39,15 +39,15 @@  discard block
 block discarded – undo
39 39
 $langs->loadLangs(array('mrp', 'other'));
40 40
 
41 41
 $action      = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
42
-$massaction  = GETPOST('massaction', 'alpha');                                   // The bulk action (combo box choice into lists)
43
-$show_files  = GETPOSTINT('show_files');                                    // Show files area generated by bulk actions ?
44
-$confirm     = GETPOST('confirm', 'alpha');                                    // Result of a confirmation
45
-$cancel      = GETPOST('cancel', 'alpha');                                    // We click on a Cancel button
46
-$toselect    = GETPOST('toselect', 'array');                                 // Array of ids of elements selected into a list
42
+$massaction  = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
43
+$show_files  = GETPOSTINT('show_files'); // Show files area generated by bulk actions ?
44
+$confirm     = GETPOST('confirm', 'alpha'); // Result of a confirmation
45
+$cancel      = GETPOST('cancel', 'alpha'); // We click on a Cancel button
46
+$toselect    = GETPOST('toselect', 'array'); // Array of ids of elements selected into a list
47 47
 $contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : str_replace('_', '', basename(dirname(__FILE__)) . basename(__FILE__, '.php')); // To manage different context of search
48
-$backtopage  = GETPOST('backtopage', 'alpha');                                                   // Go back to a dedicated page
49
-$optioncss   = GETPOST('optioncss', 'aZ');                                                      // Option for the css output (always '' except when 'print')
50
-$mode       = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
48
+$backtopage  = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
49
+$optioncss   = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
50
+$mode = GETPOST('mode', 'aZ'); // The output mode ('list', 'kanban', 'hierarchy', 'calendar', ...)
51 51
 
52 52
 $id = GETPOSTINT('id');
53 53
 $ref = GETPOST('ref', 'alpha');
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 $object = new Workstation($db);
70 70
 $extrafields = new ExtraFields($db);
71 71
 $diroutputmassaction = $conf->workstation->dir_output . '/temp/massgeneration/' . $user->id;
72
-$hookmanager->initHooks(array('workstationlist'));         // Note that conf->hooks_modules contains array
72
+$hookmanager->initHooks(array('workstationlist')); // Note that conf->hooks_modules contains array
73 73
 
74 74
 // Fetch optionals attributes and labels
75 75
 $extrafields->fetch_name_optionals_label($object->table_element);
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 
80 80
 // Default sort order (if not yet defined by previous GETPOST)
81 81
 if (!$sortfield) {
82
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
82
+    reset($object->fields); // Reset is required to avoid key() to return null.
83 83
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
84 84
 }
85 85
 if (!$sortorder) {
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 $object->fields = dol_sort_array($object->fields, 'position');
153 153
 $arrayfields = dol_sort_array($arrayfields, 'position');
154
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
154
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
155 155
 
156 156
 $permissiontoread = $user->hasRight('workstation', 'workstation', 'read');
157 157
 $permissiontoadd = $user->hasRight('workstation', 'workstation', 'write');
@@ -321,7 +321,7 @@  discard block
 block discarded – undo
321 321
     $sql .= "t." . $db->escape($key) . ", ";
322 322
 }
323 323
 // Add fields from extrafields
324
-if (! empty($extrafields->attributes[$object->table_element]['label'])) {
324
+if (!empty($extrafields->attributes[$object->table_element]['label'])) {
325 325
     foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $val) {
326 326
         // @phan-suppress-next-line PhanTypeArraySuspiciousNullable
327 327
         $sql .= ($extrafields->attributes[$object->table_element]['type'][$key] != 'separate' ? "ef." . $key . ', ' : '');
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 }
330 330
 // Add groupby from hooks
331 331
 $parameters = array();
332
-$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object);    // Note that $action and $object may have been modified by hook
332
+$reshook = $hookmanager->executeHooks('printFieldListGroupBy', $parameters, $object); // Note that $action and $object may have been modified by hook
333 333
 $sql .= $hookmanager->resPrint;
334 334
 $sql = preg_replace('/,\s*$/', '', $sql);
335 335
 
@@ -498,7 +498,7 @@  discard block
 block discarded – undo
498 498
 }
499 499
 
500 500
 $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage;
501
-$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN'));  // This also change content of $arrayfields with user setup
501
+$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup
502 502
 $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : '');
503 503
 $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : '');
504 504
 
@@ -605,7 +605,7 @@  discard block
 block discarded – undo
605 605
     } elseif (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && !in_array($key, array('id', 'rowid', 'ref', 'status')) && $val['label'] != 'TechnicalID' && empty($val['arrayofkeyval'])) {
606 606
         $cssforfield .= ($cssforfield ? ' ' : '') . 'right';
607 607
     }
608
-    $cssforfield = preg_replace('/small\s*/', '', $cssforfield);    // the 'small' css must not be used for the title label
608
+    $cssforfield = preg_replace('/small\s*/', '', $cssforfield); // the 'small' css must not be used for the title label
609 609
     if (!empty($arrayfields['t.' . $key]['checked'])) {
610 610
         print getTitleFieldOfList($arrayfields['t.' . $key]['label'], 0, $_SERVER['PHP_SELF'], 't.' . $key, '', $param, ($cssforfield ? 'class="' . $cssforfield . '"' : ''), $sortfield, $sortorder, ($cssforfield ? $cssforfield . ' ' : ''), 0, (empty($val['helplist']) ? '' : $val['helplist'])) . "\n";
611 611
         $totalarray['nbfield']++;
Please login to merge, or discard this patch.
public/htdocs/workstation/workstation_note.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -47,19 +47,19 @@  discard block
 block discarded – undo
47 47
 $object = new Workstation($db);
48 48
 $extrafields = new ExtraFields($db);
49 49
 $diroutputmassaction = $conf->workstation->dir_output . '/temp/massgeneration/' . $user->id;
50
-$hookmanager->initHooks(array('workstationnote', 'globalcard'));       // Note that conf->hooks_modules contains array
50
+$hookmanager->initHooks(array('workstationnote', 'globalcard')); // Note that conf->hooks_modules contains array
51 51
 
52 52
 // Fetch optionals attributes and labels
53 53
 $extrafields->fetch_name_optionals_label($object->table_element);
54 54
 
55 55
 // Load object
56
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php';     // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
56
+include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
57 57
 if ($id > 0 || !empty($ref)) {
58 58
     $upload_dir = rtrim(getMultidirOutput($object, '', 1), '/');
59 59
 }
60 60
 
61
-$permissionnote = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_setnotes.inc.php
62
-$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write');     // Used by the include of actions_addupdatedelete.inc.php
61
+$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php
62
+$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php
63 63
 
64 64
 // Security check
65 65
 $isdraft = 0;
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
  * Actions
71 71
  */
72 72
 $parameters = array();
73
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);     // Note that $action and $object may have been modified by some hooks
73
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
74 74
 if ($reshook < 0) {
75 75
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
76 76
 }
Please login to merge, or discard this patch.