Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
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/Classes/User.php 2 patches
Indentation   +36 added lines, -36 removed lines patch added patch discarded remove patch
@@ -1759,7 +1759,7 @@  discard block
 block discarded – undo
1759 1759
     }
1760 1760
 
1761 1761
 
1762
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1762
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1763 1763
     /**
1764 1764
      *  Create a user from a contact object. User will be internal but if contact is linked to a third party, user will be external
1765 1765
      *
@@ -1770,7 +1770,7 @@  discard block
 block discarded – undo
1770 1770
      */
1771 1771
     public function create_from_contact($contact, $login = '', $password = '')
1772 1772
     {
1773
-		// phpcs:enable
1773
+        // phpcs:enable
1774 1774
         global $conf, $user, $langs;
1775 1775
 
1776 1776
         $error = 0;
@@ -1845,7 +1845,7 @@  discard block
 block discarded – undo
1845 1845
         }
1846 1846
     }
1847 1847
 
1848
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1848
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1849 1849
     /**
1850 1850
      *  Create a user into database from a member object.
1851 1851
      *  If $member->fk_soc is set, it will be an external user.
@@ -1856,7 +1856,7 @@  discard block
 block discarded – undo
1856 1856
      */
1857 1857
     public function create_from_member($member, $login = '')
1858 1858
     {
1859
-		// phpcs:enable
1859
+        // phpcs:enable
1860 1860
         global $user;
1861 1861
 
1862 1862
         // Set properties on new user
@@ -1934,7 +1934,7 @@  discard block
 block discarded – undo
1934 1934
         }
1935 1935
     }
1936 1936
 
1937
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1937
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1938 1938
     /**
1939 1939
      *    Assign rights by default
1940 1940
      *
@@ -1942,7 +1942,7 @@  discard block
 block discarded – undo
1942 1942
      */
1943 1943
     public function set_default_rights()
1944 1944
     {
1945
-		// phpcs:enable
1945
+        // phpcs:enable
1946 1946
         global $conf;
1947 1947
 
1948 1948
         $rd = array();
@@ -2335,7 +2335,7 @@  discard block
 block discarded – undo
2335 2335
         }
2336 2336
     }
2337 2337
 
2338
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2338
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2339 2339
     /**
2340 2340
      *  Update the user's last login date in the database.
2341 2341
      *  Function called when a new connection is made by the user
@@ -2344,7 +2344,7 @@  discard block
 block discarded – undo
2344 2344
      */
2345 2345
     public function update_last_login_date()
2346 2346
     {
2347
-		// phpcs:enable
2347
+        // phpcs:enable
2348 2348
         $now = dol_now();
2349 2349
 
2350 2350
         $userremoteip = getUserRemoteIP();
@@ -2517,7 +2517,7 @@  discard block
 block discarded – undo
2517 2517
         }
2518 2518
     }
2519 2519
 
2520
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2520
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2521 2521
     /**
2522 2522
      *  Send a new password (or instructions to reset it) by email
2523 2523
      *
@@ -2528,7 +2528,7 @@  discard block
 block discarded – undo
2528 2528
      */
2529 2529
     public function send_password($user, $password = '', $changelater = 0)
2530 2530
     {
2531
-		// phpcs:enable
2531
+        // phpcs:enable
2532 2532
         global $conf, $langs, $mysoc;
2533 2533
         global $dolibarr_main_url_root;
2534 2534
 
@@ -2646,7 +2646,7 @@  discard block
 block discarded – undo
2646 2646
     }
2647 2647
 
2648 2648
 
2649
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2649
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2650 2650
     /**
2651 2651
      *  Read clicktodial information for user
2652 2652
      *
@@ -2654,7 +2654,7 @@  discard block
 block discarded – undo
2654 2654
      */
2655 2655
     public function fetch_clicktodial()
2656 2656
     {
2657
-		// phpcs:enable
2657
+        // phpcs:enable
2658 2658
         $sql = "SELECT url, login, pass, poste ";
2659 2659
         $sql .= " FROM " . $this->db->prefix() . "user_clicktodial as u";
2660 2660
         $sql .= " WHERE u.fk_user = " . ((int) $this->id);
@@ -2680,7 +2680,7 @@  discard block
 block discarded – undo
2680 2680
         }
2681 2681
     }
2682 2682
 
2683
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2683
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2684 2684
     /**
2685 2685
      *  Update clicktodial info
2686 2686
      *
@@ -2688,7 +2688,7 @@  discard block
 block discarded – undo
2688 2688
      */
2689 2689
     public function update_clicktodial()
2690 2690
     {
2691
-		// phpcs:enable
2691
+        // phpcs:enable
2692 2692
         $this->db->begin();
2693 2693
 
2694 2694
         $sql = "DELETE FROM " . $this->db->prefix() . "user_clicktodial";
@@ -2718,7 +2718,7 @@  discard block
 block discarded – undo
2718 2718
     }
2719 2719
 
2720 2720
 
2721
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2721
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2722 2722
     /**
2723 2723
      *  Add user into a group
2724 2724
      *
@@ -2729,7 +2729,7 @@  discard block
 block discarded – undo
2729 2729
      */
2730 2730
     public function SetInGroup($group, $entity, $notrigger = 0)
2731 2731
     {
2732
-		// phpcs:enable
2732
+        // phpcs:enable
2733 2733
         global $conf, $langs, $user;
2734 2734
 
2735 2735
         $error = 0;
@@ -2774,7 +2774,7 @@  discard block
 block discarded – undo
2774 2774
         }
2775 2775
     }
2776 2776
 
2777
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2777
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2778 2778
     /**
2779 2779
      *  Remove a user from a group
2780 2780
      *
@@ -2785,7 +2785,7 @@  discard block
 block discarded – undo
2785 2785
      */
2786 2786
     public function RemoveFromGroup($group, $entity, $notrigger = 0)
2787 2787
     {
2788
-		// phpcs:enable
2788
+        // phpcs:enable
2789 2789
         global $conf, $langs, $user;
2790 2790
 
2791 2791
         $error = 0;
@@ -3178,7 +3178,7 @@  discard block
 block discarded – undo
3178 3178
         return $this->LibStatut(isset($this->statut) ? (int) $this->statut : (int) $this->status, $mode);
3179 3179
     }
3180 3180
 
3181
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3181
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3182 3182
     /**
3183 3183
      *  Return the label of a status of user (active, inactive)
3184 3184
      *
@@ -3188,7 +3188,7 @@  discard block
 block discarded – undo
3188 3188
      */
3189 3189
     public function LibStatut($status, $mode = 0)
3190 3190
     {
3191
-		// phpcs:enable
3191
+        // phpcs:enable
3192 3192
         global $langs;
3193 3193
 
3194 3194
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -3280,8 +3280,8 @@  discard block
 block discarded – undo
3280 3280
     }
3281 3281
 
3282 3282
 
3283
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
3284
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3283
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
3284
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3285 3285
     /**
3286 3286
      *  Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
3287 3287
      *
@@ -3293,7 +3293,7 @@  discard block
 block discarded – undo
3293 3293
      */
3294 3294
     public function _load_ldap_dn($info, $mode = 0)
3295 3295
     {
3296
-		// phpcs:enable
3296
+        // phpcs:enable
3297 3297
         global $conf;
3298 3298
         $dn = '';
3299 3299
         if ($mode == 0) {
@@ -3306,8 +3306,8 @@  discard block
 block discarded – undo
3306 3306
         return $dn;
3307 3307
     }
3308 3308
 
3309
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
3310
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3309
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
3310
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3311 3311
     /**
3312 3312
      *  Initialize the info array (array of LDAP values) that will be used to call LDAP functions
3313 3313
      *
@@ -3315,7 +3315,7 @@  discard block
 block discarded – undo
3315 3315
      */
3316 3316
     public function _load_ldap_info()
3317 3317
     {
3318
-		// phpcs:enable
3318
+        // phpcs:enable
3319 3319
         global $conf, $langs;
3320 3320
 
3321 3321
         $info = array();
@@ -3621,7 +3621,7 @@  discard block
 block discarded – undo
3621 3621
         }
3622 3622
     }
3623 3623
 
3624
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3624
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3625 3625
     /**
3626 3626
      *  Update user using data from the LDAP
3627 3627
      *
@@ -3630,7 +3630,7 @@  discard block
 block discarded – undo
3630 3630
      */
3631 3631
     public function update_ldap2dolibarr(&$ldapuser)
3632 3632
     {
3633
-		// phpcs:enable
3633
+        // phpcs:enable
3634 3634
         // TODO: Voir pourquoi le update met à jour avec toutes les valeurs vide (global $user écrase ?)
3635 3635
         global $user, $conf;
3636 3636
 
@@ -3675,7 +3675,7 @@  discard block
 block discarded – undo
3675 3675
     }
3676 3676
 
3677 3677
 
3678
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3678
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3679 3679
     /**
3680 3680
      * Return and array with all instantiated first level children users of current user
3681 3681
      *
@@ -3684,7 +3684,7 @@  discard block
 block discarded – undo
3684 3684
      */
3685 3685
     public function get_children()
3686 3686
     {
3687
-		// phpcs:enable
3687
+        // phpcs:enable
3688 3688
         $sql = "SELECT rowid FROM " . $this->db->prefix() . "user";
3689 3689
         $sql .= " WHERE fk_user = " . ((int) $this->id);
3690 3690
 
@@ -3735,7 +3735,7 @@  discard block
 block discarded – undo
3735 3735
         }
3736 3736
     }
3737 3737
 
3738
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3738
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3739 3739
     /**
3740 3740
      *  Build the hierarchy/tree of users into an array.
3741 3741
      *  Set and return this->users that is an array sorted according to tree with arrays of:
@@ -3751,7 +3751,7 @@  discard block
 block discarded – undo
3751 3751
      */
3752 3752
     public function get_full_tree($deleteafterid = 0, $filter = '')
3753 3753
     {
3754
-		// phpcs:enable
3754
+        // phpcs:enable
3755 3755
         global $conf, $user;
3756 3756
         global $hookmanager;
3757 3757
 
@@ -3880,7 +3880,7 @@  discard block
 block discarded – undo
3880 3880
         return $childids;
3881 3881
     }
3882 3882
 
3883
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3883
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3884 3884
     /**
3885 3885
      *  For user id_user and its children available in this->users, define property fullpath and fullname.
3886 3886
      *  Function called by get_full_tree().
@@ -3891,7 +3891,7 @@  discard block
 block discarded – undo
3891 3891
      */
3892 3892
     public function build_path_from_id_user($id_user, $protection = 0)
3893 3893
     {
3894
-		// phpcs:enable
3894
+        // phpcs:enable
3895 3895
         //dol_syslog(get_class($this)."::build_path_from_id_user id_user=".$id_user." protection=".$protection, LOG_DEBUG);
3896 3896
 
3897 3897
         if (!empty($this->users[$id_user]['fullpath'])) {
@@ -4011,7 +4011,7 @@  discard block
 block discarded – undo
4011 4011
         return $this->commonGenerateDocument($modelpath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams);
4012 4012
     }
4013 4013
 
4014
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4014
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
4015 4015
     /**
4016 4016
      *  Return property of user from its id
4017 4017
      *
@@ -4021,7 +4021,7 @@  discard block
 block discarded – undo
4021 4021
      */
4022 4022
     public function user_get_property($rowid, $mode)
4023 4023
     {
4024
-		// phpcs:enable
4024
+        // phpcs:enable
4025 4025
         $user_property = '';
4026 4026
 
4027 4027
         if (empty($rowid)) {
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
                 $this->note_public = $obj->note_public;
609 609
                 $this->note_private = $obj->note_private;
610 610
 
611
-                $this->statut       = $obj->status;         // deprecated
611
+                $this->statut       = $obj->status; // deprecated
612 612
                 $this->status       = $obj->status;
613 613
 
614 614
                 $this->photo        = $obj->photo;
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
         if (getDolGlobalString('MAIN_ENABLE_DEFAULT_VALUES')) {
736 736
             // Load user->default_values for user. TODO Save this in memcached ?
737 737
             $defaultValues = new DefaultValues($this->db);
738
-            $result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,' . $this->id . ') AND (entity:in:' . (isset($this->entity) ? $this->entity : $conf->entity) . ',' . $conf->entity . ')');    // User 0 (all) + me (if defined)
738
+            $result = $defaultValues->fetchAll('', '', 0, 0, '(t.user_id:in:0,' . $this->id . ') AND (entity:in:' . (isset($this->entity) ? $this->entity : $conf->entity) . ',' . $conf->entity . ')'); // User 0 (all) + me (if defined)
739 739
             //$result = $defaultValues->fetchAll('', '', 0, 0, array('t.user_id'=>array(0, $this->id), 'entity'=>array((isset($this->entity) ? $this->entity : $conf->entity), $conf->entity)));    // User 0 (all) + me (if defined)
740 740
 
741 741
             if (!is_array($result) && $result < 0) {
@@ -849,16 +849,16 @@  discard block
 block discarded – undo
849 849
         // Special case for external user
850 850
         if (!empty($this->socid)) {
851 851
             if ($module == 'societe' && ($permlevel1 == 'creer' || $permlevel1 == 'write')) {
852
-                return 0;   // An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself)
852
+                return 0; // An external user never has the permission ->societe->write to see all thirdparties (always restricted to himself)
853 853
             }
854 854
             if ($module == 'societe' && $permlevel1 == 'client' && $permlevel2 == 'voir') {
855
-                return 0;   // An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself)
855
+                return 0; // An external user never has the permission ->societe->client->voir to see all thirdparties (always restricted to himself)
856 856
             }
857 857
             if ($module == 'societe' && $permlevel1 == 'export') {
858
-                return 0;   // An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself)
858
+                return 0; // An external user never has the permission ->societe->export to see all thirdparties (always restricted to himself)
859 859
             }
860 860
             if ($module == 'societe' && ($permlevel1 == 'supprimer' || $permlevel1 == 'delete')) {
861
-                return 0;   // An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself)
861
+                return 0; // An external user never has the permission ->societe->delete to see all thirdparties (always restricted to himself)
862 862
             }
863 863
         }
864 864
 
@@ -1006,7 +1006,7 @@  discard block
 block discarded – undo
1006 1006
             $sql .= " FROM " . $this->db->prefix() . "rights_def";
1007 1007
             $sql .= " WHERE entity = " . ((int) $entity);
1008 1008
             if (!empty($whereforadd) && $whereforadd != 'allmodules') {
1009
-                $sql .= " AND (" . $whereforadd . ")";  // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
1009
+                $sql .= " AND (" . $whereforadd . ")"; // Note: parenthesis are important because whereforadd can contains OR. Also note that $whereforadd is already sanitized
1010 1010
             }
1011 1011
 
1012 1012
             $sqldelete = "DELETE FROM " . $this->db->prefix() . "user_rights";
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
             $sql .= " FROM " . $this->db->prefix() . "rights_def";
1143 1143
             $sql .= " WHERE entity IN (" . $this->db->sanitize($entity, 0, 0, 0, 0) . ")";
1144 1144
             if (!empty($wherefordel) && $wherefordel != 'allmodules') {
1145
-                $sql .= " AND (" . $wherefordel . ")";  // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1145
+                $sql .= " AND (" . $wherefordel . ")"; // Note: parenthesis are important because wherefordel can contains OR. Also note that $wherefordel is already sanitized
1146 1146
             }
1147 1147
 
1148 1148
             // avoid admin to remove his own important rights
@@ -1316,12 +1316,12 @@  discard block
 block discarded – undo
1316 1316
                     $sql .= " AND r.entity = " . ((int) $conf->entity);
1317 1317
                 }
1318 1318
             } else {
1319
-                $sql .= " AND gr.entity = " . ((int) $conf->entity);  // Only groups created in current entity
1319
+                $sql .= " AND gr.entity = " . ((int) $conf->entity); // Only groups created in current entity
1320 1320
                 // The entity on the table gu=usergroup_user should be useless and should never be used because it is already into gr and r.
1321 1321
                 // but when using MULTICOMPANY_TRANSVERSE_MODE, we may have inserted record that make rubbish result here due to the duplicate record of
1322 1322
                 // other entities, so we are forced to add a filter on gu here
1323 1323
                 $sql .= " AND gu.entity IN (0," . $conf->entity . ")";
1324
-                $sql .= " AND r.entity = " . ((int) $conf->entity);   // Only permission of modules enabled in current entity
1324
+                $sql .= " AND r.entity = " . ((int) $conf->entity); // Only permission of modules enabled in current entity
1325 1325
             }
1326 1326
             // End of strange business rule
1327 1327
             $sql .= " AND gr.fk_usergroup = gu.fk_usergroup";
@@ -2794,7 +2794,7 @@  discard block
 block discarded – undo
2794 2794
         $sql .= " WHERE fk_user  = " . ((int) $this->id);
2795 2795
         $sql .= " AND fk_usergroup = " . ((int) $group);
2796 2796
         if (empty($entity)) {
2797
-            $sql .= " AND entity IN (0, 1)";    // group may be in entity 0 (so $entity=0) and link with user into entity 1.
2797
+            $sql .= " AND entity IN (0, 1)"; // group may be in entity 0 (so $entity=0) and link with user into entity 1.
2798 2798
         } else {
2799 2799
             $sql .= " AND entity = " . ((int) $entity);
2800 2800
         }
@@ -3514,7 +3514,7 @@  discard block
 block discarded – undo
3514 3514
         $this->iplastlogin = '127.0.0.1';
3515 3515
         $this->datepreviouslogin = $now;
3516 3516
         $this->ippreviouslogin = '127.0.0.1';
3517
-        $this->statut = 1;      // deprecated
3517
+        $this->statut = 1; // deprecated
3518 3518
         $this->status = 1;
3519 3519
 
3520 3520
         $this->entity = 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.