Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
Dolibarr/Code/Bom/Classes/BOM.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1430,7 +1430,7 @@  discard block
 block discarded – undo
1430 1430
             foreach ($this->lines as &$line) {
1431 1431
                 $tmpproduct->cost_price = 0;
1432 1432
                 $tmpproduct->pmp = 0;
1433
-                $result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1);   // We discard selling price and language loading
1433
+                $result = $tmpproduct->fetch($line->fk_product, '', '', '', 0, 1, 1); // We discard selling price and language loading
1434 1434
 
1435 1435
                 if ($tmpproduct->type == $tmpproduct::TYPE_PRODUCT) {
1436 1436
                     if (empty($line->fk_bom_child)) {
@@ -1625,7 +1625,7 @@  discard block
 block discarded – undo
1625 1625
      */
1626 1626
     public function getKanbanView($option = '', $arraydata = null)
1627 1627
     {
1628
-        global $db,$langs;
1628
+        global $db, $langs;
1629 1629
 
1630 1630
         $selected = (empty($arraydata['selected']) ? 0 : $arraydata['selected']);
1631 1631
 
Please login to merge, or discard this 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.
Dolibarr/Code/Bom/Api/Boms.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -716,7 +716,7 @@  discard block
 block discarded – undo
716 716
         }
717 717
     }
718 718
 
719
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
719
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
720 720
     /**
721 721
      * Clean sensible object datas
722 722
      *
@@ -725,7 +725,7 @@  discard block
 block discarded – undo
725 725
      */
726 726
     protected function _cleanObjectDatas($object)
727 727
     {
728
-		// phpcs:enable
728
+        // phpcs:enable
729 729
         $object = parent::_cleanObjectDatas($object);
730 730
 
731 731
         unset($object->rowid);
Please login to merge, or discard this patch.
Dolibarr/Code/Asset/Classes/AssetAccountancyCodes.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 block discarded – undo
48 48
                 'receivable_on_assignment' => array('label' => 'AssetAccountancyCodeReceivableOnAssignment'),
49 49
                 'proceeds_from_sales' => array('label' => 'AssetAccountancyCodeProceedsFromSales'),
50 50
                 'vat_collected' => array('label' => 'AssetAccountancyCodeVatCollected'),
51
-                'vat_deductible' => array('label' => 'AssetAccountancyCodeVatDeductible','column_break' => true),
51
+                'vat_deductible' => array('label' => 'AssetAccountancyCodeVatDeductible', 'column_break' => true),
52 52
             ),
53 53
         ),
54 54
         'accelerated_depreciation' => array(
Please login to merge, or discard this patch.
Dolibarr/Code/Asset/Classes/AssetModel.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
         return $this->LibStatut($this->status, $mode);
1439 1439
     }
1440 1440
 
1441
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1441
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1442 1442
     /**
1443 1443
      *  Return the status
1444 1444
      *
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
      */
1449 1449
     public function LibStatut($status, $mode = 0)
1450 1450
     {
1451
-		// phpcs:enable
1451
+        // phpcs:enable
1452 1452
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
1453 1453
             global $langs;
1454 1454
             //$langs->load("assets");
Please login to merge, or discard this patch.
Dolibarr/Code/Asset/Classes/Asset.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1438,7 +1438,7 @@  discard block
 block discarded – undo
1438 1438
         return $this->LibStatut($this->status, $mode);
1439 1439
     }
1440 1440
 
1441
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1441
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1442 1442
     /**
1443 1443
      *  Return the status
1444 1444
      *
@@ -1448,7 +1448,7 @@  discard block
 block discarded – undo
1448 1448
      */
1449 1449
     public function LibStatut($status, $mode = 0)
1450 1450
     {
1451
-		// phpcs:enable
1451
+        // phpcs:enable
1452 1452
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
1453 1453
             global $langs;
1454 1454
             //$langs->load("assets");
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -63,8 +63,8 @@
 block discarded – undo
63 63
      */
64 64
     public $picto = 'asset';
65 65
 
66
-    const STATUS_DRAFT = 0;     // In progress
67
-    const STATUS_DISPOSED = 9;  // Disposed
66
+    const STATUS_DRAFT = 0; // In progress
67
+    const STATUS_DISPOSED = 9; // Disposed
68 68
 
69 69
     /**
70 70
      *  'type' field format ('integer', 'integer:ObjectClass:PathToClass[:AddCreateButtonOrNot[:Filter[:Sortfield]]]', 'sellist:TableName:LabelFieldName[:KeyFieldName[:KeyFieldParent[:Filter[:Sortfield]]]]', 'varchar(x)', 'double(24,8)', 'real', 'price', 'text', 'text:none', 'html', 'date', 'datetime', 'timestamp', 'duration', 'mail', 'phone', 'url', 'password')
Please login to merge, or discard this patch.
Dolibarr/Code/Asset/Classes/AssetDepreciationOptions.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
             'table' => 'asset_depreciation_options_economic',
81 81
             'fields' => array(
82 82
                 'depreciation_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDepreciationType', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDepreciationTypeLinear', '1' => 'AssetDepreciationOptionDepreciationTypeDegressive', '2' => 'AssetDepreciationOptionDepreciationTypeExceptional'), 'validate' => '1',),
83
-                'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1','enabled_field' => 'economic:depreciation_type:1'),
83
+                'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'enabled_field' => 'economic:depreciation_type:1'),
84 84
                 'duration' => array('type' => 'integer', 'label' => 'AssetDepreciationOptionDuration', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1',),
85 85
                 'duration_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDurationType', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDurationTypeAnnual', '1' => 'AssetDepreciationOptionDurationTypeMonthly'/*, '2'=>'AssetDepreciationOptionDurationTypeDaily'*/), 'validate' => '1',),
86 86
                 'rate' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionRate', 'enabled' => '1', 'position' => 50, 'visible' => 3, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'computed' => '$object->asset_depreciation_options->getRate("economic")',),
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
             'enabled_field' => 'economic:accelerated_depreciation_option:1',
97 97
             'fields' => array(
98 98
                 'depreciation_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDepreciationType', 'enabled' => '1', 'position' => 10, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDepreciationTypeLinear', '1' => 'AssetDepreciationOptionDepreciationTypeDegressive', '2' => 'AssetDepreciationOptionDepreciationTypeExceptional'), 'validate' => '1',),
99
-                'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1','enabled_field' => 'accelerated_depreciation:depreciation_type:1'),
99
+                'degressive_coefficient' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionDegressiveRate', 'enabled' => '1', 'position' => 20, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'enabled_field' => 'accelerated_depreciation:depreciation_type:1'),
100 100
                 'duration' => array('type' => 'integer', 'label' => 'AssetDepreciationOptionDuration', 'enabled' => '1', 'position' => 30, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'isameasure' => '1', 'validate' => '1',),
101 101
                 'duration_type' => array('type' => 'smallint', 'label' => 'AssetDepreciationOptionDurationType', 'enabled' => '1', 'position' => 40, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'arrayofkeyval' => array('0' => 'AssetDepreciationOptionDurationTypeAnnual', '1' => 'AssetDepreciationOptionDurationTypeMonthly'/*, '2'=>'AssetDepreciationOptionDurationTypeDaily'*/), 'validate' => '1',),
102 102
                 'rate' => array('type' => 'double(24,8)', 'label' => 'AssetDepreciationOptionRate', 'enabled' => '1', 'position' => 50, 'visible' => 3, 'default' => '0', 'isameasure' => '1', 'validate' => '1', 'computed' => '$object->asset_depreciation_options->getRate("accelerated_depreciation")',),
Please login to merge, or discard this patch.
Dolibarr/Code/Contact/Classes/Contact.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -754,8 +754,8 @@  discard block
 block discarded – undo
754 754
     }
755 755
 
756 756
 
757
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
758
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
757
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
758
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
759 759
     /**
760 760
      *  Return DN string complete in the LDAP directory for the object
761 761
      *
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
      */
768 768
     public function _load_ldap_dn($info, $mode = 0)
769 769
     {
770
-		// phpcs:enable
770
+        // phpcs:enable
771 771
         global $conf;
772 772
         $dn = '';
773 773
         if ($mode == 0) {
@@ -781,8 +781,8 @@  discard block
 block discarded – undo
781 781
     }
782 782
 
783 783
 
784
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
785
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
784
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
785
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
786 786
     /**
787 787
      *  Initialize info table (LDAP attributes table)
788 788
      *
@@ -790,7 +790,7 @@  discard block
 block discarded – undo
790 790
      */
791 791
     public function _load_ldap_info()
792 792
     {
793
-		// phpcs:enable
793
+        // phpcs:enable
794 794
         global $conf, $langs;
795 795
 
796 796
         $info = array();
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
     }
892 892
 
893 893
 
894
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
894
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
895 895
     /**
896 896
      *  Update field alert birthday
897 897
      *
@@ -902,7 +902,7 @@  discard block
 block discarded – undo
902 902
      */
903 903
     public function update_perso($id, $user = null, $notrigger = 0)
904 904
     {
905
-		// phpcs:enable
905
+        // phpcs:enable
906 906
         $error = 0;
907 907
         $result = false;
908 908
 
@@ -1186,7 +1186,7 @@  discard block
 block discarded – undo
1186 1186
         }
1187 1187
     }
1188 1188
 
1189
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1189
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1190 1190
     /**
1191 1191
      *  Load number of elements the contact is used as a link for
1192 1192
      *  ref_facturation
@@ -1198,7 +1198,7 @@  discard block
 block discarded – undo
1198 1198
      */
1199 1199
     public function load_ref_elements()
1200 1200
     {
1201
-		// phpcs:enable
1201
+        // phpcs:enable
1202 1202
         // Count the elements for which it is contact
1203 1203
         $sql = "SELECT tc.element, count(ec.rowid) as nb";
1204 1204
         $sql .= " FROM " . MAIN_DB_PREFIX . "element_contact as ec, " . MAIN_DB_PREFIX . "c_type_contact as tc";
@@ -1582,7 +1582,7 @@  discard block
 block discarded – undo
1582 1582
         return $this->LibStatut($this->statut, $mode);
1583 1583
     }
1584 1584
 
1585
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1585
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1586 1586
     /**
1587 1587
      *  Return the label of a given status
1588 1588
      *
@@ -1592,7 +1592,7 @@  discard block
 block discarded – undo
1592 1592
      */
1593 1593
     public function LibStatut($status, $mode)
1594 1594
     {
1595
-		// phpcs:enable
1595
+        // phpcs:enable
1596 1596
         global $langs;
1597 1597
 
1598 1598
         $labelStatus = array(
@@ -1620,7 +1620,7 @@  discard block
 block discarded – undo
1620 1620
     }
1621 1621
 
1622 1622
 
1623
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1623
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1624 1624
     /**
1625 1625
      *  Return translated label of Public or Private
1626 1626
      *
@@ -1629,7 +1629,7 @@  discard block
 block discarded – undo
1629 1629
      */
1630 1630
     public function LibPubPriv($status)
1631 1631
     {
1632
-		// phpcs:enable
1632
+        // phpcs:enable
1633 1633
         global $langs;
1634 1634
         if ($status == '1') {
1635 1635
             return $langs->trans('ContactPrivate');
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -215,8 +215,8 @@  discard block
 block discarded – undo
215 215
     /**
216 216
      * @var int Thirdparty ID
217 217
      */
218
-    public $socid;      // both socid and fk_soc are used
219
-    public $fk_soc;     // both socid and fk_soc are used
218
+    public $socid; // both socid and fk_soc are used
219
+    public $fk_soc; // both socid and fk_soc are used
220 220
 
221 221
     /**
222 222
      * @var string Thirdparty name
@@ -1067,8 +1067,8 @@  discard block
 block discarded – undo
1067 1067
                 $this->country_code = $obj->country_id ? $obj->country_code : '';
1068 1068
                 $this->country      = $obj->country_id ? ($langs->trans('Country' . $obj->country_code) != 'Country' . $obj->country_code ? $langs->transnoentities('Country' . $obj->country_code) : $obj->country) : '';
1069 1069
 
1070
-                $this->fk_soc       = $obj->fk_soc;     // Both fk_soc and socid are used
1071
-                $this->socid        = $obj->fk_soc;     // Both fk_soc and socid are used
1070
+                $this->fk_soc       = $obj->fk_soc; // Both fk_soc and socid are used
1071
+                $this->socid        = $obj->fk_soc; // Both fk_soc and socid are used
1072 1072
                 $this->socname      = $obj->socname;
1073 1073
                 $this->poste        = $obj->poste;
1074 1074
                 $this->statut       = $obj->statut;
@@ -1876,7 +1876,7 @@  discard block
 block discarded – undo
1876 1876
         $error = 0;
1877 1877
 
1878 1878
         if (!isset($this->roles)) {
1879
-            return 0;   // Avoid to loose roles when property not set
1879
+            return 0; // Avoid to loose roles when property not set
1880 1880
         }
1881 1881
 
1882 1882
         $this->db->begin();
Please login to merge, or discard this patch.
Dolibarr/Code/Contrat/Classes/ContratLigne.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
         return $this->LibStatut($this->statut, $mode, ((!empty($this->date_end)) ? ($this->date_end < dol_now() ? 1 : 0) : -1));
261 261
     }
262 262
 
263
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
263
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
264 264
     /**
265 265
      *  Return label of a contract line status
266 266
      *
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
      */
274 274
     public static function LibStatut($status, $mode, $expired = -1, $moreatt = '', $morelabel = '')
275 275
     {
276
-		// phpcs:enable
276
+        // phpcs:enable
277 277
         global $langs;
278 278
         $langs->load("contracts");
279 279
 
@@ -709,7 +709,7 @@  discard block
 block discarded – undo
709 709
     }
710 710
 
711 711
 
712
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
712
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
713 713
     /**
714 714
      *  Update in database the fields total_xxx of lines
715 715
      *  Used by migration process
@@ -718,7 +718,7 @@  discard block
 block discarded – undo
718 718
      */
719 719
     public function update_total()
720 720
     {
721
-		// phpcs:enable
721
+        // phpcs:enable
722 722
         $this->db->begin();
723 723
 
724 724
         // Mise a jour ligne en base
@@ -836,7 +836,7 @@  discard block
 block discarded – undo
836 836
         }
837 837
     }
838 838
 
839
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
839
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
840 840
     /**
841 841
      *  Activate a contract line
842 842
      *
@@ -848,7 +848,7 @@  discard block
 block discarded – undo
848 848
      */
849 849
     public function active_line($user, $date, $date_end = '', $comment = '')
850 850
     {
851
-		// phpcs:enable
851
+        // phpcs:enable
852 852
         $error = 0;
853 853
 
854 854
         $this->db->begin();
@@ -894,7 +894,7 @@  discard block
 block discarded – undo
894 894
         }
895 895
     }
896 896
 
897
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
897
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
898 898
     /**
899 899
      *  Close a contract line
900 900
      *
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
      */
907 907
     public function close_line($user, $date_end_real, $comment = '', $notrigger = 0)
908 908
     {
909
-		// phpcs:enable
909
+        // phpcs:enable
910 910
         $this->date_cloture = $date_end_real;
911 911
         $this->date_end_real = $date_end_real;
912 912
         $this->user_closing_id = $user->id;
Please login to merge, or discard this patch.
Dolibarr/Code/Contrat/Classes/Contrat.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -364,7 +364,7 @@  discard block
 block discarded – undo
364 364
         }
365 365
     }
366 366
 
367
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
367
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
368 368
     /**
369 369
      *  Activate a contract line
370 370
      *
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
      */
378 378
     public function active_line($user, $line_id, $date_start, $date_end = '', $comment = '')
379 379
     {
380
-		// phpcs:enable
380
+        // phpcs:enable
381 381
         $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->active_line($user, $date_start, $date_end, $comment);
382 382
         if ($result < 0) {
383 383
             $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error;
@@ -387,7 +387,7 @@  discard block
 block discarded – undo
387 387
     }
388 388
 
389 389
 
390
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
390
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
391 391
     /**
392 392
      *  Close a contract line
393 393
      *
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
      */
400 400
     public function close_line($user, $line_id, $date_end, $comment = '')
401 401
     {
402
-		// phpcs:enable
402
+        // phpcs:enable
403 403
         $result = $this->lines[$this->lines_id_index_mapper[$line_id]]->close_line($user, $date_end, $comment);
404 404
         if ($result < 0) {
405 405
             $this->error = $this->lines[$this->lines_id_index_mapper[$line_id]]->error;
@@ -821,7 +821,7 @@  discard block
 block discarded – undo
821 821
         }
822 822
     }
823 823
 
824
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
824
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
825 825
     /**
826 826
      *  Load lines array into this->lines.
827 827
      *  This set also nbofserviceswait, nbofservicesopened, nbofservicesexpired and nbofservicesclosed
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
      */
834 834
     public function fetch_lines($only_services = 0, $loadalsotranslation = 0, $noextrafields = 0)
835 835
     {
836
-		// phpcs:enable
836
+        // phpcs:enable
837 837
         $this->nbofservices = 0;
838 838
         $this->nbofserviceswait = 0;
839 839
         $this->nbofservicesopened = 0;
@@ -1964,7 +1964,7 @@  discard block
 block discarded – undo
1964 1964
     }
1965 1965
 
1966 1966
 
1967
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1967
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1968 1968
     /**
1969 1969
      *  Update statut of contract according to services
1970 1970
      *
@@ -1974,7 +1974,7 @@  discard block
 block discarded – undo
1974 1974
      */
1975 1975
     public function update_statut($user)
1976 1976
     {
1977
-		// phpcs:enable
1977
+        // phpcs:enable
1978 1978
         dol_syslog(__METHOD__ . " is deprecated", LOG_WARNING);
1979 1979
 
1980 1980
         // If draft, we keep it (should not happen)
@@ -2006,7 +2006,7 @@  discard block
 block discarded – undo
2006 2006
         return $this->LibStatut($this->statut, $mode);
2007 2007
     }
2008 2008
 
2009
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2009
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2010 2010
     /**
2011 2011
      *  Return the label of a given contrat status
2012 2012
      *
@@ -2016,7 +2016,7 @@  discard block
 block discarded – undo
2016 2016
      */
2017 2017
     public function LibStatut($status, $mode)
2018 2018
     {
2019
-		// phpcs:enable
2019
+        // phpcs:enable
2020 2020
         global $langs;
2021 2021
 
2022 2022
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -2226,7 +2226,7 @@  discard block
 block discarded – undo
2226 2226
         }
2227 2227
     }
2228 2228
 
2229
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2229
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2230 2230
     /**
2231 2231
      *  Return list of line rowid
2232 2232
      *
@@ -2235,7 +2235,7 @@  discard block
 block discarded – undo
2235 2235
      */
2236 2236
     public function array_detail($status = -1)
2237 2237
     {
2238
-		// phpcs:enable
2238
+        // phpcs:enable
2239 2239
         $tab = array();
2240 2240
 
2241 2241
         $sql = "SELECT cd.rowid";
@@ -2307,7 +2307,7 @@  discard block
 block discarded – undo
2307 2307
     }
2308 2308
 
2309 2309
 
2310
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2310
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2311 2311
     /**
2312 2312
      *      Load indicators for dashboard (this->nbtodo and this->nbtodolate)
2313 2313
      *
@@ -2317,7 +2317,7 @@  discard block
 block discarded – undo
2317 2317
      */
2318 2318
     public function load_board($user, $mode)
2319 2319
     {
2320
-		// phpcs:enable
2320
+        // phpcs:enable
2321 2321
         global $conf, $langs;
2322 2322
 
2323 2323
         $this->from = " FROM " . MAIN_DB_PREFIX . "contrat as c";
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -286,12 +286,12 @@  discard block
 block discarded – undo
286 286
     /*
287 287
      * No signature
288 288
      */
289
-    const STATUS_NO_SIGNATURE    = 0;
289
+    const STATUS_NO_SIGNATURE = 0;
290 290
 
291 291
     /*
292 292
      * Signed by sender
293 293
      */
294
-    const STATUS_SIGNED_SENDER   = 1;
294
+    const STATUS_SIGNED_SENDER = 1;
295 295
 
296 296
     /*
297 297
      * Signed by receiver
@@ -301,7 +301,7 @@  discard block
 block discarded – undo
301 301
     /*
302 302
      * Signed by all
303 303
      */
304
-    const STATUS_SIGNED_ALL      = 9; // To handle future kind of signature (ex: tripartite contract)
304
+    const STATUS_SIGNED_ALL = 9; // To handle future kind of signature (ex: tripartite contract)
305 305
 
306 306
 
307 307
     /**
@@ -437,7 +437,7 @@  discard block
 block discarded – undo
437 437
             if ($contratline->statut != ContratLigne::STATUS_OPEN) {
438 438
                 $contratline->context = $this->context;
439 439
 
440
-                $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment);  // This call trigger LINECONTRACT_ACTIVATE
440
+                $result = $contratline->active_line($user, $date_start, !empty($date_end) ? $date_end : -1, $comment); // This call trigger LINECONTRACT_ACTIVATE
441 441
                 if ($result < 0) {
442 442
                     $error++;
443 443
                     $this->error = $contratline->error;
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
             // Close lines not already closed
488 488
             if ($contratline->statut != ContratLigne::STATUS_CLOSED) {
489 489
                 $contratline->date_end_real = $now;
490
-                $contratline->date_cloture = $now;  // For backward compatibility
490
+                $contratline->date_cloture = $now; // For backward compatibility
491 491
                 $contratline->user_closing_id = $user->id;
492 492
                 $contratline->statut = ContratLigne::STATUS_CLOSED;
493 493
                 $result = $contratline->close_line($user, $now, $comment, $notrigger);
@@ -942,7 +942,7 @@  discard block
 block discarded – undo
942 942
                 //$line->date_fin_prevue   = $this->db->jdate($objp->date_fin_validite);
943 943
                 //$line->date_fin_reel     = $this->db->jdate($objp->date_cloture);
944 944
 
945
-                $line->rang     = $objp->rang;
945
+                $line->rang = $objp->rang;
946 946
 
947 947
                 // Retrieve all extrafields for contract line
948 948
                 // fetch optionals attributes and labels
@@ -1454,7 +1454,7 @@  discard block
 block discarded – undo
1454 1454
         }
1455 1455
 
1456 1456
         if (!$error) {
1457
-            $result = $this->insertExtraFields();   // This delete and reinsert extrafields
1457
+            $result = $this->insertExtraFields(); // This delete and reinsert extrafields
1458 1458
             if ($result < 0) {
1459 1459
                 $error++;
1460 1460
             }
@@ -2558,7 +2558,7 @@  discard block
 block discarded – undo
2558 2558
         global $user;
2559 2559
 
2560 2560
         $ticket = new Ticket($this->db);
2561
-        $nbTicket =  $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2561
+        $nbTicket = $ticket->fetchAll($user, 'ASC', 't.datec', '', 0, '', array('t.fk_contract' => $this->id));
2562 2562
 
2563 2563
         return ($nbTicket < 0 ? $nbTicket : $ticket->lines);
2564 2564
     }
@@ -2580,7 +2580,7 @@  discard block
 block discarded – undo
2580 2580
         global $conf, $langs;
2581 2581
 
2582 2582
         if (!dol_strlen($modele)) {
2583
-            $modele = '';   // No doc template/generation by default
2583
+            $modele = ''; // No doc template/generation by default
2584 2584
 
2585 2585
             if (!empty($this->model_pdf)) {
2586 2586
                 $modele = $this->model_pdf;
@@ -2806,7 +2806,7 @@  discard block
 block discarded – undo
2806 2806
 
2807 2807
                     // Load contract
2808 2808
                     $object = new Contrat($this->db);
2809
-                    $object->fetch($obj->rowid);        // fetch also lines
2809
+                    $object->fetch($obj->rowid); // fetch also lines
2810 2810
                     //$object->fetch_thirdparty();
2811 2811
 
2812 2812
                     if ($object->id <= 0) {
@@ -2853,7 +2853,7 @@  discard block
 block discarded – undo
2853 2853
                     if ($expirationdate && $expirationdate < $enddatetoscan) {
2854 2854
                         dol_syslog("Define the newdate of end of services from expirationdate=" . $expirationdate);
2855 2855
                         $newdate = $expirationdate;
2856
-                        $protecti = 0;  //$protecti is to avoid infinite loop
2856
+                        $protecti = 0; //$protecti is to avoid infinite loop
2857 2857
                         while ($newdate < $enddatetoscan && $protecti < 1000) {
2858 2858
                             $newdate = dol_time_plus_duree($newdate, $duration_value, $duration_unit);
2859 2859
                             $protecti++;
@@ -2881,20 +2881,20 @@  discard block
 block discarded – undo
2881 2881
 
2882 2882
                                 // Create an event
2883 2883
                                 $actioncomm = new ActionComm($this->db);
2884
-                                $actioncomm->type_code    = 'AC_OTH_AUTO';      // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2884
+                                $actioncomm->type_code    = 'AC_OTH_AUTO'; // Type of event ('AC_OTH', 'AC_OTH_AUTO', 'AC_XXX'...)
2885 2885
                                 $actioncomm->code         = 'AC_' . $actioncode;
2886 2886
                                 $actioncomm->label        = $label;
2887 2887
                                 $actioncomm->datep        = $now;
2888 2888
                                 $actioncomm->datef        = $now;
2889
-                                $actioncomm->percentage   = -1;   // Not applicable
2889
+                                $actioncomm->percentage   = -1; // Not applicable
2890 2890
                                 $actioncomm->socid        = $object->socid;
2891
-                                $actioncomm->authorid     = $user->id;   // User saving action
2892
-                                $actioncomm->userownerid  = $user->id;  // Owner of action
2891
+                                $actioncomm->authorid     = $user->id; // User saving action
2892
+                                $actioncomm->userownerid  = $user->id; // Owner of action
2893 2893
                                 $actioncomm->fk_element   = $object->id;
2894 2894
                                 $actioncomm->elementtype  = 'contract';
2895 2895
                                 $actioncomm->note_private = $comment;
2896 2896
 
2897
-                                $ret = $actioncomm->create($user);       // User creating action
2897
+                                $ret = $actioncomm->create($user); // User creating action
2898 2898
                             } else {
2899 2899
                                 $contracterror[$object->id] = $object->ref;
2900 2900
 
@@ -2903,7 +2903,7 @@  discard block
 block discarded – undo
2903 2903
                                 $this->error = $this->db->lasterror();
2904 2904
                             }
2905 2905
 
2906
-                            if (! $errorforlocaltransaction) {
2906
+                            if (!$errorforlocaltransaction) {
2907 2907
                                 $this->db->commit();
2908 2908
                             } else {
2909 2909
                                 $this->db->rollback();
Please login to merge, or discard this patch.