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)) {
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);

View File

@ -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;
}
}