From f0dd152f11abc8de28c09414fcaa591ccb0cff44 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 18 Aug 2022 16:12:40 +0000 Subject: [PATCH] Fixing style errors. --- htdocs/bom/class/api_boms.class.php | 4 ++-- htdocs/bom/class/bom.class.php | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/bom/class/api_boms.class.php b/htdocs/bom/class/api_boms.class.php index fb922f7b268..3c06a658b96 100644 --- a/htdocs/bom/class/api_boms.class.php +++ b/htdocs/bom/class/api_boms.class.php @@ -436,13 +436,13 @@ class Boms extends DolibarrApi //Check the rowid is a line of current bom object $lineIdIsFromObject = false; foreach ($this->bom->lines as $bl) { - if ($bl->id == $lineid){ + if ($bl->id == $lineid) { $lineIdIsFromObject = true; break; } } if (!$lineIdIsFromObject) { - throw new RestException(500,'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); + throw new RestException(500, 'Line to delete (rowid: '.$lineid.') is not a line of BOM (id: '.$this->bom->id.')'); } $updateRes = $this->bom->deleteline(DolibarrApiAccess::$user, $lineid); diff --git a/htdocs/bom/class/bom.class.php b/htdocs/bom/class/bom.class.php index 2dcc9368e5b..e774e4ddacf 100644 --- a/htdocs/bom/class/bom.class.php +++ b/htdocs/bom/class/bom.class.php @@ -668,8 +668,8 @@ class BOM extends CommonObject $this->line->context = $this->context; // Rank to use - $rankToUse = (int)$position; - if($rankToUse != $line->oldcopy->position) { // check if position have a new value + $rankToUse = (int) $position; + if ($rankToUse != $line->oldcopy->position) { // check if position have a new value foreach ($this->lines as $bl) { if ($bl->position >= $rankToUse AND $bl->position < ($line->oldcopy->position + 1)) { // move rank up $bl->position++; @@ -1386,7 +1386,6 @@ class BOM extends CommonObject } } } - }