From 8a2f44aec485cd4e817c27c083fdc709b0f0b548 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Fri, 30 Dec 2022 15:20:12 +0000 Subject: [PATCH] Fixing style errors. --- .../expedition/class/api_shipments.class.php | 8 ++++---- .../class/api_multicurrencies.class.php | 19 +++++++++---------- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/htdocs/expedition/class/api_shipments.class.php b/htdocs/expedition/class/api_shipments.class.php index 0536215d57c..450fe943d7e 100644 --- a/htdocs/expedition/class/api_shipments.class.php +++ b/htdocs/expedition/class/api_shipments.class.php @@ -687,10 +687,10 @@ class Shipments extends DolibarrApi if (!empty($object->lines) && is_array($object->lines)) { foreach ($object->lines as $line) { if (is_array($line->detail_batch)) { - foreach($line->detail_batch as $keytmp2 => $valtmp2) { - unset($line->detail_batch[$keytmp2]->db); - } - } + foreach ($line->detail_batch as $keytmp2 => $valtmp2) { + unset($line->detail_batch[$keytmp2]->db); + } + } unset($line->tva_tx); unset($line->vat_src_code); unset($line->total_ht); diff --git a/htdocs/multicurrency/class/api_multicurrencies.class.php b/htdocs/multicurrency/class/api_multicurrencies.class.php index 2ef1ba519b4..e88f936c571 100644 --- a/htdocs/multicurrency/class/api_multicurrencies.class.php +++ b/htdocs/multicurrency/class/api_multicurrencies.class.php @@ -96,7 +96,7 @@ class MultiCurrencies extends DolibarrApi if (!count($obj_ret)) { throw new RestException(404, 'No currencies found'); } - + return $obj_ret; } @@ -111,16 +111,15 @@ class MultiCurrencies extends DolibarrApi { // phpcs:enable $object = parent::_cleanObjectDatas($object); - - // Clear all fields out of interrest - foreach($object as $key => $value){ - if ($key == "rate") $object->$key = $this->_cleanObjectDatas($object->$key); - if ($key == "id" || $key == "code" || $key == "rate" || $key == "date_sync") - continue; - unset($object->$key); + + // Clear all fields out of interrest + foreach ($object as $key => $value) { + if ($key == "rate") $object->$key = $this->_cleanObjectDatas($object->$key); + if ($key == "id" || $key == "code" || $key == "rate" || $key == "date_sync") + continue; + unset($object->$key); } - + return $object; } - }