Passed
Push — GENERAL_BUG_REVIEW_240911 ( 6dbc7d...fb375d )
by Rafael
53:50
created
Dolibarr/Code/Fourn/Classes/FactureFournisseurRec.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -699,7 +699,7 @@  discard block
 block discarded – undo
699 699
         return $this->fetch_lines();
700 700
     }
701 701
 
702
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
702
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
703 703
     /**
704 704
      *  Get lines of template invoices into this->lines
705 705
      *
@@ -707,7 +707,7 @@  discard block
 block discarded – undo
707 707
      */
708 708
     public function fetch_lines()
709 709
     {
710
-		// phpcs:enable
710
+        // phpcs:enable
711 711
         $this->lines = array();
712 712
 
713 713
         // Retrieve all extrafield for line
@@ -1512,7 +1512,7 @@  discard block
 block discarded – undo
1512 1512
         return $this->LibStatut($this->frequency ? 1 : 0, $this->suspended, $mode, $alreadypaid, empty($this->type) ? 0 : $this->type);
1513 1513
     }
1514 1514
 
1515
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1515
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1516 1516
     /**
1517 1517
      *  Return label of a status
1518 1518
      *
@@ -1525,7 +1525,7 @@  discard block
 block discarded – undo
1525 1525
      */
1526 1526
     public function LibStatut($recur, $status, $mode = 0, $alreadypaid = -1, $type = 0)
1527 1527
     {
1528
-		// phpcs:enable
1528
+        // phpcs:enable
1529 1529
         global $langs;
1530 1530
         $langs->load('bills');
1531 1531
 
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -355,13 +355,13 @@  discard block
 block discarded – undo
355 355
             $sql .= ", '" . $this->db->idate($now) . "'";
356 356
             $sql .= ", " . ((int) $this->suspended);
357 357
             $sql .= ", '" . $this->db->escape($this->libelle) . "'";
358
-            $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0');                              // amount
358
+            $sql .= ", " . (!empty($facfourn_src->total_ttc) ? (float) $facfourn_src->total_ttc : '0'); // amount
359 359
             $sql .= ", " . ((int) $user->id);
360 360
             $sql .= ", " . (!empty($this->fk_project) ? ((int) $this->fk_project) : 'NULL');
361 361
             $sql .= ", " . (!empty($facfourn_src->fk_account) ? ((int) $facfourn_src->fk_account) : 'NULL');
362 362
             $sql .= ", " . ($this->cond_reglement_id > 0 ? (int) $this->cond_reglement_id : 'NULL');
363 363
             $sql .= ", " . ($this->mode_reglement_id > 0 ? (int) $this->mode_reglement_id : 'NULL');
364
-            $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL');      // date_lim_reglement
364
+            $sql .= ", " . ($facfourn_src->date_echeance > 0 ? "'" . $this->db->idate($facfourn_src->date_echeance) . "'" : 'NULL'); // date_lim_reglement
365 365
             $sql .= ", " . (!empty($this->note_private) ? "'" . $this->db->escape($this->note_private) . "'" : 'NULL');
366 366
             $sql .= ", " . (!empty($this->note_public) ? "'" . $this->db->escape($this->note_public) . "'" : 'NULL');
367 367
             $sql .= ", " . (!empty($this->model_pdf) ? "'" . $this->db->escape($this->model_pdf) . "'" : 'NULL');
@@ -516,7 +516,7 @@  discard block
 block discarded – undo
516 516
         $error = 0;
517 517
 
518 518
         $sql = "UPDATE " . MAIN_DB_PREFIX . "facture_fourn_rec SET";
519
-        $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "'," ;
519
+        $sql .= " titre = '" . (!empty($this->title) ? $this->db->escape($this->title) : "") . "',";
520 520
         $sql .= " subtype=" . (isset($this->subtype) ? $this->db->escape($this->subtype) : "null") . ",";
521 521
         $sql .= " ref_supplier = '" . (!empty($this->ref_supplier) ? $this->db->escape($this->ref_supplier) : "") . "',";
522 522
         $sql .= " entity = " . (!empty($this->entity) ? ((int) $this->entity) : 1) . ',';
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                 $this->id                       = $obj->rowid;
635 635
                 $this->titre                    = $obj->title;
636 636
                 $this->title                    = $obj->title;
637
-                $this->subtype                        = $obj->subtype;
637
+                $this->subtype = $obj->subtype;
638 638
                 $this->ref                      = $obj->title;
639 639
                 $this->ref_supplier             = $obj->ref_supplier;
640 640
                 $this->entity                   = $obj->entity;
@@ -792,7 +792,7 @@  discard block
 block discarded – undo
792 792
                 $line->product_type             = $objp->product_type;
793 793
                 $line->date_start               = $objp->date_start;
794 794
                 $line->date_end                 = $objp->date_end;
795
-                $line->info_bits                = $objp->info_bits  ;
795
+                $line->info_bits                = $objp->info_bits;
796 796
                 $line->special_code             = $objp->special_code;
797 797
                 $line->rang                     = $objp->rang;
798 798
                 $line->fk_unit                  = $objp->fk_unit;
@@ -875,7 +875,7 @@  discard block
 block discarded – undo
875 875
             }
876 876
             // End call triggers
877 877
         }
878
-        if (! $error) {
878
+        if (!$error) {
879 879
             $this->db->commit();
880 880
             return 1;
881 881
         } else {
@@ -1019,7 +1019,7 @@  discard block
 block discarded – undo
1019 1019
             $sql .= ', fk_user_author';
1020 1020
             $sql .= ', fk_multicurrency, multicurrency_code, multicurrency_subprice, multicurrency_total_ht, multicurrency_total_tva, multicurrency_total_ttc';
1021 1021
             $sql .= ') VALUES (';
1022
-            $sql .= ' ' . (int) $facid;   // source supplier invoice id
1022
+            $sql .= ' ' . (int) $facid; // source supplier invoice id
1023 1023
             $sql .= ', ' . (!empty($fk_product) ? "'" . $this->db->escape($fk_product) . "'" : 'null');
1024 1024
             $sql .= ', ' . (!empty($ref) ? "'" . $this->db->escape($ref) . "'" : 'null');
1025 1025
             $sql .= ', ' . (!empty($label) ? "'" . $this->db->escape($label) . "'" : 'null');
@@ -1360,7 +1360,7 @@  discard block
 block discarded – undo
1360 1360
 
1361 1361
                     $new_fac_fourn->type = self::TYPE_STANDARD;
1362 1362
                     $new_fac_fourn->subtype = $facturerec->subtype;
1363
-                    $new_fac_fourn->statut = self::STATUS_DRAFT;    // deprecated
1363
+                    $new_fac_fourn->statut = self::STATUS_DRAFT; // deprecated
1364 1364
                     $new_fac_fourn->status = self::STATUS_DRAFT;
1365 1365
                     $new_fac_fourn->date = empty($facturerec->date_when) ? $now : $facturerec->date_when; // We could also use dol_now here but we prefer date_when so invoice has real date when we would like even if we generate later.
1366 1366
                     $new_fac_fourn->socid = $facturerec->socid;
@@ -1369,7 +1369,7 @@  discard block
 block discarded – undo
1369 1369
                     $new_fac_fourn->model_pdf = $facturerec->model_pdf;
1370 1370
                     $new_fac_fourn->fk_project = $facturerec->fk_project;
1371 1371
                     $new_fac_fourn->label = $facturerec->label;
1372
-                    $new_fac_fourn->libelle = $facturerec->label;   // deprecated
1372
+                    $new_fac_fourn->libelle = $facturerec->label; // deprecated
1373 1373
 
1374 1374
                     $invoiceidgenerated = $new_fac_fourn->create($user);
1375 1375
                     $laststep = "Create invoiceidgenerated $invoiceidgenerated";
Please login to merge, or discard this patch.
Dolibarr/Code/Fourn/Classes/CommandeFournisseur.php 2 patches
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
         }
607 607
     }
608 608
 
609
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
609
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
610 610
     /**
611 611
      * Load array lines
612 612
      *
@@ -615,7 +615,7 @@  discard block
 block discarded – undo
615 615
      */
616 616
     public function fetch_lines($only_product = 0)
617 617
     {
618
-		// phpcs:enable
618
+        // phpcs:enable
619 619
 
620 620
         $this->lines = array();
621 621
 
@@ -880,7 +880,7 @@  discard block
 block discarded – undo
880 880
         return $this->LibStatut($this->statut, $mode, $this->billed);
881 881
     }
882 882
 
883
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
883
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
884 884
     /**
885 885
      *  Return label of a status
886 886
      *
@@ -891,7 +891,7 @@  discard block
 block discarded – undo
891 891
      */
892 892
     public function LibStatut($status, $mode = 0, $billed = 0)
893 893
     {
894
-		// phpcs:enable
894
+        // phpcs:enable
895 895
         global $langs, $hookmanager;
896 896
 
897 897
         if (empty($this->labelStatus) || empty($this->labelStatusShort)) {
@@ -1389,7 +1389,7 @@  discard block
 block discarded – undo
1389 1389
         return $result;
1390 1390
     }
1391 1391
 
1392
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1392
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1393 1393
     /**
1394 1394
      *  Cancel an approved order.
1395 1395
      *  The cancellation is done after approval
@@ -1400,7 +1400,7 @@  discard block
 block discarded – undo
1400 1400
      */
1401 1401
     public function Cancel($user, $idwarehouse = -1)
1402 1402
     {
1403
-		// phpcs:enable
1403
+        // phpcs:enable
1404 1404
         global $langs, $conf;
1405 1405
 
1406 1406
         $error = 0;
@@ -2537,7 +2537,7 @@  discard block
 block discarded – undo
2537 2537
         return $ret;
2538 2538
     }
2539 2539
 
2540
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2540
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2541 2541
     /**
2542 2542
      *  Set a delivery in database for this supplier order
2543 2543
      *
@@ -2549,7 +2549,7 @@  discard block
 block discarded – undo
2549 2549
      */
2550 2550
     public function Livraison($user, $date, $type, $comment)
2551 2551
     {
2552
-		// phpcs:enable
2552
+        // phpcs:enable
2553 2553
         global $conf, $langs;
2554 2554
 
2555 2555
         $result = 0;
@@ -2651,7 +2651,7 @@  discard block
 block discarded – undo
2651 2651
         return $result;
2652 2652
     }
2653 2653
 
2654
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2654
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2655 2655
     /**
2656 2656
      *  Set delivery date
2657 2657
      *
@@ -2663,7 +2663,7 @@  discard block
 block discarded – undo
2663 2663
      */
2664 2664
     public function set_date_livraison($user, $delivery_date, $notrigger = 0)
2665 2665
     {
2666
-		// phpcs:enable
2666
+        // phpcs:enable
2667 2667
         return $this->setDeliveryDate($user, $delivery_date, $notrigger);
2668 2668
     }
2669 2669
 
@@ -2723,7 +2723,7 @@  discard block
 block discarded – undo
2723 2723
         }
2724 2724
     }
2725 2725
 
2726
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2726
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2727 2727
     /**
2728 2728
      *  Set the id projet
2729 2729
      *
@@ -2734,7 +2734,7 @@  discard block
 block discarded – undo
2734 2734
      */
2735 2735
     public function set_id_projet($user, $id_projet, $notrigger = 0)
2736 2736
     {
2737
-		// phpcs:enable
2737
+        // phpcs:enable
2738 2738
         if ($user->hasRight("fournisseur", "commande", "creer") || $user->hasRight("supplier_order", "creer")) {
2739 2739
             $error = 0;
2740 2740
 
@@ -3242,7 +3242,7 @@  discard block
 block discarded – undo
3242 3242
         }
3243 3243
     }
3244 3244
 
3245
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3245
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
3246 3246
     /**
3247 3247
      *  Load indicators for dashboard (this->nbtodo and this->nbtodolate)
3248 3248
      *
@@ -3252,7 +3252,7 @@  discard block
 block discarded – undo
3252 3252
      */
3253 3253
     public function load_board($user, $mode = 'opened')
3254 3254
     {
3255
-		// phpcs:enable
3255
+        // phpcs:enable
3256 3256
         global $conf, $langs;
3257 3257
 
3258 3258
         $sql = "SELECT c.rowid, c.date_creation as datec, c.date_commande, c.fk_statut, c.date_livraison as delivery_date, c.total_ht";
Please login to merge, or discard this patch.
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -523,7 +523,7 @@  discard block
 block discarded – undo
523 523
             $this->ref_supplier = $obj->ref_supplier;
524 524
             $this->socid = $obj->fk_soc;
525 525
             $this->fourn_id = $obj->fk_soc;
526
-            $this->statut = $obj->status;   // deprecated
526
+            $this->statut = $obj->status; // deprecated
527 527
             $this->status = $obj->status;
528 528
             $this->billed = $obj->billed;
529 529
             $this->user_author_id = $obj->user_author_id;
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
             $this->fk_project = $obj->fk_project;
555 555
             $this->cond_reglement_id = $obj->fk_cond_reglement;
556 556
             $this->cond_reglement_code = $obj->cond_reglement_code;
557
-            $this->cond_reglement = $obj->cond_reglement_label;         // deprecated
557
+            $this->cond_reglement = $obj->cond_reglement_label; // deprecated
558 558
             $this->cond_reglement_label = $obj->cond_reglement_label;
559 559
             $this->cond_reglement_doc = $obj->cond_reglement_doc;
560 560
             $this->fk_account = $obj->fk_account;
@@ -687,10 +687,10 @@  discard block
 block discarded – undo
687 687
                     $sqlsearchpackage .= ' WHERE entity IN (' . getEntity('product_fournisseur_price') . ")";
688 688
                     $sqlsearchpackage .= " AND fk_product = " . ((int) $objp->fk_product);
689 689
                     $sqlsearchpackage .= " AND ref_fourn = '" . $this->db->escape($objp->ref_supplier) . "'";
690
-                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty);  // required to be qualified
691
-                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")";  // required to be qualified
690
+                    $sqlsearchpackage .= " AND quantity <= " . ((float) $objp->qty); // required to be qualified
691
+                    $sqlsearchpackage .= " AND (packaging IS NULL OR packaging = 0 OR packaging <= " . ((float) $objp->qty) . ")"; // required to be qualified
692 692
                     $sqlsearchpackage .= " AND fk_soc = " . ((int) $this->socid);
693
-                    $sqlsearchpackage .= " ORDER BY packaging ASC";     // Take the smaller package first
693
+                    $sqlsearchpackage .= " ORDER BY packaging ASC"; // Take the smaller package first
694 694
                     $sqlsearchpackage .= " LIMIT 1";
695 695
 
696 696
                     $resqlsearchpackage = $this->db->query($sqlsearchpackage);
@@ -1626,10 +1626,10 @@  discard block
 block discarded – undo
1626 1626
                         $line->date_end,
1627 1627
                         $line->array_options,
1628 1628
                         $line->fk_unit,
1629
-                        $line->multicurrency_subprice,  // pu_ht_devise
1630
-                        $line->origin,     // origin
1631
-                        $line->origin_id,  // origin_id
1632
-                        $line->rang,       // rang
1629
+                        $line->multicurrency_subprice, // pu_ht_devise
1630
+                        $line->origin, // origin
1631
+                        $line->origin_id, // origin_id
1632
+                        $line->rang, // rang
1633 1633
                         $line->special_code
1634 1634
                     );
1635 1635
                     if ($result < 0) {
@@ -2003,7 +2003,7 @@  discard block
 block discarded – undo
2003 2003
             $this->db->begin();
2004 2004
 
2005 2005
             $product_type = $type;
2006
-            $label = '';    // deprecated
2006
+            $label = ''; // deprecated
2007 2007
 
2008 2008
             if ($fk_product > 0) {
2009 2009
                 if (getDolGlobalString('SUPPLIER_ORDER_WITH_PREDEFINED_PRICES_ONLY')) { // Not the common case
@@ -2146,7 +2146,7 @@  discard block
 block discarded – undo
2146 2146
             $this->line->total_localtax2 = $total_localtax2;
2147 2147
             $this->line->total_ttc = $total_ttc;
2148 2148
             $this->line->product_type = $type;
2149
-            $this->line->special_code   = (!empty($special_code) ? $special_code : 0);
2149
+            $this->line->special_code = (!empty($special_code) ? $special_code : 0);
2150 2150
             $this->line->origin = $origin;
2151 2151
             $this->line->origin_id = $origin_id;
2152 2152
             $this->line->fk_unit = $fk_unit;
@@ -3353,7 +3353,7 @@  discard block
 block discarded – undo
3353 3353
         global $conf, $langs;
3354 3354
 
3355 3355
         if (!dol_strlen($modele)) {
3356
-            $modele = '';   // No doc template/generation by default
3356
+            $modele = ''; // No doc template/generation by default
3357 3357
 
3358 3358
             if (!empty($this->model_pdf)) {
3359 3359
                 $modele = $this->model_pdf;
Please login to merge, or discard this patch.
Dolibarr/Code/Fourn/Api/SupplierOrders.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
         );
713 713
     }
714 714
 
715
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
715
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
716 716
     /**
717 717
      * Clean sensible object datas
718 718
      *
@@ -721,7 +721,7 @@  discard block
 block discarded – undo
721 721
      */
722 722
     protected function _cleanObjectDatas($object)
723 723
     {
724
-		// phpcs:enable
724
+        // phpcs:enable
725 725
         $object = parent::_cleanObjectDatas($object);
726 726
 
727 727
         unset($object->rowid);
Please login to merge, or discard this patch.
Dolibarr/Code/Fourn/Api/SupplierInvoices.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/ExpenseReport/Classes/ExpenseReportIk.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -199,7 +199,7 @@
 block discarded – undo
199 199
         $default_range = (int) $userauthor->default_range; // if not defined, then 0
200 200
         $ranges = $this->getRangesByCategory($fk_c_exp_tax_cat);
201 201
         // prevent out of range -1 indice
202
-        $indice = $default_range  - 1;
202
+        $indice = $default_range - 1;
203 203
         // subtract 1 because array start from 0
204 204
         if (empty($ranges) || $indice < 0 || !isset($ranges[$indice])) {
205 205
             return false;
Please login to merge, or discard this patch.
Dolibarr/Code/ExpenseReport/Classes/ExpenseReportLine.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -336,7 +336,7 @@
 block discarded – undo
336 336
         } elseif ($mode == 'mon' || $mode == 'EX_MON') {
337 337
             $sql .= " AND DATE_FORMAT(d.date, '%Y-%m') = '" . dol_print_date($this->date, '%Y-%m') . "'"; // @todo DATE_FORMAT is forbidden
338 338
         } elseif ($mode == 'year' || $mode == 'EX_YEA') {
339
-            $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'";     // @todo DATE_FORMAT is forbidden
339
+            $sql .= " AND DATE_FORMAT(d.date, '%Y') = '" . dol_print_date($this->date, '%Y') . "'"; // @todo DATE_FORMAT is forbidden
340 340
         }
341 341
 
342 342
         dol_syslog('ExpenseReportLine::getExpAmount');
Please login to merge, or discard this patch.
Dolibarr/Code/ExpenseReport/Classes/ExpenseReport.php 2 patches
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -767,7 +767,7 @@  discard block
 block discarded – undo
767 767
         }
768 768
     }
769 769
 
770
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
770
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
771 771
     /**
772 772
      *  Classify the expense report as paid
773 773
      *
@@ -780,7 +780,7 @@  discard block
 block discarded – undo
780 780
      */
781 781
     public function set_paid($id, $fuser, $notrigger = 0)
782 782
     {
783
-		// phpcs:enable
783
+        // phpcs:enable
784 784
         dol_syslog(get_class($this) . "::set_paid is deprecated, use setPaid instead", LOG_NOTICE);
785 785
         return $this->setPaid($id, $fuser, $notrigger);
786 786
     }
@@ -846,7 +846,7 @@  discard block
 block discarded – undo
846 846
         return $this->LibStatut($this->status, $mode);
847 847
     }
848 848
 
849
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
849
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
850 850
     /**
851 851
      *  Returns the label of a status
852 852
      *
@@ -856,7 +856,7 @@  discard block
 block discarded – undo
856 856
      */
857 857
     public function LibStatut($status, $mode = 0)
858 858
     {
859
-		// phpcs:enable
859
+        // phpcs:enable
860 860
         global $langs;
861 861
 
862 862
         $labelStatus = $langs->transnoentitiesnoconv($this->labelStatus[$status]);
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
         return 1;
987 987
     }
988 988
 
989
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
989
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
990 990
     /**
991 991
      * fetch_line_by_project
992 992
      *
@@ -996,7 +996,7 @@  discard block
 block discarded – undo
996 996
      */
997 997
     public function fetch_line_by_project($projectid, $user)
998 998
     {
999
-		// phpcs:enable
999
+        // phpcs:enable
1000 1000
         global $langs;
1001 1001
 
1002 1002
         $langs->load('trips');
@@ -1088,7 +1088,7 @@  discard block
 block discarded – undo
1088 1088
         return 0;
1089 1089
     }
1090 1090
 
1091
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1091
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1092 1092
     /**
1093 1093
      * fetch_lines
1094 1094
      *
@@ -1096,7 +1096,7 @@  discard block
 block discarded – undo
1096 1096
      */
1097 1097
     public function fetch_lines()
1098 1098
     {
1099
-		// phpcs:enable
1099
+        // phpcs:enable
1100 1100
         $this->lines = array();
1101 1101
 
1102 1102
         $sql = ' SELECT de.rowid, de.comments, de.qty, de.value_unit, de.date, de.rang,';
@@ -1426,7 +1426,7 @@  discard block
 block discarded – undo
1426 1426
         }
1427 1427
     }
1428 1428
 
1429
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1429
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1430 1430
     /**
1431 1431
      * set_save_from_refuse
1432 1432
      *
@@ -1435,7 +1435,7 @@  discard block
 block discarded – undo
1435 1435
      */
1436 1436
     public function set_save_from_refuse($fuser)
1437 1437
     {
1438
-		// phpcs:enable
1438
+        // phpcs:enable
1439 1439
         // Sélection de la date de début de la NDF
1440 1440
         $sql = 'SELECT date_debut';
1441 1441
         $sql .= ' FROM ' . MAIN_DB_PREFIX . $this->table_element;
@@ -1577,7 +1577,7 @@  discard block
 block discarded – undo
1577 1577
         return 0;
1578 1578
     }
1579 1579
 
1580
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1580
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1581 1581
     /**
1582 1582
      * set_unpaid
1583 1583
      *
@@ -1589,7 +1589,7 @@  discard block
 block discarded – undo
1589 1589
      */
1590 1590
     public function set_unpaid($fuser, $notrigger = 0)
1591 1591
     {
1592
-		// phpcs:enable
1592
+        // phpcs:enable
1593 1593
         dol_syslog(get_class($this) . "::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
1594 1594
         return $this->setUnpaid($fuser, $notrigger);
1595 1595
     }
@@ -1645,7 +1645,7 @@  discard block
 block discarded – undo
1645 1645
         return 0;
1646 1646
     }
1647 1647
 
1648
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1648
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1649 1649
     /**
1650 1650
      * set_cancel
1651 1651
      *
@@ -1656,7 +1656,7 @@  discard block
 block discarded – undo
1656 1656
      */
1657 1657
     public function set_cancel($fuser, $detail, $notrigger = 0)
1658 1658
     {
1659
-		// phpcs:enable
1659
+        // phpcs:enable
1660 1660
         $error = 0;
1661 1661
         $this->date_cancel = $this->db->idate(dol_now());
1662 1662
         if ($this->status != self::STATUS_CANCELED) {
@@ -1879,7 +1879,7 @@  discard block
 block discarded – undo
1879 1879
         return $result;
1880 1880
     }
1881 1881
 
1882
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1882
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
1883 1883
     /**
1884 1884
      *  Update total of an expense report when you add a line.
1885 1885
      *
@@ -1889,7 +1889,7 @@  discard block
 block discarded – undo
1889 1889
      */
1890 1890
     public function update_totaux_add($ligne_total_ht, $ligne_total_tva)
1891 1891
     {
1892
-		// phpcs:enable
1892
+        // phpcs:enable
1893 1893
         $this->total_ht += (float) $ligne_total_ht;
1894 1894
         $this->total_tva += (float) $ligne_total_tva;
1895 1895
         $this->total_ttc += $this->total_tva;
@@ -2375,7 +2375,7 @@  discard block
 block discarded – undo
2375 2375
         return 1;
2376 2376
     }
2377 2377
 
2378
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2378
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2379 2379
     /**
2380 2380
      * periode_existe
2381 2381
      *
@@ -2388,7 +2388,7 @@  discard block
 block discarded – undo
2388 2388
     {
2389 2389
         global $conf;
2390 2390
 
2391
-		// phpcs:enable
2391
+        // phpcs:enable
2392 2392
         $sql = "SELECT rowid, date_debut, date_fin";
2393 2393
         $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element;
2394 2394
         $sql .= " WHERE entity = " . ((int) $conf->entity); // not shared, only for the current entity
@@ -2429,7 +2429,7 @@  discard block
 block discarded – undo
2429 2429
     }
2430 2430
 
2431 2431
 
2432
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2432
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2433 2433
     /**
2434 2434
      * Return list of people with permission to validate expense reports.
2435 2435
      * Search for permission "approve expense report"
@@ -2438,7 +2438,7 @@  discard block
 block discarded – undo
2438 2438
      */
2439 2439
     public function fetch_users_approver_expensereport()
2440 2440
     {
2441
-		// phpcs:enable
2441
+        // phpcs:enable
2442 2442
         $users_validator = array();
2443 2443
 
2444 2444
         $sql = "SELECT DISTINCT ur.fk_user";
@@ -2564,7 +2564,7 @@  discard block
 block discarded – undo
2564 2564
         }
2565 2565
     }
2566 2566
 
2567
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2567
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
2568 2568
     /**
2569 2569
      *      Load indicators for dashboard (this->nbtodo and this->nbtodolate)
2570 2570
      *
@@ -2574,7 +2574,7 @@  discard block
 block discarded – undo
2574 2574
      */
2575 2575
     public function load_board($user, $option = 'topay')
2576 2576
     {
2577
-		// phpcs:enable
2577
+        // phpcs:enable
2578 2578
         global $conf, $langs;
2579 2579
 
2580 2580
         if ($user->socid) {
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
      */
250 250
     public $fk_user_approve;
251 251
 
252
-    public $localtax1;  // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
253
-    public $localtax2;  // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
252
+    public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
253
+    public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
254 254
 
255 255
     /**
256 256
      * Draft status
@@ -341,8 +341,8 @@  discard block
 block discarded – undo
341 341
         $this->total_tva = 0;
342 342
         $this->total_localtax1 = 0;
343 343
         $this->total_localtax2 = 0;
344
-        $this->localtax1 = 0;   // For backward compatibility
345
-        $this->localtax2 = 0;   // For backward compatibility
344
+        $this->localtax1 = 0; // For backward compatibility
345
+        $this->localtax2 = 0; // For backward compatibility
346 346
         $this->modepaymentid = 0;
347 347
 
348 348
         // List of language codes for status
@@ -699,8 +699,8 @@  discard block
 block discarded – undo
699 699
                 $this->total_ht     = $obj->total_ht;
700 700
                 $this->total_tva    = $obj->total_tva;
701 701
                 $this->total_ttc    = $obj->total_ttc;
702
-                $this->localtax1    = $obj->total_localtax1;        // For backward compatibility
703
-                $this->localtax2    = $obj->total_localtax2;        // For backward compatibility
702
+                $this->localtax1    = $obj->total_localtax1; // For backward compatibility
703
+                $this->localtax2    = $obj->total_localtax2; // For backward compatibility
704 704
                 $this->total_localtax1 = $obj->total_localtax1;
705 705
                 $this->total_localtax2 = $obj->total_localtax2;
706 706
 
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 
1168 1168
                 $deplig->rule_warning_message = $objp->rule_warning_message;
1169 1169
 
1170
-                $deplig->rang               = $objp->rang;
1170
+                $deplig->rang = $objp->rang;
1171 1171
 
1172 1172
                 $this->lines[$i] = $deplig;
1173 1173
 
@@ -1963,8 +1963,8 @@  discard block
 block discarded – undo
1963 1963
             $this->line = new ExpenseReportLine($this->db);
1964 1964
 
1965 1965
             // We don't know seller and buyer for expense reports
1966
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
1967
-            $seller->tva_assuj = 1;     // Most seller uses vat
1966
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
1967
+            $seller->tva_assuj = 1; // Most seller uses vat
1968 1968
             $buyer = new Societe($this->db);
1969 1969
 
1970 1970
             $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
@@ -2046,8 +2046,8 @@  discard block
 block discarded – undo
2046 2046
 
2047 2047
         // We don't know seller and buyer for expense reports
2048 2048
         if (!is_object($seller)) {
2049
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2050
-            $seller->tva_assuj = 1;     // Most seller uses vat
2049
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2050
+            $seller->tva_assuj = 1; // Most seller uses vat
2051 2051
         }
2052 2052
 
2053 2053
         $expensereportrule = new ExpenseReportRule($db);
@@ -2131,8 +2131,8 @@  discard block
 block discarded – undo
2131 2131
 
2132 2132
         // We don't know seller and buyer for expense reports
2133 2133
         if (!is_object($seller)) {
2134
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2135
-            $seller->tva_assuj = 1;     // Most seller uses vat
2134
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2135
+            $seller->tva_assuj = 1; // Most seller uses vat
2136 2136
         }
2137 2137
 
2138 2138
         $expenseik = new ExpenseReportIk($this->db);
@@ -2226,10 +2226,10 @@  discard block
 block discarded – undo
2226 2226
             $type = 0; // TODO What if type is service ?
2227 2227
 
2228 2228
             // We don't know seller and buyer for expense reports
2229
-            $seller = $mysoc;           // We use same than current company (expense report are often done in same country)
2230
-            $seller->tva_assuj = 1;     // Most seller uses vat
2231
-            $seller->localtax1_assuj = $mysoc->localtax1_assuj;     // We don't know, we reuse the state of company
2232
-            $seller->localtax2_assuj = $mysoc->localtax1_assuj;     // We don't know, we reuse the state of company
2229
+            $seller = $mysoc; // We use same than current company (expense report are often done in same country)
2230
+            $seller->tva_assuj = 1; // Most seller uses vat
2231
+            $seller->localtax1_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2232
+            $seller->localtax2_assuj = $mysoc->localtax1_assuj; // We don't know, we reuse the state of company
2233 2233
             $buyer = new Societe($this->db);
2234 2234
 
2235 2235
             $localtaxes_type = getLocalTaxesFromRate($vatrate, 0, $buyer, $seller);
Please login to merge, or discard this patch.
Dolibarr/Code/ExpenseReport/Classes/PaymentExpenseReport.php 2 patches
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -297,7 +297,7 @@  discard block
 block discarded – undo
297 297
         }
298 298
     }
299 299
 
300
-	// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
300
+    // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
301 301
     /**
302 302
      *  Update database
303 303
      *
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
      */
308 308
     public function update($user = null, $notrigger = 0)
309 309
     {
310
-		// phpcs:enable
310
+        // phpcs:enable
311 311
         $error = 0;
312 312
 
313 313
         // Clean parameters
@@ -375,7 +375,7 @@  discard block
 block discarded – undo
375 375
         }
376 376
     }
377 377
 
378
-	// phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
378
+    // phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter
379 379
     /**
380 380
      *  Delete object in database
381 381
      *
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
      */
386 386
     public function delete($user, $notrigger = 0)
387 387
     {
388
-		// phpcs:enable
388
+        // phpcs:enable
389 389
         $error = 0;
390 390
 
391 391
         $this->db->begin();
@@ -487,7 +487,7 @@  discard block
 block discarded – undo
487 487
         return '';
488 488
     }
489 489
 
490
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
490
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
491 491
     /**
492 492
      *  Return the label of a given status
493 493
      *
@@ -497,7 +497,7 @@  discard block
 block discarded – undo
497 497
      */
498 498
     public function LibStatut($status, $mode = 0)
499 499
     {
500
-		// phpcs:enable
500
+        // phpcs:enable
501 501
         //global $langs;
502 502
 
503 503
         return '';
@@ -635,7 +635,7 @@  discard block
 block discarded – undo
635 635
     }
636 636
 
637 637
 
638
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
638
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
639 639
     /**
640 640
      *  Update link between the expense report payment and the generated line in llx_bank
641 641
      *
@@ -644,7 +644,7 @@  discard block
 block discarded – undo
644 644
      */
645 645
     public function update_fk_bank($id_bank)
646 646
     {
647
-		// phpcs:enable
647
+        // phpcs:enable
648 648
         $sql = "UPDATE " . MAIN_DB_PREFIX . "payment_expensereport SET fk_bank = " . ((int) $id_bank) . " WHERE rowid = " . ((int) $this->id);
649 649
 
650 650
         dol_syslog(get_class($this) . "::update_fk_bank", LOG_DEBUG);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -211,7 +211,7 @@
 block discarded – undo
211 211
             $sql .= " '" . $this->db->idate($this->datep) . "',";
212 212
             $sql .= " " . price2num($totalamount) . ",";
213 213
             $sql .= " " . ((int) $this->fk_typepayment) . ", '" . $this->db->escape($this->num_payment) . "', '" . $this->db->escape($this->note_public) . "', " . ((int) $user->id) . ",";
214
-            $sql .= " 0)";  // fk_bank is ID of transaction into ll_bank
214
+            $sql .= " 0)"; // fk_bank is ID of transaction into ll_bank
215 215
 
216 216
             dol_syslog(get_class($this) . "::create", LOG_DEBUG);
217 217
             $resql = $this->db->query($sql);
Please login to merge, or discard this patch.
Dolibarr/Code/ExpenseReport/Api/ExpenseReports.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -717,7 +717,7 @@  discard block
 block discarded – undo
717 717
 
718 718
 
719 719
 
720
-	// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
720
+    // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
721 721
     /**
722 722
      * Clean sensible object datas
723 723
      *
@@ -726,7 +726,7 @@  discard block
 block discarded – undo
726 726
      */
727 727
     protected function _cleanObjectDatas($object)
728 728
     {
729
-		// phpcs:enable
729
+        // phpcs:enable
730 730
         $object = parent::_cleanObjectDatas($object);
731 731
 
732 732
         unset($object->fk_statut);
Please login to merge, or discard this patch.