Passed
Pull Request — dev (#14)
by Rafael
51:23
created
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.
public/htdocs/workstation/workstation_card.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 
91 91
 // Permissions
92 92
 $permissiontoread = $user->hasRight('workstation', 'workstation', 'read');
93
-$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
93
+$permissiontoadd = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php
94 94
 $permissiontodelete = $user->hasRight('workstation', 'workstation', 'delete') || ($permissiontoadd && isset($object->status) && $object->status == $object::STATUS_DISABLED);
95
-$permissionnote = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_setnotes.inc.php
96
-$permissiondellink = $user->hasRight('workstation', 'workstation', 'write');      // Used by the include of actions_dellink.inc.php
95
+$permissionnote = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_setnotes.inc.php
96
+$permissiondellink = $user->hasRight('workstation', 'workstation', 'write'); // Used by the include of actions_dellink.inc.php
97 97
 
98 98
 $upload_dir = rtrim(getMultidirOutput($object, '', 1), '/');
99 99
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
  */
108 108
 
109 109
 $parameters = array();
110
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);   // Note that $action and $object may have been modified by some hooks
110
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
111 111
 if ($reshook < 0) {
112 112
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
113 113
 }
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
         }
128 128
     }
129 129
 
130
-    $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY';    // Name of trigger action code to execute when we modify record
130
+    $triggermodname = 'WORKSTATION_WORKSTATION_MODIFY'; // Name of trigger action code to execute when we modify record
131 131
 
132 132
     // Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
133 133
     include DOL_DOCUMENT_ROOT . '/core/actions_addupdatedelete.inc.php';
Please login to merge, or discard this patch.
public/htdocs/resource/agenda.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -99,7 +99,7 @@
 block discarded – undo
99 99
  */
100 100
 
101 101
 $parameters = array('id' => $id);
102
-$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action);    // Note that $action and $object may have been modified by some hooks
102
+$reshook = $hookmanager->executeHooks('doActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
103 103
 if ($reshook < 0) {
104 104
     setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
105 105
 }
Please login to merge, or discard this patch.
public/htdocs/resource/contact.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@
 block discarded – undo
45 45
 $object = new Dolresource($db);
46 46
 
47 47
 // Load object
48
-include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php';     // Must be include, not include_once
48
+include DOL_DOCUMENT_ROOT . '/core/actions_fetchobject.inc.php'; // Must be include, not include_once
49 49
 
50 50
 // Security check
51 51
 if ($user->socid) {
Please login to merge, or discard this patch.
public/htdocs/user/passwordforgotten.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -145,12 +145,12 @@
 block discarded – undo
145 145
             $messagewarning .= '</div>';
146 146
 
147 147
             if ($result <= 0 && $edituser->error == 'USERNOTFOUND') {
148
-                usleep(20000);  // add delay to simulate setPassword() and send_password() actions delay (0.02s)
148
+                usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s)
149 149
                 $message .= $messagewarning;
150 150
                 $username = '';
151 151
             } else {
152 152
                 if (empty($edituser->email)) {
153
-                    usleep(20000);  // add delay to simulate setPassword() and send_password() actions delay (0.02s)
153
+                    usleep(20000); // add delay to simulate setPassword() and send_password() actions delay (0.02s)
154 154
                     $message .= $messagewarning;
155 155
                 } else {
156 156
                     $newpassword = $edituser->setPassword($user, '', 1);
Please login to merge, or discard this patch.
public/htdocs/user/group/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -450,7 +450,7 @@
 block discarded – undo
450 450
                 print '<td class="liste_titre right" width="5">&nbsp;</td>';
451 451
                 print "</tr>\n";
452 452
 
453
-                $object->fetch($object->id, '', true);  // true to force load of all users, member of the group
453
+                $object->fetch($object->id, '', true); // true to force load of all users, member of the group
454 454
 
455 455
                 if (!empty($object->members)) {
456 456
                     foreach ($object->members as $useringroup) {
Please login to merge, or discard this patch.
public/htdocs/compta/sociales/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
 }
81 81
 $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges');
82 82
 
83
-$permissiontoadd = $user->hasRight('tax', 'charges', 'creer');  // Used by the include of actions_dellink.inc.php
83
+$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php
84 84
 
85 85
 
86 86
 /*
Please login to merge, or discard this patch.
public/htdocs/compta/tva/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@
 block discarded – undo
81 81
 }
82 82
 $result = restrictedArea($user, 'tax', '', 'tva', 'charges');
83 83
 
84
-$permissiontoadd = $user->hasRight('tax', 'charges', 'creer');  // Used by the include of actions_dellink.inc.php
84
+$permissiontoadd = $user->hasRight('tax', 'charges', 'creer'); // Used by the include of actions_dellink.inc.php
85 85
 
86 86
 
87 87
 /*
Please login to merge, or discard this patch.
public/htdocs/multicurrency/multicurrency_rate.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
 $object->fields = dol_sort_array($object->fields, 'position');
117 117
 $arrayfields = dol_sort_array($arrayfields, 'position');
118
-'@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
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
119 119
 
120 120
 // Access control
121 121
 // TODO Open this page to a given permission so a sale representative can modify change rates. Permission should be added into module multicurrency.
@@ -610,7 +610,7 @@  discard block
 block discarded – undo
610 610
                 print ' - <span class="opacitymedium">' . $obj->name . '</span>';
611 611
                 print "</td>\n";
612 612
 
613
-                if (! $i) {
613
+                if (!$i) {
614 614
                     $totalarray['nbfield']++;
615 615
                 }
616 616
             }
@@ -620,7 +620,7 @@  discard block
 block discarded – undo
620 620
                 print '<td class="tdoverflowmax200">';
621 621
                 print $obj->rate;
622 622
                 print "</td>\n";
623
-                if (! $i) {
623
+                if (!$i) {
624 624
                     $totalarray['nbfield']++;
625 625
                 }
626 626
             }
@@ -630,7 +630,7 @@  discard block
 block discarded – undo
630 630
                 print '<td class="tdoverflowmax200">';
631 631
                 print $obj->rate_indirect;
632 632
                 print "</td>\n";
633
-                if (! $i) {
633
+                if (!$i) {
634 634
                     $totalarray['nbfield']++;
635 635
                 }
636 636
             }
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 
639 639
             // Fields from hook
640 640
             $parameters = array('arrayfields' => $arrayfields, 'obj' => $obj);
641
-            $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters);    // Note that $action and $object may have been modified by hook
641
+            $reshook = $hookmanager->executeHooks('printFieldListValue', $parameters); // Note that $action and $object may have been modified by hook
642 642
             print $hookmanager->resPrint;
643 643
 
644 644
             // Action
Please login to merge, or discard this patch.