Test Failed
Push — main ( c8394f...8477f1 )
by Rafael
66:21
created
public/htdocs/contact/list.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -271,7 +271,7 @@  discard block
 block discarded – undo
271 271
 $object->fields = dol_sort_array($object->fields, 'position');
272 272
 //$arrayfields['anotherfield'] = array('type'=>'integer', 'label'=>'AnotherField', 'checked'=>1, 'enabled'=>1, 'position'=>90, 'csslist'=>'right');
273 273
 $arrayfields = dol_sort_array($arrayfields, 'position');
274
-'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields';  // dol_sort_array looses type for Phan
274
+'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan
275 275
 
276 276
 
277 277
 if (($id > 0 || !empty($ref)) && $action != 'add') {
@@ -512,7 +512,7 @@  discard block
 block discarded – undo
512 512
 
513 513
 // Add fields from hooks - ListFrom
514 514
 $parameters = array();
515
-$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action);    // Note that $action and $object may have been modified by hook
515
+$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
516 516
 $sql .= $hookmanager->resPrint;
517 517
 $sql .= ' WHERE p.entity IN (' . getEntity('contact') . ')';
518 518
 if (!empty($userid)) {    // propre au commercial
@@ -943,7 +943,7 @@  discard block
 block discarded – undo
943 943
 if (isModEnabled('category') && $user->hasRight('societe', 'creer')) {
944 944
     $arrayofmassactions['preaffecttag'] = img_picto('', 'category', 'class="pictofixedwidth"') . $langs->trans("AffectTag");
945 945
 }
946
-if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete','preaffecttag'))) {
946
+if (GETPOSTINT('nomassaction') || in_array($massaction, array('presend', 'predelete', 'preaffecttag'))) {
947 947
     $arrayofmassactions = array();
948 948
 }
949 949
 
Please login to merge, or discard this patch.
public/htdocs/contact/document.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -94,7 +94,7 @@
 block discarded – undo
94 94
 }
95 95
 $result = restrictedArea($user, 'contact', $id, 'socpeople&societe', '', '', 'rowid', 0); // If we create a contact with no company (shared contacts), no check on write permission
96 96
 
97
-$permissiontoadd = $user->hasRight('societe', 'contact', 'creer');  // Used by the include of actions_dellink.inc.php
97
+$permissiontoadd = $user->hasRight('societe', 'contact', 'creer'); // Used by the include of actions_dellink.inc.php
98 98
 
99 99
 
100 100
 /*
Please login to merge, or discard this patch.
public/htdocs/contact/class/contact.class.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -754,8 +754,8 @@  discard block
 block discarded – undo
754 754
     }
755 755
 
756 756
 
757
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
758
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
757
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
758
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
759 759
     /**
760 760
      *  Return DN string complete in the LDAP directory for the object
761 761
      *
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
      */
768 768
     public function _load_ldap_dn($info, $mode = 0)
769 769
     {
770
-		// phpcs:enable
770
+        // phpcs:enable
771 771
         global $conf;
772 772
         $dn = '';
773 773
         if ($mode == 0) {
@@ -781,8 +781,8 @@  discard block
 block discarded – undo
781 781
     }
782 782
 
783 783
 
784
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
785
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
784
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
785
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
786 786
     /**
787 787
      *  Initialize info table (LDAP attributes table)
788 788
      *
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
      */
791 791
     public function _load_ldap_info()
792 792
     {
793
-		// phpcs:enable
793
+        // phpcs:enable
794 794
         global $conf, $langs;
795 795
 
796 796
         $info = array();
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
     }
892 892
 
893 893
 
894
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
894
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
895 895
     /**
896 896
      *  Update field alert birthday
897 897
      *
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
      */
903 903
     public function update_perso($id, $user = null, $notrigger = 0)
904 904
     {
905
-		// phpcs:enable
905
+        // phpcs:enable
906 906
         $error = 0;
907 907
         $result = false;
908 908
 
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
         }
1187 1187
     }
1188 1188
 
1189
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1189
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1190 1190
     /**
1191 1191
      *  Load number of elements the contact is used as a link for
1192 1192
      *  ref_facturation
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
      */
1199 1199
     public function load_ref_elements()
1200 1200
     {
1201
-		// phpcs:enable
1201
+        // phpcs:enable
1202 1202
         // Count the elements for which it is contact
1203 1203
         $sql = "SELECT tc.element, count(ec.rowid) as nb";
1204 1204
         $sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec, " . MAIN_DB_PREFIX . "c_type_contact as tc";
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
         return $this->LibStatut($this->statut, $mode);
1583 1583
     }
1584 1584
 
1585
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1585
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1586 1586
     /**
1587 1587
      *  Return the label of a given status
1588 1588
      *
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
      */
1593 1593
     public function LibStatut($status, $mode)
1594 1594
     {
1595
-		// phpcs:enable
1595
+        // phpcs:enable
1596 1596
         global $langs;
1597 1597
 
1598 1598
         $labelStatus = array(
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
     }
1621 1621
 
1622 1622
 
1623
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1623
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1624 1624
     /**
1625 1625
      *  Return translated label of Public or Private
1626 1626
      *
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
      */
1630 1630
     public function LibPubPriv($status)
1631 1631
     {
1632
-		// phpcs:enable
1632
+        // phpcs:enable
1633 1633
         global $langs;
1634 1634
         if ($status == '1') {
1635 1635
             return $langs->trans('ContactPrivate');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
     /**
216 216
      * @var int Thirdparty ID
217 217
      */
218
-    public $socid;      // both socid and fk_soc are used
219
-    public $fk_soc;     // both socid and fk_soc are used
218
+    public $socid; // both socid and fk_soc are used
219
+    public $fk_soc; // both socid and fk_soc are used
220 220
 
221 221
     /**
222 222
      * @var string Thirdparty name
@@ -1067,8 +1067,8 @@  discard block
 block discarded – undo
1067 1067
                 $this->country_code = $obj->country_id ? $obj->country_code : '';
1068 1068
                 $this->country      = $obj->country_id ? ($langs->trans('Country' . $obj->country_code) != 'Country' . $obj->country_code ? $langs->transnoentities('Country' . $obj->country_code) : $obj->country) : '';
1069 1069
 
1070
-                $this->fk_soc       = $obj->fk_soc;     // Both fk_soc and socid are used
1071
-                $this->socid        = $obj->fk_soc;     // Both fk_soc and socid are used
1070
+                $this->fk_soc       = $obj->fk_soc; // Both fk_soc and socid are used
1071
+                $this->socid        = $obj->fk_soc; // Both fk_soc and socid are used
1072 1072
                 $this->socname      = $obj->socname;
1073 1073
                 $this->poste        = $obj->poste;
1074 1074
                 $this->statut       = $obj->statut;
@@ -1876,7 +1876,7 @@  discard block
 block discarded – undo
1876 1876
         $error = 0;
1877 1877
 
1878 1878
         if (!isset($this->roles)) {
1879
-            return 0;   // Avoid to loose roles when property not set
1879
+            return 0; // Avoid to loose roles when property not set
1880 1880
         }
1881 1881
 
1882 1882
         $this->db->begin();
Please login to merge, or discard this patch.
public/htdocs/contact/perso.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -198,7 +198,7 @@
 block discarded – undo
198 198
         $maxfilesizearray = getMaxFileSizeArray();
199 199
         $maxmin = $maxfilesizearray['maxmin'];
200 200
         if ($maxmin > 0) {
201
-            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">';    // MAX_FILE_SIZE must precede the field type=file
201
+            print '<input type="hidden" name="MAX_FILE_SIZE" value="' . ($maxmin * 1024) . '">'; // MAX_FILE_SIZE must precede the field type=file
202 202
         }
203 203
         print '<input type="file" class="flat" name="photo" id="photoinput">';
204 204
         print '</td></tr>';
Please login to merge, or discard this patch.
public/htdocs/asset/admin/setup.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -548,7 +548,7 @@
 block discarded – undo
548 548
                     $accountsystem->fetch(getDolGlobalInt('CHARTOFACCOUNTS'));
549 549
                     $sql = 'SELECT DISTINCT pcg_type FROM ' . MAIN_DB_PREFIX . 'accounting_account';
550 550
                     $sql .= " WHERE fk_pcg_version = '" . $db->escape($accountsystem->ref) . "'";
551
-                    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')';      // Always limit to current entity. No sharing in accountancy.
551
+                    $sql .= ' AND entity in (' . getEntity('accounting_account', 0) . ')'; // Always limit to current entity. No sharing in accountancy.
552 552
                     $sql .= ' LIMIT 50000'; // just as a sanity check
553 553
                     $resql = $db->query($sql);
554 554
                     if ($resql) {
Please login to merge, or discard this patch.
public/htdocs/asset/card.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -337,7 +337,7 @@
 block discarded – undo
337 337
     print '<table class="border centpercent tableforfield">' . "\n";
338 338
 
339 339
     // Common attributes
340
-    $keyforbreak = 'date_acquisition';    // We change column just before this field
340
+    $keyforbreak = 'date_acquisition'; // We change column just before this field
341 341
     //unset($object->fields['fk_project']);             // Hide field already shown in banner
342 342
     //unset($object->fields['fk_soc']);                 // Hide field already shown in banner
343 343
     include DOL_DOCUMENT_ROOT . '/core/tpl/commonfields_view.tpl.php';
Please login to merge, or discard this patch.
public/htdocs/asset/model/list.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 
72 72
 // Default sort order (if not yet defined by previous GETPOST)
73 73
 if (!$sortfield) {
74
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
74
+    reset($object->fields); // Reset is required to avoid key() to return null.
75 75
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
76 76
 }
77 77
 if (!$sortorder) {
Please login to merge, or discard this patch.
public/htdocs/asset/list.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 $contextpage    = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'assetlist'; // To manage different context of search
45 45
 $backtopage     = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
46 46
 $optioncss      = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
47
-$mode           = GETPOST('mode', 'alpha');  // mode view (kanban or common)
47
+$mode           = GETPOST('mode', 'alpha'); // mode view (kanban or common)
48 48
 $id             = GETPOSTINT('id');
49 49
 
50 50
 // Load variable for pagination
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 
74 74
 // Default sort order (if not yet defined by previous GETPOST)
75 75
 if (!$sortfield) {
76
-    reset($object->fields);                 // Reset is required to avoid key() to return null.
76
+    reset($object->fields); // Reset is required to avoid key() to return null.
77 77
     $sortfield = "t." . key($object->fields); // Set here default search field. By default 1st field in definition.
78 78
 }
79 79
 if (!$sortorder) {
Please login to merge, or discard this patch.
public/htdocs/asset/class/assetmodel.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
         return $this->LibStatut($this->status, $mode);
1439 1439
     }
1440 1440
 
1441
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1441
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1442 1442
     /**
1443 1443
      *  Return the status
1444 1444
      *
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
      */
1449 1449
     public function LibStatut($status, $mode = 0)
1450 1450
     {
1451
-		// phpcs:enable
1451
+        // phpcs:enable
1452 1452
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
1453 1453
             global $langs;
1454 1454
             //$langs->load("assets");
Please login to merge, or discard this patch.