From 19171d4f8ea2e0ff588104ff764bf5da45f15511 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Tue, 16 Nov 2021 15:15:55 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/comm/propal/class/propal.class.php | 2 +- htdocs/commande/class/commande.class.php | 2 +- htdocs/compta/facture/class/facture.class.php | 4 ++-- htdocs/core/tpl/objectline_create.tpl.php | 2 +- htdocs/fourn/class/fournisseur.commande.class.php | 5 ++--- htdocs/fourn/class/fournisseur.facture.class.php | 6 +++--- htdocs/supplier_proposal/card.php | 2 +- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 +- 8 files changed, 12 insertions(+), 13 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index a532a874d65..37636e51b54 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -734,7 +734,7 @@ class Propal extends CommonObject // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/commande/class/commande.class.php b/htdocs/commande/class/commande.class.php index 67cb1a1790f..b43a231b7e9 100644 --- a/htdocs/commande/class/commande.class.php +++ b/htdocs/commande/class/commande.class.php @@ -1648,7 +1648,7 @@ class Commande extends CommonOrder // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index d092a25d680..e806bc72dd5 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2087,7 +2087,7 @@ class Facture extends CommonInvoice $facligne->rang = -1; $facligne->info_bits = 2; - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $facligne->rang = 1; for ($ii = 1; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); @@ -3362,7 +3362,7 @@ class Facture extends CommonInvoice // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/core/tpl/objectline_create.tpl.php b/htdocs/core/tpl/objectline_create.tpl.php index f1a15e0d537..2f5b8397bdd 100644 --- a/htdocs/core/tpl/objectline_create.tpl.php +++ b/htdocs/core/tpl/objectline_create.tpl.php @@ -310,7 +310,7 @@ if ($nolinesbefore) { echo ''; } - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $tab = array(-1 => $langs->trans('AtTheEnd')); if (!empty($object->lines)) { $langs->load('admin'); diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 790f67623d8..c9e32fbb1f7 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1857,8 +1857,7 @@ class CommandeFournisseur extends CommonOrder $localtax1_type = empty($localtaxes_type[0]) ? '' : $localtaxes_type[0]; $localtax2_type = empty($localtaxes_type[2]) ? '' : $localtaxes_type[2]; - if ($rang < 0) - { + if ($rang < 0) { $rangmax = $this->line_max(); $rang = $rangmax + 1; } @@ -1923,7 +1922,7 @@ class CommandeFournisseur extends CommonOrder // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines + } elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines for ($ii = $rang; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index bb137410b6d..6a46695135a 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1111,7 +1111,7 @@ class FactureFournisseur extends CommonInvoice public function insert_discount($idremise) { // phpcs:enable - global $conf, $langs; + global $conf, $langs; include_once DOL_DOCUMENT_ROOT.'/core/lib/price.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php'; @@ -1142,7 +1142,7 @@ class FactureFournisseur extends CommonInvoice $facligne->rang = -1; $facligne->info_bits = 2; - if(!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { + if (!empty($conf->global->MAIN_VIEW_LINE_NUMBER)) { $facligne->rang = 1; for ($ii = 1; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii+1); @@ -2014,7 +2014,7 @@ class FactureFournisseur extends CommonInvoice // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines + } elseif ($rang > 0 && $rang <= count($this->lines)) { // Update all rank of all other lines for ($ii = $rang; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index eaed94f6529..29c147e142e 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -673,7 +673,7 @@ if (empty($reshook)) { $pu_ttc, $tva_npr, $type, - $rank, + $rank, 0, GETPOST('fk_parent_line'), $fournprice, diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index f90555f9f1e..08a3a03476a 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -621,7 +621,7 @@ class SupplierProposal extends CommonObject // Reorder if child line if (!empty($fk_parent_line)) { $this->line_order(true, 'DESC'); - } elseif($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines + } elseif ($ranktouse > 0 && $ranktouse <= count($this->lines)) { // Update all rank of all other lines for ($ii = $ranktouse; $ii <= count($this->lines); $ii++) { $this->updateRangOfLine($this->lines[$ii - 1]->id, $ii + 1); }