Passed
Push — dev ( 162356...096618 )
by Rafael
70:47 queued 05:12
created
Dolibarr/Code/Workstation/Classes/Workstation.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -781,7 +781,7 @@  discard block
 block discarded – undo
781 781
         return $this->LibStatut($this->status, $mode);
782 782
     }
783 783
 
784
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
784
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
785 785
     /**
786 786
      *  Return the status
787 787
      *
@@ -791,7 +791,7 @@  discard block
 block discarded – undo
791 791
      */
792 792
     public function LibStatut($status, $mode = 0)
793 793
     {
794
-		// phpcs:enable
794
+        // phpcs:enable
795 795
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
796 796
             global $langs;
797 797
             //$langs->load("workstation");
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
         'fk_user_modif' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'UserModif', 'enabled' => 1, 'position' => 511, 'notnull' => -1, 'visible' => -2,),
114 114
         'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 512, 'notnull' => -1, 'visible' => -2,),
115 115
         'nb_operators_required' => array('type' => 'integer', 'label' => 'NbOperatorsRequired', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
116
-        'thm_operator_estimated' => array('type' => 'double', 'help' => 'THMOperatorEstimatedHelp','label' => 'THMOperatorEstimated', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
116
+        'thm_operator_estimated' => array('type' => 'double', 'help' => 'THMOperatorEstimatedHelp', 'label' => 'THMOperatorEstimated', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
117 117
         'thm_machine_estimated' => array('type' => 'double', 'help' => 'THMMachineEstimatedHelp', 'label' => 'THMMachineEstimated', 'enabled' => 1, 'position' => 50, 'notnull' => 0, 'visible' => 1, 'css' => 'right', 'csslist' => 'maxwidth75imp'),
118 118
         'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 1000, 'default' => '1', 'notnull' => 1, 'visible' => 1, 'index' => 1, 'arrayofkeyval' => array('0' => 'Disabled', '1' => 'Enabled'),),
119 119
     );
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
     /**
137 137
      * @var string type
138 138
      */
139
-    public $type;   // HUMAN, MACHINE, ...
139
+    public $type; // HUMAN, MACHINE, ...
140 140
 
141 141
     /**
142 142
      * @var integer|string date_creation
Please login to merge, or discard this patch.
Dolibarr/Code/Workstation/Api/Workstations.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -180,7 +180,7 @@  discard block
 block discarded – undo
180 180
         return $obj_ret;
181 181
     }
182 182
 
183
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
183
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
184 184
     /**
185 185
      * Clean sensible object datas
186 186
      *
@@ -189,7 +189,7 @@  discard block
 block discarded – undo
189 189
      */
190 190
     protected function _cleanObjectDatas($object)
191 191
     {
192
-		// phpcs:enable
192
+        // phpcs:enable
193 193
         $object = parent::_cleanObjectDatas($object);
194 194
 
195 195
         unset($object->statut);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@
 block discarded – undo
131 131
         }
132 132
 
133 133
         // this query will return total products with the filters given
134
-        $sqlTotals =  str_replace('SELECT t.rowid, t.ref', 'SELECT count(t.rowid) as total', $sql);
134
+        $sqlTotals = str_replace('SELECT t.rowid, t.ref', 'SELECT count(t.rowid) as total', $sql);
135 135
 
136 136
         $sql .= $this->db->order($sortfield, $sortorder);
137 137
         if ($limit) {
Please login to merge, or discard this patch.
Dolibarr/Code/Stripe/Classes/Stripe.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
                 "confirmation_method" => $mode,
489 489
                 "amount" => $stripeamount,
490 490
                 "currency" => $currency_code,
491
-                "payment_method_types" => $paymentmethodtypes,  // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
491
+                "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
492 492
                 /*
493 493
                 'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php',
494 494
                 'automatic_payment_methods' => array(
@@ -503,7 +503,7 @@  discard block
 block discarded – undo
503 503
             );
504 504
             if ($descriptor) {
505 505
                 $dataforintent["statement_descriptor_suffix"] = $descriptor; // For card payment, 22 chars that appears on bank receipt (prefix into stripe setup + this suffix)
506
-                $dataforintent["statement_descriptor"] = $descriptor;   // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
506
+                $dataforintent["statement_descriptor"] = $descriptor; // For SEPA, it will take only statement_descriptor, not statement_descriptor_suffix
507 507
             }
508 508
             if (!is_null($customer)) {
509 509
                 $dataforintent["customer"] = $customer;
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 
713 713
             $dataforintent = array(
714 714
                 "confirm" => $confirmnow, // Do not confirm immediately during creation of intent
715
-                "payment_method_types" => $paymentmethodtypes,  // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
715
+                "payment_method_types" => $paymentmethodtypes, // When payment_method_types is set, return_url is not required but payment mode can't be managed from dashboard
716 716
                 /*
717 717
                  'return_url' => $dolibarr_main_url_root.'/public/payment/paymentok.php',
718 718
                  'automatic_payment_methods' => array(
@@ -1128,7 +1128,7 @@  discard block
 block discarded – undo
1128 1128
                     } catch (Exception $e) {
1129 1129
                         $sepa = null;
1130 1130
                         $this->error = 'Stripe error: ' . $e->getMessage() . '. Check the BAN information.';
1131
-                        dol_syslog($this->error, LOG_WARNING);  // Error from Stripe, so a warning on Dolibarr
1131
+                        dol_syslog($this->error, LOG_WARNING); // Error from Stripe, so a warning on Dolibarr
1132 1132
                     }
1133 1133
                 }
1134 1134
             }
Please login to merge, or discard this patch.
Dolibarr/Code/Ticket/Classes/CTicketCategory.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -566,7 +566,7 @@  discard block
 block discarded – undo
566 566
         return $this->LibStatut($this->status, $mode);
567 567
     }
568 568
 
569
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
569
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
570 570
     /**
571 571
      *  Return the status
572 572
      *
@@ -576,7 +576,7 @@  discard block
 block discarded – undo
576 576
      */
577 577
     public function LibStatut($status, $mode = 0)
578 578
     {
579
-		// phpcs:enable
579
+        // phpcs:enable
580 580
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
581 581
             global $langs;
582 582
             //$langs->load("mymodule@mymodule");
Please login to merge, or discard this patch.
Dolibarr/Code/Ticket/Classes/Ticket.php 2 patches
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1467,7 +1467,7 @@  discard block
 block discarded – undo
1467 1467
     }
1468 1468
 
1469 1469
 
1470
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1470
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1471 1471
     /**
1472 1472
      * Return status label of object
1473 1473
      *
@@ -1479,7 +1479,7 @@  discard block
 block discarded – undo
1479 1479
      */
1480 1480
     public function LibStatut($status, $mode = 0, $notooltip = 0, $progress = 0)
1481 1481
     {
1482
-		// phpcs:enable
1482
+        // phpcs:enable
1483 1483
         global $langs, $hookmanager;
1484 1484
 
1485 1485
         $labelStatus = (isset($status) && !empty($this->labelStatus[$status])) ? $this->labelStatus[$status] : '';
@@ -2433,7 +2433,7 @@  discard block
 block discarded – undo
2433 2433
     }
2434 2434
 
2435 2435
 
2436
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2436
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2437 2437
     /**
2438 2438
      *  Return if at least one photo is available
2439 2439
      *
@@ -2442,7 +2442,7 @@  discard block
 block discarded – undo
2442 2442
      */
2443 2443
     public function is_photo_available($sdir)
2444 2444
     {
2445
-		// phpcs:enable
2445
+        // phpcs:enable
2446 2446
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
2447 2447
 
2448 2448
         global $conf;
@@ -3059,7 +3059,7 @@  discard block
 block discarded – undo
3059 3059
         return $is_sent;
3060 3060
     }
3061 3061
 
3062
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3062
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3063 3063
     /**
3064 3064
      *  Load indicators for dashboard (this->nbtodo and this->nbtodolate)
3065 3065
      *
@@ -3069,7 +3069,7 @@  discard block
 block discarded – undo
3069 3069
      */
3070 3070
     public function load_board($user, $mode)
3071 3071
     {
3072
-		// phpcs:enable
3072
+        // phpcs:enable
3073 3073
         global $user, $langs;
3074 3074
 
3075 3075
         $now = dol_now();
Please login to merge, or discard this patch.
Spacing   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -263,14 +263,14 @@  discard block
 block discarded – undo
263 263
     /**
264 264
      * Status
265 265
      */
266
-    const STATUS_NOT_READ = 0;          // Draft. Not take into account yet.
267
-    const STATUS_READ = 1;              // Ticket was read.
268
-    const STATUS_ASSIGNED = 2;          // Ticket was just assigned to someone. Not in progress yet.
269
-    const STATUS_IN_PROGRESS = 3;       // In progress
270
-    const STATUS_NEED_MORE_INFO = 5;    // Waiting requester feedback
271
-    const STATUS_WAITING = 7;           // On hold
272
-    const STATUS_CLOSED = 8;            // Closed - Solved
273
-    const STATUS_CANCELED = 9;          // Closed - Not solved
266
+    const STATUS_NOT_READ = 0; // Draft. Not take into account yet.
267
+    const STATUS_READ = 1; // Ticket was read.
268
+    const STATUS_ASSIGNED = 2; // Ticket was just assigned to someone. Not in progress yet.
269
+    const STATUS_IN_PROGRESS = 3; // In progress
270
+    const STATUS_NEED_MORE_INFO = 5; // Waiting requester feedback
271
+    const STATUS_WAITING = 7; // On hold
272
+    const STATUS_CLOSED = 8; // Closed - Solved
273
+    const STATUS_CANCELED = 9; // Closed - Not solved
274 274
 
275 275
 
276 276
     /**
@@ -1854,7 +1854,7 @@  discard block
 block discarded – undo
1854 1854
         $actioncomm->socid = $this->socid;
1855 1855
         $actioncomm->label = $this->subject;
1856 1856
         $actioncomm->note_private = $this->message;
1857
-        $actioncomm->userassigned = array($user->id => array('id' => $user->id,'transparency' => 0));
1857
+        $actioncomm->userassigned = array($user->id => array('id' => $user->id, 'transparency' => 0));
1858 1858
         $actioncomm->userownerid = $user->id;
1859 1859
         $actioncomm->datep = $now;
1860 1860
         $actioncomm->percentage = -1; // percentage is not relevant for punctual events
@@ -2429,7 +2429,7 @@  discard block
 block discarded – undo
2429 2429
                         'email' => $obj->email,
2430 2430
                         'rowid' => $obj->rowid,
2431 2431
                         'code' => $obj->code,
2432
-                        'libelle' => $labelType,        // deprecated, replaced with labeltype
2432
+                        'libelle' => $labelType, // deprecated, replaced with labeltype
2433 2433
                         'labeltype' => $labelType,
2434 2434
                         'status' => $obj->statuslink,
2435 2435
                         'statuscontact' => $obj->statuscontact,
@@ -2514,7 +2514,7 @@  discard block
 block discarded – undo
2514 2514
             if (is_resource($handle)) {
2515 2515
                 while (($file = readdir($handle)) !== false) {
2516 2516
                     if (!utf8_check($file)) {
2517
-                        $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1');  // To be sure data is stored in UTF8 in memory
2517
+                        $file = mb_convert_encoding($file, 'UTF-8', 'ISO-8859-1'); // To be sure data is stored in UTF8 in memory
2518 2518
                     }
2519 2519
                     if (dol_is_file($dir . $file)) {
2520 2520
                         return true;
@@ -2552,7 +2552,7 @@  discard block
 block discarded – undo
2552 2552
         $formmail->trackid = (is_null($forcetrackid) ? 'tic' . $this->id : '');
2553 2553
         $attachedfiles = $formmail->get_attached_files();
2554 2554
 
2555
-        $filepath = $attachedfiles['paths'];    // path is for example user->dir_temp.'/'.$user->id.'/'...
2555
+        $filepath = $attachedfiles['paths']; // path is for example user->dir_temp.'/'.$user->id.'/'...
2556 2556
         $filename = $attachedfiles['names'];
2557 2557
         $mimetype = $attachedfiles['mimes'];
2558 2558
 
@@ -2980,7 +2980,7 @@  discard block
 block discarded – undo
2980 2980
                                     if ($result) {
2981 2981
                                         // update last_msg_sent date (for last message sent to external users)
2982 2982
                                         $this->date_last_msg_sent = dol_now();
2983
-                                        $this->update($user, 1);    // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2983
+                                        $this->update($user, 1); // disable trigger when updating date_last_msg_sent. sendTicketMessageByEmail already create an event in actioncomm table.
2984 2984
                                     }
2985 2985
                                 }
2986 2986
                             }
Please login to merge, or discard this patch.
Dolibarr/Code/Ticket/Api/Tickets.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -300,14 +300,14 @@
 block discarded – undo
300 300
         $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "ticket_extrafields AS ef ON (ef.fk_object = t.rowid)"; // Modification VMR Global Solutions to include extrafields as search parameters in the API GET call, so we will be able to filter on extrafields
301 301
         $sql .= ' WHERE t.entity IN (' . getEntity('ticket', 1) . ')';
302 302
         if ($socid > 0) {
303
-            $sql .= " AND t.fk_soc = " . ((int)$socid);
303
+            $sql .= " AND t.fk_soc = " . ((int) $socid);
304 304
         }
305 305
         // Search on sale representative
306 306
         if ($search_sale && $search_sale != '-1') {
307 307
             if ($search_sale == -2) {
308 308
                 $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)";
309 309
             } elseif ($search_sale > 0) {
310
-                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")";
310
+                $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")";
311 311
             }
312 312
         }
313 313
         // Add sql filters
Please login to merge, or discard this patch.
Dolibarr/Code/User/Classes/UserGroup.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -741,7 +741,7 @@  discard block
 block discarded – undo
741 741
         return $this->LibStatut(0, $mode);
742 742
     }
743 743
 
744
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
744
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
745 745
     /**
746 746
      *  Return the label of a given status
747 747
      *
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
      */
752 752
     public function LibStatut($status, $mode = 0)
753 753
     {
754
-		// phpcs:enable
754
+        // phpcs:enable
755 755
         global $langs;
756 756
         $langs->load('users');
757 757
         return '';
@@ -873,8 +873,8 @@  discard block
 block discarded – undo
873 873
         return $result;
874 874
     }
875 875
 
876
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
877
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
876
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
877
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
878 878
     /**
879 879
      *  Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
880 880
      *
@@ -886,7 +886,7 @@  discard block
 block discarded – undo
886 886
      */
887 887
     public function _load_ldap_dn($info, $mode = 0)
888 888
     {
889
-		// phpcs:enable
889
+        // phpcs:enable
890 890
         global $conf;
891 891
         $dn = '';
892 892
         if ($mode == 0) {
@@ -902,8 +902,8 @@  discard block
 block discarded – undo
902 902
     }
903 903
 
904 904
 
905
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
906
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
905
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
906
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
907 907
     /**
908 908
      *  Initialize the info array (array of LDAP values) that will be used to call LDAP functions
909 909
      *
@@ -911,7 +911,7 @@  discard block
 block discarded – undo
911 911
      */
912 912
     public function _load_ldap_info()
913 913
     {
914
-		// phpcs:enable
914
+        // phpcs:enable
915 915
         global $conf;
916 916
 
917 917
         $info = array();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
     public $members = array(); // Array of users
101 101
 
102 102
     public $nb_rights; // Number of rights granted to the user
103
-    public $nb_users;  // Number of users in the group
103
+    public $nb_users; // Number of users in the group
104 104
 
105 105
     public $rights; // Permissions of the group
106 106
 
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 
175 175
         if ($result) {
176 176
             if ($load_members) {
177
-                $this->members = $this->listUsersForGroup();    // This make a lot of subrequests
177
+                $this->members = $this->listUsersForGroup(); // This make a lot of subrequests
178 178
             }
179 179
 
180 180
             return 1;
Please login to merge, or discard this patch.
Dolibarr/Code/User/Api/Users.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
         );
665 665
     }
666 666
 
667
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
667
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
668 668
     /**
669 669
      * Clean sensible object datas
670 670
      *
@@ -673,7 +673,7 @@  discard block
 block discarded – undo
673 673
      */
674 674
     protected function _cleanObjectDatas($object)
675 675
     {
676
-		// phpcs:enable
676
+        // phpcs:enable
677 677
         global $conf;
678 678
 
679 679
         $object = parent::_cleanObjectDatas($object);
Please login to merge, or discard this patch.
Dolibarr/Code/WebHook/Classes/Target.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -783,7 +783,7 @@  discard block
 block discarded – undo
783 783
         return $this->LibStatut($this->status, $mode);
784 784
     }
785 785
 
786
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
786
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
787 787
     /**
788 788
      *  Return the status
789 789
      *
@@ -793,7 +793,7 @@  discard block
 block discarded – undo
793 793
      */
794 794
     public function LibStatut($status, $mode = 0)
795 795
     {
796
-		// phpcs:enable
796
+        // phpcs:enable
797 797
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
798 798
             global $langs;
799 799
 
Please login to merge, or discard this patch.