Fixing style errors.

This commit is contained in:
stickler-ci 2022-12-30 15:20:12 +00:00
parent ab0e069ae1
commit 8a2f44aec4
2 changed files with 13 additions and 14 deletions

View File

@ -687,10 +687,10 @@ class Shipments extends DolibarrApi
if (!empty($object->lines) && is_array($object->lines)) { if (!empty($object->lines) && is_array($object->lines)) {
foreach ($object->lines as $line) { foreach ($object->lines as $line) {
if (is_array($line->detail_batch)) { if (is_array($line->detail_batch)) {
foreach($line->detail_batch as $keytmp2 => $valtmp2) { foreach ($line->detail_batch as $keytmp2 => $valtmp2) {
unset($line->detail_batch[$keytmp2]->db); unset($line->detail_batch[$keytmp2]->db);
} }
} }
unset($line->tva_tx); unset($line->tva_tx);
unset($line->vat_src_code); unset($line->vat_src_code);
unset($line->total_ht); unset($line->total_ht);

View File

@ -112,15 +112,14 @@ class MultiCurrencies extends DolibarrApi
// phpcs:enable // phpcs:enable
$object = parent::_cleanObjectDatas($object); $object = parent::_cleanObjectDatas($object);
// Clear all fields out of interrest // Clear all fields out of interrest
foreach($object as $key => $value){ foreach ($object as $key => $value) {
if ($key == "rate") $object->$key = $this->_cleanObjectDatas($object->$key); if ($key == "rate") $object->$key = $this->_cleanObjectDatas($object->$key);
if ($key == "id" || $key == "code" || $key == "rate" || $key == "date_sync") if ($key == "id" || $key == "code" || $key == "rate" || $key == "date_sync")
continue; continue;
unset($object->$key); unset($object->$key);
} }
return $object; return $object;
} }
} }