Test Failed
Branch main (fda838)
by Rafael
50:22
created
htdocs/bom/class/bom.class.php 1 patch
Indentation   +4 added lines, -5 removed lines patch added patch discarded remove patch
@@ -437,7 +437,6 @@  discard block
 block discarded – undo
437 437
      * Load object lines in memory from the database by type of product
438 438
      *
439 439
      *  @param int    $typeproduct   0 type product, 1 type service
440
-
441 440
      * @return int         Return integer <0 if KO, 0 if not found, >0 if OK
442 441
      */
443 442
     public function fetchLinesbytypeproduct($typeproduct = 0)
@@ -1206,7 +1205,7 @@  discard block
 block discarded – undo
1206 1205
         return $this->LibStatut($this->status, $mode);
1207 1206
     }
1208 1207
 
1209
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1208
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1210 1209
     /**
1211 1210
      *  Return the status
1212 1211
      *
@@ -1216,7 +1215,7 @@  discard block
 block discarded – undo
1216 1215
      */
1217 1216
     public function LibStatut($status, $mode = 0)
1218 1217
     {
1219
-		// phpcs:enable
1218
+        // phpcs:enable
1220 1219
         if (empty($this->labelStatus)) {
1221 1220
             global $langs;
1222 1221
             //$langs->load("mrp");
@@ -1325,7 +1324,7 @@  discard block
 block discarded – undo
1325 1324
         }
1326 1325
     }
1327 1326
 
1328
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1327
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1329 1328
     /**
1330 1329
      *  Return if at least one photo is available
1331 1330
      *
@@ -1334,7 +1333,7 @@  discard block
 block discarded – undo
1334 1333
      */
1335 1334
     public function is_photo_available($sdir)
1336 1335
     {
1337
-		// phpcs:enable
1336
+        // phpcs:enable
1338 1337
         include_once DOL_DOCUMENT_ROOT . '/core/lib/files.lib.php';
1339 1338
         include_once DOL_DOCUMENT_ROOT . '/core/lib/images.lib.php';
1340 1339
 
Please login to merge, or discard this patch.
htdocs/commande/class/orderline.class.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -624,7 +624,7 @@  discard block
 block discarded – undo
624 624
         }
625 625
     }
626 626
 
627
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
627
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
628 628
     /**
629 629
      *  Update DB line fields total_xxx
630 630
      *  Used by migration
@@ -633,7 +633,7 @@  discard block
 block discarded – undo
633 633
      */
634 634
     public function update_total()
635 635
     {
636
-		// phpcs:enable
636
+        // phpcs:enable
637 637
         $this->db->begin();
638 638
 
639 639
         // Clean parameters
Please login to merge, or discard this patch.
htdocs/commande/class/commande.class.php 1 patch
Indentation   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -607,7 +607,7 @@  discard block
 block discarded – undo
607 607
         }
608 608
     }
609 609
 
610
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
610
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
611 611
     /**
612 612
      *  Set draft status
613 613
      *
@@ -617,7 +617,7 @@  discard block
 block discarded – undo
617 617
      */
618 618
     public function setDraft($user, $idwarehouse = -1)
619 619
     {
620
-		//phpcs:enable
620
+        //phpcs:enable
621 621
         global $conf, $langs;
622 622
 
623 623
         $error = 0;
@@ -697,7 +697,7 @@  discard block
 block discarded – undo
697 697
     }
698 698
 
699 699
 
700
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
700
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
701 701
     /**
702 702
      *  Tag the order as validated (opened)
703 703
      *  Function used when order is reopend after being closed.
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function set_reopen($user)
709 709
     {
710
-		// phpcs:enable
710
+        // phpcs:enable
711 711
         $error = 0;
712 712
 
713 713
         if ($this->statut != self::STATUS_CANCELED && $this->statut != self::STATUS_CLOSED) {
@@ -1737,7 +1737,7 @@  discard block
 block discarded – undo
1737 1737
     }
1738 1738
 
1739 1739
 
1740
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1740
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1741 1741
     /**
1742 1742
      *  Add line into array
1743 1743
      *  $this->client must be loaded
@@ -1753,7 +1753,7 @@  discard block
 block discarded – undo
1753 1753
      */
1754 1754
     public function add_product($idproduct, $qty, $remise_percent = 0.0, $date_start = '', $date_end = '')
1755 1755
     {
1756
-		// phpcs:enable
1756
+        // phpcs:enable
1757 1757
         global $conf, $mysoc;
1758 1758
 
1759 1759
         if (!$qty) {
@@ -1989,7 +1989,7 @@  discard block
 block discarded – undo
1989 1989
     }
1990 1990
 
1991 1991
 
1992
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1992
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1993 1993
     /**
1994 1994
      *  Add line of fixed discount in the order in DB
1995 1995
      *
@@ -1998,7 +1998,7 @@  discard block
 block discarded – undo
1998 1998
      */
1999 1999
     public function insert_discount($idremise)
2000 2000
     {
2001
-		// phpcs:enable
2001
+        // phpcs:enable
2002 2002
         global $langs;
2003 2003
 
2004 2004
         include_once DOL_DOCUMENT_ROOT . '/core/lib/price.lib.php';
@@ -2058,7 +2058,7 @@  discard block
 block discarded – undo
2058 2058
     }
2059 2059
 
2060 2060
 
2061
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2061
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2062 2062
     /**
2063 2063
      *  Load array lines
2064 2064
      *
@@ -2068,7 +2068,7 @@  discard block
 block discarded – undo
2068 2068
      */
2069 2069
     public function fetch_lines($only_product = 0, $loadalsotranslation = 0)
2070 2070
     {
2071
-		// phpcs:enable
2071
+        // phpcs:enable
2072 2072
         global $langs, $conf;
2073 2073
 
2074 2074
         $this->lines = array();
@@ -2335,7 +2335,7 @@  discard block
 block discarded – undo
2335 2335
         return 0;
2336 2336
     }
2337 2337
 
2338
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2338
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2339 2339
     /**
2340 2340
      *  Return a array with the pending stock by product
2341 2341
      *
@@ -2426,7 +2426,7 @@  discard block
 block discarded – undo
2426 2426
         }
2427 2427
     }
2428 2428
 
2429
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2429
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2430 2430
     /**
2431 2431
      *  Applique une remise relative
2432 2432
      *
@@ -2439,7 +2439,7 @@  discard block
 block discarded – undo
2439 2439
      */
2440 2440
     public function set_remise($user, $remise, $notrigger = 0)
2441 2441
     {
2442
-		// phpcs:enable
2442
+        // phpcs:enable
2443 2443
         dol_syslog(get_class($this) . "::set_remise is deprecated, use setDiscount instead", LOG_NOTICE);
2444 2444
         // @phan-suppress-next-line PhanDeprecatedFunction
2445 2445
         return $this->setDiscount($user, $remise, $notrigger);
@@ -2507,7 +2507,7 @@  discard block
 block discarded – undo
2507 2507
     }
2508 2508
 
2509 2509
 
2510
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2510
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2511 2511
     /**
2512 2512
      *      Set a fixed amount discount
2513 2513
      *
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
     }
2575 2575
     */
2576 2576
 
2577
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2577
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2578 2578
     /**
2579 2579
      *  Set the order date
2580 2580
      *
@@ -2585,7 +2585,7 @@  discard block
 block discarded – undo
2585 2585
      */
2586 2586
     public function set_date($user, $date, $notrigger = 0)
2587 2587
     {
2588
-		// phpcs:enable
2588
+        // phpcs:enable
2589 2589
         if ($user->hasRight('commande', 'creer')) {
2590 2590
             $error = 0;
2591 2591
 
@@ -2632,7 +2632,7 @@  discard block
 block discarded – undo
2632 2632
         }
2633 2633
     }
2634 2634
 
2635
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2635
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2636 2636
     /**
2637 2637
      *  Set delivery date
2638 2638
      *
@@ -2644,7 +2644,7 @@  discard block
 block discarded – undo
2644 2644
      */
2645 2645
     public function set_date_livraison($user, $delivery_date, $notrigger = 0)
2646 2646
     {
2647
-		// phpcs:enable
2647
+        // phpcs:enable
2648 2648
         return $this->setDeliveryDate($user, $delivery_date, $notrigger);
2649 2649
     }
2650 2650
 
@@ -2704,7 +2704,7 @@  discard block
 block discarded – undo
2704 2704
         }
2705 2705
     }
2706 2706
 
2707
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2707
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2708 2708
     /**
2709 2709
      *  Return list of orders (eventuelly filtered on a user) into an array
2710 2710
      *
@@ -2720,7 +2720,7 @@  discard block
 block discarded – undo
2720 2720
      */
2721 2721
     public function liste_array($shortlist = 0, $draft = 0, $excluser = null, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'c.date_commande', $sortorder = 'DESC')
2722 2722
     {
2723
-		// phpcs:enable
2723
+        // phpcs:enable
2724 2724
         global $user;
2725 2725
 
2726 2726
         $ga = array();
@@ -2840,7 +2840,7 @@  discard block
 block discarded – undo
2840 2840
         }
2841 2841
     }
2842 2842
 
2843
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2843
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2844 2844
     /**
2845 2845
      *  Update order demand_reason
2846 2846
      *
@@ -2850,7 +2850,7 @@  discard block
 block discarded – undo
2850 2850
      */
2851 2851
     public function demand_reason($demand_reason_id, $notrigger = 0)
2852 2852
     {
2853
-		// phpcs:enable
2853
+        // phpcs:enable
2854 2854
         global $user;
2855 2855
 
2856 2856
         dol_syslog('Commande::demand_reason(' . $demand_reason_id . ')');
@@ -2904,7 +2904,7 @@  discard block
 block discarded – undo
2904 2904
         }
2905 2905
     }
2906 2906
 
2907
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2907
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2908 2908
     /**
2909 2909
      *  Set customer ref
2910 2910
      *
@@ -2915,7 +2915,7 @@  discard block
 block discarded – undo
2915 2915
      */
2916 2916
     public function set_ref_client($user, $ref_client, $notrigger = 0)
2917 2917
     {
2918
-		// phpcs:enable
2918
+        // phpcs:enable
2919 2919
         if ($user->hasRight('commande', 'creer')) {
2920 2920
             $error = 0;
2921 2921
 
@@ -3546,7 +3546,7 @@  discard block
 block discarded – undo
3546 3546
     }
3547 3547
 
3548 3548
 
3549
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3549
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3550 3550
     /**
3551 3551
      *  Load indicators for dashboard (this->nbtodo and this->nbtodolate)
3552 3552
      *
@@ -3556,7 +3556,7 @@  discard block
 block discarded – undo
3556 3556
      */
3557 3557
     public function load_board($user, $mode)
3558 3558
     {
3559
-		// phpcs:enable
3559
+        // phpcs:enable
3560 3560
         global $conf, $langs;
3561 3561
 
3562 3562
         $clause = " WHERE";
@@ -3665,7 +3665,7 @@  discard block
 block discarded – undo
3665 3665
         return $this->LibStatut($this->statut, $this->billed, $mode);
3666 3666
     }
3667 3667
 
3668
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3668
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3669 3669
     /**
3670 3670
      *  Return label of status
3671 3671
      *
@@ -3677,7 +3677,7 @@  discard block
 block discarded – undo
3677 3677
      */
3678 3678
     public function LibStatut($status, $billed, $mode, $donotshowbilled = 0)
3679 3679
     {
3680
-		// phpcs:enable
3680
+        // phpcs:enable
3681 3681
         global $langs, $hookmanager;
3682 3682
 
3683 3683
         $billedtext = '';
Please login to merge, or discard this patch.
htdocs/main.inc.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
         //print "before decoding $val\n";
132 132
         do {
133 133
             $oldval = $val;
134
-            $val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5);    // Decode '&colon;', '&apos;', '&Tab;', '&NewLine', ...
134
+            $val = html_entity_decode($val, ENT_QUOTES | ENT_HTML5); // Decode '&colon;', '&apos;', '&Tab;', '&NewLine', ...
135 135
             // Sometimes we have entities without the ; at end so html_entity_decode does not work but entities is still interpreted by browser.
136 136
             $val = preg_replace_callback(
137 137
                 '/&#(x?[0-9][0-9a-f]+;?)/i',
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
                  *
141 141
                  * @return string
142 142
                  */
143
-                static function ($m) {
143
+                static function($m) {
144 144
                     // Decode '&#110;', ...
145 145
                     return realCharForNumericEntities($m);
146 146
                 },
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
             $inj += preg_match('/user\s*\(/i', $val); // avoid to use function user() or mysql_user() that return current database login
182 182
             $inj += preg_match('/information_schema/i', $val); // avoid to use request that read information_schema database
183 183
             $inj += preg_match('/<svg/i', $val); // <svg can be allowed in POST
184
-            $inj += preg_match('/update[^&=\w].*set.+=/i', $val);   // the [^&=\w] test is to avoid error when request is like action=update&...set... or &updatemodule=...set...
184
+            $inj += preg_match('/update[^&=\w].*set.+=/i', $val); // the [^&=\w] test is to avoid error when request is like action=update&...set... or &updatemodule=...set...
185 185
             $inj += preg_match('/union.+select/i', $val);
186 186
         }
187 187
         if ($type == 3) {
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
         session_set_cookie_params($sessioncookieparams);
432 432
     }
433 433
     session_name($sessionname);
434
-    session_start();    // This call the open and read of session handler
434
+    session_start(); // This call the open and read of session handler
435 435
     //exit; // this exist generates a call to write and close
436 436
 }
437 437
 
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
         unset($_GET['action']);
703 703
         unset($_GET['confirmmassaction']);
704 704
         unset($_GET['massaction']);
705
-        unset($_GET['token']);          // TODO Make a redirect if we have a token in url to remove it ?
705
+        unset($_GET['token']); // TODO Make a redirect if we have a token in url to remove it ?
706 706
         if (isset($savid)) {
707 707
             $_POST['id'] = ((int) $savid);
708 708
         }
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
                 if (!empty($_SERVER["HTTP_USER_AGENT"]) && $_SERVER["HTTP_USER_AGENT"] == 'securitytest') {
1010 1010
                     http_response_code(401); // It makes easier to understand if session was broken during security tests
1011 1011
                 }
1012
-                dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : ''));   // This include http headers
1012
+                dol_loginfunction($langs, $conf, (!empty($mysoc) ? $mysoc : '')); // This include http headers
1013 1013
             }
1014 1014
             exit;
1015 1015
         }
@@ -1357,7 +1357,7 @@  discard block
 block discarded – undo
1357 1357
 } else {
1358 1358
     // We may have NOLOGIN set, but NOREQUIREUSER not
1359 1359
     if (!empty($user) && method_exists($user, 'loadDefaultValues') && !defined('NODEFAULTVALUES')) {
1360
-        $user->loadDefaultValues();     // Load default values for everybody (works even if $user->id = 0
1360
+        $user->loadDefaultValues(); // Load default values for everybody (works even if $user->id = 0
1361 1361
     }
1362 1362
 }
1363 1363
 
Please login to merge, or discard this patch.
htdocs/fichinter/class/fichinter.class.php 2 patches
Indentation   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -834,7 +834,7 @@  discard block
 block discarded – undo
834 834
         return $this->LibStatut((isset($this->statut) ? $this->statut : $this->status), $mode);
835 835
     }
836 836
 
837
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
837
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
838 838
     /**
839 839
      *  Returns the label of a status
840 840
      *
@@ -844,7 +844,7 @@  discard block
 block discarded – undo
844 844
      */
845 845
     public function LibStatut($status, $mode = 0)
846 846
     {
847
-		// phpcs:enable
847
+        // phpcs:enable
848 848
         // Init/load array of translation of status
849 849
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
850 850
             global $langs;
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
         }
1199 1199
     }
1200 1200
 
1201
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1201
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1202 1202
     /**
1203 1203
      *  Defines a delivery date of intervention
1204 1204
      *
@@ -1208,7 +1208,7 @@  discard block
 block discarded – undo
1208 1208
      */
1209 1209
     public function set_date_delivery($user, $date_delivery)
1210 1210
     {
1211
-		// phpcs:enable
1211
+        // phpcs:enable
1212 1212
         if ($user->hasRight('ficheinter', 'creer')) {
1213 1213
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1214 1214
             $sql .= " SET datei = '" . $this->db->idate($date_delivery) . "'";
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
         return 0;
1229 1229
     }
1230 1230
 
1231
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1231
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1232 1232
     /**
1233 1233
      *  Define the label of the intervention
1234 1234
      *
@@ -1238,7 +1238,7 @@  discard block
 block discarded – undo
1238 1238
      */
1239 1239
     public function set_description($user, $description)
1240 1240
     {
1241
-		// phpcs:enable
1241
+        // phpcs:enable
1242 1242
         if ($user->hasRight('ficheinter', 'creer')) {
1243 1243
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1244 1244
             $sql .= " SET description = '" . $this->db->escape($description) . "',";
@@ -1259,7 +1259,7 @@  discard block
 block discarded – undo
1259 1259
     }
1260 1260
 
1261 1261
 
1262
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1262
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1263 1263
     /**
1264 1264
      *  Link intervention to a contract
1265 1265
      *
@@ -1269,7 +1269,7 @@  discard block
 block discarded – undo
1269 1269
      */
1270 1270
     public function set_contrat($user, $contractid)
1271 1271
     {
1272
-		// phpcs:enable
1272
+        // phpcs:enable
1273 1273
         if ($user->hasRight('ficheinter', 'creer')) {
1274 1274
             $sql = "UPDATE " . MAIN_DB_PREFIX . "fichinter ";
1275 1275
             $sql .= " SET fk_contrat = " . ((int) $contractid);
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
         return 1;
1467 1467
     }
1468 1468
 
1469
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1469
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1470 1470
     /**
1471 1471
      *  Load array lines ->lines
1472 1472
      *
@@ -1474,7 +1474,7 @@  discard block
 block discarded – undo
1474 1474
      */
1475 1475
     public function fetch_lines()
1476 1476
     {
1477
-		// phpcs:enable
1477
+        // phpcs:enable
1478 1478
         $this->lines = array();
1479 1479
 
1480 1480
         $sql = "SELECT rowid, fk_fichinter, description, duree, date, rang";
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -196,12 +196,12 @@  discard block
 block discarded – undo
196 196
     /*
197 197
      * No signature
198 198
      */
199
-    const STATUS_NO_SIGNATURE    = 0;
199
+    const STATUS_NO_SIGNATURE = 0;
200 200
 
201 201
     /*
202 202
      * Signed by sender
203 203
      */
204
-    const STATUS_SIGNED_SENDER   = 1;
204
+    const STATUS_SIGNED_SENDER = 1;
205 205
 
206 206
     /*
207 207
      * Signed by receiver
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
     /*
212 212
      * Signed by all
213 213
      */
214
-    const STATUS_SIGNED_ALL      = 9; // To handle future kind of signature (ex: tripartite contract)
214
+    const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
215 215
 
216 216
     /**
217 217
      * Date delivery
@@ -1402,7 +1402,7 @@  discard block
 block discarded – undo
1402 1402
             $line->fk_fichinter = $fichinterid;
1403 1403
             $line->desc         = $desc;
1404 1404
             $line->date         = $date_intervention;
1405
-            $line->datei        = $date_intervention;   // For backward compatibility
1405
+            $line->datei        = $date_intervention; // For backward compatibility
1406 1406
             $line->duration     = $duration;
1407 1407
 
1408 1408
             if (is_array($array_options) && count($array_options) > 0) {
@@ -1499,7 +1499,7 @@  discard block
 block discarded – undo
1499 1499
                 //For invoicing we calculing hours
1500 1500
                 $line->qty = round($objp->duree / 3600, 2);
1501 1501
                 $line->date = $this->db->jdate($objp->date);
1502
-                $line->datei = $this->db->jdate($objp->date);   // For backward compatibility
1502
+                $line->datei = $this->db->jdate($objp->date); // For backward compatibility
1503 1503
                 $line->rang = $objp->rang;
1504 1504
                 $line->product_type = 1;
1505 1505
                 $line->fetch_optionals();
Please login to merge, or discard this patch.
htdocs/fichinter/class/fichinterligne.class.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
         }
284 284
     }
285 285
 
286
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
286
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
287 287
     /**
288 288
      *  Update total duration into llx_fichinter
289 289
      *
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
      */
292 292
     public function update_total()
293 293
     {
294
-		// phpcs:enable
294
+        // phpcs:enable
295 295
         global $conf;
296 296
 
297 297
         $this->db->begin();
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -51,19 +51,19 @@  discard block
 block discarded – undo
51 51
      */
52 52
     public $fk_fichinter;
53 53
 
54
-    public $desc;       // Description ligne
54
+    public $desc; // Description ligne
55 55
 
56 56
     /**
57 57
      * @var int Date of intervention
58 58
      */
59
-    public $date;       // Date intervention
59
+    public $date; // Date intervention
60 60
     /**
61 61
      * @var int Date of intervention
62 62
      * @deprecated
63 63
      */
64
-    public $datei;      // Date intervention
64
+    public $datei; // Date intervention
65 65
 
66
-    public $duration;   // Duration of intervention
66
+    public $duration; // Duration of intervention
67 67
     public $rang = 0;
68 68
     public $tva_tx;
69 69
     public $subprice;
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
             $this->id               = $objp->rowid;
117 117
             $this->fk_fichinter     = $objp->fk_fichinter;
118 118
             $this->date = $this->db->jdate($objp->date);
119
-            $this->datei = $this->db->jdate($objp->date);   // For backward compatibility
119
+            $this->datei = $this->db->jdate($objp->date); // For backward compatibility
120 120
             $this->desc             = $objp->description;
121 121
             $this->duration         = $objp->duree;
122 122
             $this->rang             = $objp->rang;
Please login to merge, or discard this patch.
Deprecated/Modules/Install/Controller/InstallController.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -1202,14 +1202,14 @@  discard block
 block discarded – undo
1202 1202
                                id="db_pass" autocomplete="off"
1203 1203
                                name="db_pass"
1204 1204
                                value="<?php
1205
-                               // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
1206
-                               // @phan-suppress-next-line PhanParamSuspiciousOrder
1207
-                               $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
1208
-                               if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
1205
+                                // If $force_install_databasepass is on, we don't want to set password, we just show '***'. Real value will be extracted from the forced install file at step1.
1206
+                                // @phan-suppress-next-line PhanParamSuspiciousOrder
1207
+                                $autofill = ((!empty($_SESSION['dol_save_pass'])) ? $_SESSION['dol_save_pass'] : str_pad('', strlen($force_install_databasepass), '*'));
1208
+                                if (!empty($dolibarr_main_prod) && empty($_SESSION['dol_save_pass'])) {    // So value can't be found if install page still accessible
1209 1209
                                     $autofill = '';
1210
-                               }
1211
-                               print dol_escape_htmltag($autofill);
1212
-                               ?>"
1210
+                                }
1211
+                                print dol_escape_htmltag($autofill);
1212
+                                ?>"
1213 1213
                             <?php if ($force_install_noedit == 2 && $force_install_databasepass !== null) {
1214 1214
                                 print ' disabled';
1215 1215
                             } ?>
@@ -1291,23 +1291,23 @@  discard block
 block discarded – undo
1291 1291
                                name="db_pass_root"
1292 1292
                                class="needroot text-security"
1293 1293
                                value="<?php
1294
-                               // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
1295
-                               // @phan-suppress-next-line PhanParamSuspiciousOrder
1296
-                               $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
1297
-                               if (!empty($dolibarr_main_prod)) {
1294
+                                // If $force_install_databaserootpass is on, we don't want to set password here, we just show '***'. Real value will be extracted from the forced install file at step1.
1295
+                                // @phan-suppress-next-line PhanParamSuspiciousOrder
1296
+                                $autofill = ((!empty($force_install_databaserootpass)) ? str_pad('', strlen($force_install_databaserootpass), '*') : (isset($db_pass_root) ? $db_pass_root : ''));
1297
+                                if (!empty($dolibarr_main_prod)) {
1298 1298
                                     $autofill = '';
1299
-                               }
1300
-                               // Do not autofill password if instance is a production instance
1301
-                               if (
1302
-                                   !empty($_SERVER["SERVER_NAME"]) && !in_array(
1303
-                                       $_SERVER["SERVER_NAME"],
1304
-                                       ['127.0.0.1', 'localhost', 'localhostgit']
1305
-                                   )
1306
-                               ) {
1299
+                                }
1300
+                                // Do not autofill password if instance is a production instance
1301
+                                if (
1302
+                                    !empty($_SERVER["SERVER_NAME"]) && !in_array(
1303
+                                        $_SERVER["SERVER_NAME"],
1304
+                                        ['127.0.0.1', 'localhost', 'localhostgit']
1305
+                                    )
1306
+                                ) {
1307 1307
                                     $autofill = '';
1308
-                               }    // Do not autofill password for remote access
1309
-                               print dol_escape_htmltag($autofill);
1310
-                               ?>"
1308
+                                }    // Do not autofill password for remote access
1309
+                                print dol_escape_htmltag($autofill);
1310
+                                ?>"
1311 1311
                             <?php if ($force_install_noedit > 0 && !empty($force_install_databaserootpass)) {
1312 1312
                                 print ' disabled'; /* May be removed by javascript*/
1313 1313
                             } ?>
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -550,7 +550,7 @@  discard block
 block discarded – undo
550 550
                     $allowupgrade = true;
551 551
                 }
552 552
 
553
-                $dir = DOL_DOCUMENT_ROOT . "/install/mysql/migration/";   // We use mysql migration scripts whatever is database driver
553
+                $dir = DOL_DOCUMENT_ROOT . "/install/mysql/migration/"; // We use mysql migration scripts whatever is database driver
554 554
                 dolibarr_install_syslog("Scan sql files for migration files in " . $dir);
555 555
 
556 556
                 // Get files list of migration file x.y.z-a.b.c.sql into /install/mysql/migration
@@ -2045,67 +2045,67 @@  discard block
 block discarded – undo
2045 2045
                     fwrite($fp, "\n");
2046 2046
                     if (empty($force_dolibarr_lib_FPDF_PATH)) {
2047 2047
                         fwrite($fp, '//');
2048
-                        $force_dolibarr_lib_FPDF_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2048
+                        $force_dolibarr_lib_FPDF_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2049 2049
                     }
2050 2050
                     fwrite($fp, '$dolibarr_lib_FPDF_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_FPDF_PATH)) . '";');
2051 2051
                     fwrite($fp, "\n");
2052 2052
                     if (empty($force_dolibarr_lib_TCPDF_PATH)) {
2053 2053
                         fwrite($fp, '//');
2054
-                        $force_dolibarr_lib_TCPDF_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2054
+                        $force_dolibarr_lib_TCPDF_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2055 2055
                     }
2056 2056
                     fwrite($fp, '$dolibarr_lib_TCPDF_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_TCPDF_PATH)) . '";');
2057 2057
                     fwrite($fp, "\n");
2058 2058
                     if (empty($force_dolibarr_lib_FPDI_PATH)) {
2059 2059
                         fwrite($fp, '//');
2060
-                        $force_dolibarr_lib_FPDI_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2060
+                        $force_dolibarr_lib_FPDI_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2061 2061
                     }
2062 2062
                     fwrite($fp, '$dolibarr_lib_FPDI_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_FPDI_PATH)) . '";');
2063 2063
                     fwrite($fp, "\n");
2064 2064
                     if (empty($force_dolibarr_lib_TCPDI_PATH)) {
2065 2065
                         fwrite($fp, '//');
2066
-                        $force_dolibarr_lib_TCPDI_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2066
+                        $force_dolibarr_lib_TCPDI_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2067 2067
                     }
2068 2068
                     fwrite($fp, '$dolibarr_lib_TCPDI_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_TCPDI_PATH)) . '";');
2069 2069
                     fwrite($fp, "\n");
2070 2070
                     if (empty($force_dolibarr_lib_GEOIP_PATH)) {
2071 2071
                         fwrite($fp, '//');
2072
-                        $force_dolibarr_lib_GEOIP_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2072
+                        $force_dolibarr_lib_GEOIP_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2073 2073
                     }
2074 2074
                     fwrite($fp, '$dolibarr_lib_GEOIP_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_GEOIP_PATH)) . '";');
2075 2075
                     fwrite($fp, "\n");
2076 2076
                     if (empty($force_dolibarr_lib_NUSOAP_PATH)) {
2077 2077
                         fwrite($fp, '//');
2078
-                        $force_dolibarr_lib_NUSOAP_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2078
+                        $force_dolibarr_lib_NUSOAP_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2079 2079
                     }
2080 2080
                     fwrite($fp, '$dolibarr_lib_NUSOAP_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_NUSOAP_PATH)) . '";');
2081 2081
                     fwrite($fp, "\n");
2082 2082
                     if (empty($force_dolibarr_lib_ODTPHP_PATH)) {
2083 2083
                         fwrite($fp, '//');
2084
-                        $force_dolibarr_lib_ODTPHP_PATH = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2084
+                        $force_dolibarr_lib_ODTPHP_PATH = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2085 2085
                     }
2086 2086
                     fwrite($fp, '$dolibarr_lib_ODTPHP_PATH="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_ODTPHP_PATH)) . '";');
2087 2087
                     fwrite($fp, "\n");
2088 2088
                     if (empty($force_dolibarr_lib_ODTPHP_PATHTOPCLZIP)) {
2089 2089
                         fwrite($fp, '//');
2090
-                        $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2090
+                        $force_dolibarr_lib_ODTPHP_PATHTOPCLZIP = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2091 2091
                     }
2092 2092
                     fwrite($fp, '$dolibarr_lib_ODTPHP_PATHTOPCLZIP="' . dol_escape_php(dol_sanitizePathName($force_dolibarr_lib_ODTPHP_PATHTOPCLZIP)) . '";');
2093 2093
                     fwrite($fp, "\n");
2094 2094
                     if (empty($force_dolibarr_js_CKEDITOR)) {
2095 2095
                         fwrite($fp, '//');
2096
-                        $force_dolibarr_js_CKEDITOR = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2096
+                        $force_dolibarr_js_CKEDITOR = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2097 2097
                     }
2098 2098
                     fwrite($fp, '$dolibarr_js_CKEDITOR=\'' . dol_escape_php($force_dolibarr_js_CKEDITOR, 1) . '\';');
2099 2099
                     fwrite($fp, "\n");
2100 2100
                     if (empty($force_dolibarr_js_JQUERY)) {
2101 2101
                         fwrite($fp, '//');
2102
-                        $force_dolibarr_js_JQUERY = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2102
+                        $force_dolibarr_js_JQUERY = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2103 2103
                     }
2104 2104
                     fwrite($fp, '$dolibarr_js_JQUERY=\'' . dol_escape_php($force_dolibarr_js_JQUERY, 1) . '\';');
2105 2105
                     fwrite($fp, "\n");
2106 2106
                     if (empty($force_dolibarr_js_JQUERY_UI)) {
2107 2107
                         fwrite($fp, '//');
2108
-                        $force_dolibarr_js_JQUERY_UI = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2108
+                        $force_dolibarr_js_JQUERY_UI = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2109 2109
                     }
2110 2110
                     fwrite($fp, '$dolibarr_js_JQUERY_UI=\'' . dol_escape_php($force_dolibarr_js_JQUERY_UI, 1) . '\';');
2111 2111
                     fwrite($fp, "\n");
@@ -2114,13 +2114,13 @@  discard block
 block discarded – undo
2114 2114
                     fwrite($fp, "\n");
2115 2115
                     if (empty($force_dolibarr_font_DOL_DEFAULT_TTF)) {
2116 2116
                         fwrite($fp, '//');
2117
-                        $force_dolibarr_font_DOL_DEFAULT_TTF = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2117
+                        $force_dolibarr_font_DOL_DEFAULT_TTF = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2118 2118
                     }
2119 2119
                     fwrite($fp, '$dolibarr_font_DOL_DEFAULT_TTF=\'' . dol_escape_php($force_dolibarr_font_DOL_DEFAULT_TTF, 1) . '\';');
2120 2120
                     fwrite($fp, "\n");
2121 2121
                     if (empty($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD)) {
2122 2122
                         fwrite($fp, '//');
2123
-                        $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD = '';  // @phan-suppress-current-line PhanPluginRedundantAssignment
2123
+                        $force_dolibarr_font_DOL_DEFAULT_TTF_BOLD = ''; // @phan-suppress-current-line PhanPluginRedundantAssignment
2124 2124
                     }
2125 2125
                     fwrite($fp, '$dolibarr_font_DOL_DEFAULT_TTF_BOLD=\'' . dol_escape_php($force_dolibarr_font_DOL_DEFAULT_TTF_BOLD, 1) . '\';');
2126 2126
                     fwrite($fp, "\n");
@@ -2440,9 +2440,9 @@  discard block
 block discarded – undo
2440 2440
 // Only works if you are not in safe_mode. / Ne fonctionne que si on est pas en safe_mode.
2441 2441
 
2442 2442
         $err = error_reporting();
2443
-        error_reporting(0);      // Disable all errors
2443
+        error_reporting(0); // Disable all errors
2444 2444
 //error_reporting(E_ALL);
2445
-        @set_time_limit(1800);   // Need 1800 on some very slow OS like Windows 7/64
2445
+        @set_time_limit(1800); // Need 1800 on some very slow OS like Windows 7/64
2446 2446
         error_reporting($err);
2447 2447
 
2448 2448
         $action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : (empty($argv[1]) ? '' : $argv[1]);
@@ -2996,7 +2996,7 @@  discard block
 block discarded – undo
2996 2996
 
2997 2997
         $conf->file->instance_unique_id = (empty($dolibarr_main_instance_unique_id) ? (empty($dolibarr_main_cookie_cryptkey) ? '' : $dolibarr_main_cookie_cryptkey) : $dolibarr_main_instance_unique_id); // Unique id of instance
2998 2998
 
2999
-        $hash_unique_id = dol_hash('dolibarr' . $conf->file->instance_unique_id, 'sha256');   // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
2999
+        $hash_unique_id = dol_hash('dolibarr' . $conf->file->instance_unique_id, 'sha256'); // Note: if the global salt changes, this hash changes too so ping may be counted twice. We don't mind. It is for statistics purpose only.
3000 3000
 
3001 3001
         $out = '<input type="checkbox" name="dolibarrpingno" id="dolibarrpingno"' . ((getDolGlobalString('MAIN_FIRST_PING_OK_ID') == 'disabled') ? '' : ' value="checked" checked="true"') . '> ';
3002 3002
         $out .= '<label for="dolibarrpingno">' . $langs->trans("MakeAnonymousPing") . '</label>';
@@ -3331,8 +3331,8 @@  discard block
 block discarded – undo
3331 3331
                     $newuser->admin = 1;
3332 3332
                     $newuser->entity = 0;
3333 3333
 
3334
-                    $conf->global->USER_MAIL_REQUIRED = 0;          // Force global option to be sure to create a new user with no email
3335
-                    $conf->global->USER_PASSWORD_GENERATED = '';    // To not use any rule for password validation
3334
+                    $conf->global->USER_MAIL_REQUIRED = 0; // Force global option to be sure to create a new user with no email
3335
+                    $conf->global->USER_PASSWORD_GENERATED = ''; // To not use any rule for password validation
3336 3336
 
3337 3337
                     $result = $newuser->create($createuser, 1);
3338 3338
                     if ($result > 0) {
Please login to merge, or discard this patch.
Deprecated/Modules/Billing/Model/CommonInvoice.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -99,9 +99,9 @@  discard block
 block discarded – undo
99 99
      */
100 100
     public $revenuestamp;
101 101
 
102
-    public $totalpaid;          // duplicate with sumpayed
103
-    public $totaldeposits;      // duplicate with sumdeposit
104
-    public $totalcreditnotes;   // duplicate with sumcreditnote
102
+    public $totalpaid; // duplicate with sumpayed
103
+    public $totaldeposits; // duplicate with sumdeposit
104
+    public $totalcreditnotes; // duplicate with sumcreditnote
105 105
 
106 106
     public $sumpayed;
107 107
     public $sumpayed_multicurrency;
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
         if ($this->status > self::STATUS_DRAFT && $this->paye == 0) {
1168 1168
             // Get the default payment mode for BAN payment of the third party
1169 1169
             require_once DOL_DOCUMENT_ROOT . '/societe/class/companybankaccount.class.php';
1170
-            $bac = new CompanyBankAccount($this->db);   // table societe_rib
1170
+            $bac = new CompanyBankAccount($this->db); // table societe_rib
1171 1171
             $result = $bac->fetch(0, $this->socid, 1, 'ban');
1172 1172
             if ($result <= 0 || empty($bac->id)) {
1173 1173
                 $this->error = $langs->trans("ThirdpartyHasNoDefaultBanAccount");
@@ -1181,16 +1181,16 @@  discard block
 block discarded – undo
1181 1181
             $sql .= " FROM " . $this->db->prefix() . "prelevement_demande";
1182 1182
             $sql .= " WHERE rowid = " . ((int) $did);
1183 1183
             if ($type != 'bank-transfer' && $type != 'credit-transfer') {
1184
-                $sql .= " AND fk_facture = " . ((int) $this->id);             // Add a protection to not pay another invoice than current one
1184
+                $sql .= " AND fk_facture = " . ((int) $this->id); // Add a protection to not pay another invoice than current one
1185 1185
             }
1186 1186
             if ($type != 'direct-debit') {
1187 1187
                 if ($sourcetype == 'salary') {
1188
-                    $sql .= " AND fk_salary = " . ((int) $this->id);          // Add a protection to not pay another salary than current one
1188
+                    $sql .= " AND fk_salary = " . ((int) $this->id); // Add a protection to not pay another salary than current one
1189 1189
                 } else {
1190
-                    $sql .= " AND fk_facture_fourn = " . ((int) $this->id);   // Add a protection to not pay another invoice than current one
1190
+                    $sql .= " AND fk_facture_fourn = " . ((int) $this->id); // Add a protection to not pay another invoice than current one
1191 1191
                 }
1192 1192
             }
1193
-            $sql .= " AND traite = 0";  // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0)
1193
+            $sql .= " AND traite = 0"; // To not process payment request that were already converted into a direct debit or credit transfer order (Note: fk_prelevement_bons is also empty when traite = 0)
1194 1194
 
1195 1195
             dol_syslog(get_class($this) . "::makeStripeSepaRequest load requests to process", LOG_DEBUG);
1196 1196
             $resql = $this->db->query($sql);
@@ -1206,7 +1206,7 @@  discard block
 block discarded – undo
1206 1206
 
1207 1207
                 if (is_numeric($amount) && $amount != 0) {
1208 1208
                     require_once DOL_DOCUMENT_ROOT . '/societe/class/companypaymentmode.class.php';
1209
-                    $companypaymentmode = new CompanyPaymentMode($this->db);    // table societe_rib
1209
+                    $companypaymentmode = new CompanyPaymentMode($this->db); // table societe_rib
1210 1210
                     $companypaymentmode->fetch($bac->id);
1211 1211
 
1212 1212
                     $this->stripechargedone = 0;
@@ -1216,7 +1216,7 @@  discard block
 block discarded – undo
1216 1216
 
1217 1217
                     $currency = $conf->currency;
1218 1218
 
1219
-                    $errorforinvoice = 0;     // We reset the $errorforinvoice at each invoice loop
1219
+                    $errorforinvoice = 0; // We reset the $errorforinvoice at each invoice loop
1220 1220
 
1221 1221
                     $this->fetch_thirdparty();
1222 1222
 
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
                         $amountstripe = $amountstripe * 100;
1236 1236
                     }
1237 1237
 
1238
-                    $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS');     // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr.
1238
+                    $fk_bank_account = getDolGlobalInt('STRIPE_BANK_ACCOUNT_FOR_PAYMENTS'); // Bank account used for SEPA direct debit or credit transfer. Must be the Stripe account in Dolibarr.
1239 1239
                     if (!($fk_bank_account > 0)) {
1240 1240
                         $error++;
1241 1241
                         $errorforinvoice++;
@@ -1296,7 +1296,7 @@  discard block
 block discarded – undo
1296 1296
                                 $thirdparty = new Societe($this->db);
1297 1297
                                 $resultthirdparty = $thirdparty->fetch($this->socid);
1298 1298
 
1299
-                                include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php';        // This include the include of htdocs/stripe/config.php
1299
+                                include_once DOL_DOCUMENT_ROOT . '/stripe/class/stripe.class.php'; // This include the include of htdocs/stripe/config.php
1300 1300
                                 // So it inits or erases the $stripearrayofkeysbyenv
1301 1301
                                 $stripe = new Stripe($this->db);
1302 1302
 
@@ -1322,7 +1322,7 @@  discard block
 block discarded – undo
1322 1322
                                             $stripearrayofkeys = $stripearrayofkeysbyenv[$servicestatus];
1323 1323
                                             \Stripe\Stripe::setApiKey($stripearrayofkeys['secret_key']);
1324 1324
 
1325
-                                            $foundalternativestripeaccount = $tmparray[0];    // Store the customer id
1325
+                                            $foundalternativestripeaccount = $tmparray[0]; // Store the customer id
1326 1326
 
1327 1327
                                             dol_syslog("makeStripeSepaRequest We use now customer=" . $foundalternativestripeaccount . " publishable_key=" . $stripearrayofkeys['publishable_key'], LOG_DEBUG);
1328 1328
                                         }
@@ -1343,7 +1343,7 @@  discard block
 block discarded – undo
1343 1343
                                     dol_syslog("makeStripeSepaRequest No dedicated Stripe Account requested, so we use global one, so " . $stripearrayofkeys['publishable_key'], LOG_DEBUG);
1344 1344
                                 }
1345 1345
 
1346
-                                $stripeacc = $stripe->getStripeAccount($service, $this->socid);                             // Get Stripe OAuth connect account if it exists (no network access here)
1346
+                                $stripeacc = $stripe->getStripeAccount($service, $this->socid); // Get Stripe OAuth connect account if it exists (no network access here)
1347 1347
 
1348 1348
                                 if ($foundalternativestripeaccount) {
1349 1349
                                     if (empty($stripeacc)) {                // If the Stripe connect account not set, we use common API usage
@@ -1409,7 +1409,7 @@  discard block
 block discarded – undo
1409 1409
                                                 $charge->failure_message = $stripe->error;
1410 1410
                                                 $charge->failure_declinecode = $stripe->declinecode;
1411 1411
                                                 $stripefailurecode = $stripe->code;
1412
-                                                $stripefailuremessage = 'Action required. Contact the support at ';// . $conf->global->SELLYOURSAAS_MAIN_EMAIL;
1412
+                                                $stripefailuremessage = 'Action required. Contact the support at '; // . $conf->global->SELLYOURSAAS_MAIN_EMAIL;
1413 1413
                                                 $stripefailuredeclinecode = $stripe->declinecode;
1414 1414
                                             } else {
1415 1415
                                                 dol_syslog(var_export($paymentintent, true), LOG_DEBUG);
@@ -1535,7 +1535,7 @@  discard block
 block discarded – undo
1535 1535
                                     $description = 'Failed to find or use your payment mode (no payment mode for this customer id)';
1536 1536
                                     $stripefailurecode = 'BADPAYMENTMODE';
1537 1537
                                     $stripefailuremessage = 'Failed to find or use your payment mode (no payment mode for this customer id)';
1538
-                                    $postactionmessages = [];  // @phan-suppress-current-line PhanPluginRedundantAssignment
1538
+                                    $postactionmessages = []; // @phan-suppress-current-line PhanPluginRedundantAssignment
1539 1539
 
1540 1540
                                     $object = $this;
1541 1541
 
@@ -1550,18 +1550,18 @@  discard block
 block discarded – undo
1550 1550
                                     // Insert record of payment (success or error)
1551 1551
                                     $actioncomm = new ActionComm($this->db);
1552 1552
 
1553
-                                    $actioncomm->type_code = 'AC_OTH_AUTO';     // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
1553
+                                    $actioncomm->type_code = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
1554 1554
                                     $actioncomm->code = 'AC_' . $actioncode;
1555 1555
                                     $actioncomm->label = $description;
1556 1556
                                     $actioncomm->note_private = implode(",\n", $postactionmessages);
1557 1557
                                     $actioncomm->fk_project = $this->fk_project;
1558 1558
                                     $actioncomm->datep = $now;
1559 1559
                                     $actioncomm->datef = $now;
1560
-                                    $actioncomm->percentage = -1;   // Not applicable
1560
+                                    $actioncomm->percentage = -1; // Not applicable
1561 1561
                                     $actioncomm->socid = $thirdparty->id;
1562 1562
                                     $actioncomm->contactid = 0;
1563
-                                    $actioncomm->authorid = $user->id;   // User saving action
1564
-                                    $actioncomm->userownerid = $user->id;   // Owner of action
1563
+                                    $actioncomm->authorid = $user->id; // User saving action
1564
+                                    $actioncomm->userownerid = $user->id; // Owner of action
1565 1565
                                     // Fields when action is a real email (content is already into note)
1566 1566
                                     /*$actioncomm->email_msgid = $object->email_msgid;
1567 1567
                                      $actioncomm->email_from  = $object->email_from;
@@ -1732,10 +1732,10 @@  discard block
 block discarded – undo
1732 1732
         $s .= pack('C1', 3) . pack('C1', strlen($datestring)) . $datestring;
1733 1733
         $s .= pack('C1', 4) . pack('C1', strlen($pricewithtaxstring)) . $pricewithtaxstring;
1734 1734
         $s .= pack('C1', 5) . pack('C1', strlen($pricetaxstring)) . $pricetaxstring;
1735
-        $s .= '';                   // Hash of xml invoice
1736
-        $s .= '';                   // ecda signature
1737
-        $s .= '';                   // ecda public key
1738
-        $s .= '';                   // ecda signature of public key stamp
1735
+        $s .= ''; // Hash of xml invoice
1736
+        $s .= ''; // ecda signature
1737
+        $s .= ''; // ecda public key
1738
+        $s .= ''; // ecda signature of public key stamp
1739 1739
 
1740 1740
         $s = base64_encode($s);
1741 1741
 
@@ -1803,8 +1803,8 @@  discard block
 block discarded – undo
1803 1803
             $s .= "S\n";
1804 1804
             $s .= dol_trunc($bankaccount->proprio, 70, 'right', 'UTF-8', 1) . "\n";
1805 1805
             $addresslinearray = explode("\n", $bankaccount->owner_address);
1806
-            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1807
-            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1806
+            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1807
+            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1808 1808
             /*$s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1)."\n";
1809 1809
             $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1)."\n";
1810 1810
             $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1)."\n";*/
@@ -1812,8 +1812,8 @@  discard block
 block discarded – undo
1812 1812
             $s .= "S\n";
1813 1813
             $s .= dol_trunc($mysoc->name, 70, 'right', 'UTF-8', 1) . "\n";
1814 1814
             $addresslinearray = explode("\n", $mysoc->address);
1815
-            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1816
-            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1815
+            $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1816
+            $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1817 1817
             $s .= dol_trunc($mysoc->zip, 16, 'right', 'UTF-8', 1) . "\n";
1818 1818
             $s .= dol_trunc($mysoc->town, 35, 'right', 'UTF-8', 1) . "\n";
1819 1819
             $s .= dol_trunc($mysoc->country_code, 2, 'right', 'UTF-8', 1) . "\n";
@@ -1833,14 +1833,14 @@  discard block
 block discarded – undo
1833 1833
         $s .= "S\n";
1834 1834
         $s .= dol_trunc($this->thirdparty->name, 70, 'right', 'UTF-8', 1) . "\n";
1835 1835
         $addresslinearray = explode("\n", $this->thirdparty->address);
1836
-        $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n";     // address line 1
1837
-        $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n";     // address line 2
1836
+        $s .= dol_trunc(empty($addresslinearray[1]) ? '' : $addresslinearray[1], 70, 'right', 'UTF-8', 1) . "\n"; // address line 1
1837
+        $s .= dol_trunc(empty($addresslinearray[2]) ? '' : $addresslinearray[2], 70, 'right', 'UTF-8', 1) . "\n"; // address line 2
1838 1838
         $s .= dol_trunc($this->thirdparty->zip, 16, 'right', 'UTF-8', 1) . "\n";
1839 1839
         $s .= dol_trunc($this->thirdparty->town, 35, 'right', 'UTF-8', 1) . "\n";
1840 1840
         $s .= dol_trunc($this->thirdparty->country_code, 2, 'right', 'UTF-8', 1) . "\n";
1841 1841
         // ID of payment
1842
-        $s .= "NON\n";          // NON or QRR
1843
-        $s .= "\n";             // QR Code reference if previous field is QRR
1842
+        $s .= "NON\n"; // NON or QRR
1843
+        $s .= "\n"; // QR Code reference if previous field is QRR
1844 1844
         // Free text
1845 1845
         if ($complementaryinfo) {
1846 1846
             $s .= $complementaryinfo . "\n";
Please login to merge, or discard this patch.
Deprecated/Modules/Accounting/Controller/AccountingCustomerController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -339,9 +339,9 @@  discard block
 block discarded – undo
339 339
             $sql .= " co.code as country_code, co.label as country_label,";
340 340
             $sql .= " s.tva_intra,";
341 341
             if (getDolGlobalString('MAIN_COMPANY_PERENTITY_SHARED')) {
342
-                $sql .= " spe.accountancy_code_sell as company_code_sell";  // accounting code for product but stored on thirdparty
342
+                $sql .= " spe.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty
343 343
             } else {
344
-                $sql .= " s.accountancy_code_sell as company_code_sell";    // accounting code for product but stored on thirdparty
344
+                $sql .= " s.accountancy_code_sell as company_code_sell"; // accounting code for product but stored on thirdparty
345 345
             }
346 346
             $sql .= " FROM " . $db->prefix() . "facture as f";
347 347
             $sql .= " INNER JOIN " . $db->prefix() . "societe as s ON s.rowid = f.fk_soc";
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
                 $sql .= " LEFT JOIN " . $db->prefix() . "societe_perentity as spe ON spe.fk_soc = s.rowid AND spe.entity = " . ((int) $conf->entity);
350 350
             }
351 351
             $sql .= " LEFT JOIN " . $db->prefix() . "c_country as co ON co.rowid = s.fk_pays ";
352
-            $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture";   // the main table
352
+            $sql .= " INNER JOIN " . $db->prefix() . "facturedet as l ON f.rowid = l.fk_facture"; // the main table
353 353
             $sql .= " LEFT JOIN " . $db->prefix() . "product as p ON p.rowid = l.fk_product";
354 354
             if (getDolGlobalString('MAIN_PRODUCT_PERENTITY_SHARED')) {
355 355
                 $sql .= " LEFT JOIN " . $db->prefix() . "product_perentity as ppe ON ppe.fk_product = p.rowid AND ppe.entity = " . ((int) $conf->entity);
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
                     $thirdpartystatic->email = !empty($objp->email) ? $objp->email : "";
404 404
                     $thirdpartystatic->country_code = !empty($objp->country_code) ? $objp->country_code : "";
405 405
                     $thirdpartystatic->tva_intra = !empty($objp->tva_intra) ? $objp->tva_intra : "";
406
-                    $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : "";      // The accounting account for product stored on thirdparty object (for level3 suggestion)
406
+                    $thirdpartystatic->code_compta_product = !empty($objp->company_code_sell) ? $objp->company_code_sell : ""; // The accounting account for product stored on thirdparty object (for level3 suggestion)
407 407
 
408 408
                     $product_static->ref = $objp->product_ref;
409 409
                     $product_static->id = $objp->product_id;
@@ -871,7 +871,7 @@  discard block
 block discarded – undo
871 871
                                 "MONTH(f.datef) = " . ((int) $j),
872 872
                                 " (" . $db->ifsql(
873 873
                                     "fd.total_ht < 0",
874
-                                    " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))",   // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
874
+                                    " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
875 875
                                     "  (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))"
876 876
                                 ) . ")",
877 877
                                 0
@@ -879,7 +879,7 @@  discard block
 block discarded – undo
879 879
                     }
880 880
                     $sql .= "  SUM(" . $db->ifsql(
881 881
                             "fd.total_ht < 0",
882
-                            " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))",   // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
882
+                            " (-1 * (abs(fd.total_ht) - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100))))", // TODO This is bugged, we must use the percent for the invoice and fd.situation_percent is cumulated percent !
883 883
                             "  (fd.total_ht - (fd.buy_price_ht * fd.qty * (fd.situation_percent / 100)))"
884 884
                         ) . ") as total";
885 885
                 } else {
@@ -987,7 +987,7 @@  discard block
 block discarded – undo
987 987
         $search_date_endday = GETPOSTINT('search_date_endday');
988 988
         $search_date_endmonth = GETPOSTINT('search_date_endmonth');
989 989
         $search_date_endyear = GETPOSTINT('search_date_endyear');
990
-        $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
990
+        $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
991 991
         $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
992 992
         $search_country = GETPOST('search_country', 'alpha');
993 993
         $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -1561,7 +1561,7 @@  discard block
 block discarded – undo
1561 1561
         $search_date_endday = GETPOSTINT('search_date_endday');
1562 1562
         $search_date_endmonth = GETPOSTINT('search_date_endmonth');
1563 1563
         $search_date_endyear = GETPOSTINT('search_date_endyear');
1564
-        $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear);   // Use tzserver
1564
+        $search_date_start = dol_mktime(0, 0, 0, $search_date_startmonth, $search_date_startday, $search_date_startyear); // Use tzserver
1565 1565
         $search_date_end = dol_mktime(23, 59, 59, $search_date_endmonth, $search_date_endday, $search_date_endyear);
1566 1566
         $search_country = GETPOST('search_country', 'alpha');
1567 1567
         $search_tvaintra = GETPOST('search_tvaintra', 'alpha');
@@ -2058,14 +2058,14 @@  discard block
 block discarded – undo
2058 2058
                 $thirdpartystatic->client = $objp->client;
2059 2059
                 $thirdpartystatic->fournisseur = $objp->fournisseur;
2060 2060
                 $thirdpartystatic->code_client = $objp->code_client;
2061
-                $thirdpartystatic->code_compta = $objp->code_compta_client;     // For backward compatibility
2061
+                $thirdpartystatic->code_compta = $objp->code_compta_client; // For backward compatibility
2062 2062
                 $thirdpartystatic->code_compta_client = $objp->code_compta_client;
2063 2063
                 $thirdpartystatic->code_fournisseur = $objp->code_fournisseur;
2064 2064
                 $thirdpartystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
2065 2065
                 $thirdpartystatic->email = $objp->email;
2066 2066
                 $thirdpartystatic->country_code = $objp->country_code;
2067 2067
                 $thirdpartystatic->tva_intra = $objp->tva_intra;
2068
-                $thirdpartystatic->code_compta_product = $objp->company_code_sell;      // The accounting account for product stored on thirdparty object (for level3 suggestion)
2068
+                $thirdpartystatic->code_compta_product = $objp->company_code_sell; // The accounting account for product stored on thirdparty object (for level3 suggestion)
2069 2069
 
2070 2070
                 $product_static->ref = $objp->product_ref;
2071 2071
                 $product_static->id = $objp->product_id;
Please login to merge, or discard this patch.