Fix phpstan issues.

This commit is contained in:
James Cole
2023-11-05 16:55:16 +01:00
parent 4edd9fe3da
commit a0564751d6
72 changed files with 110 additions and 138 deletions

View File

@@ -113,10 +113,8 @@ class BillUpdateService
return $bill;
}
// remove if name is empty. Should be overruled by ID.
if ('' === $objectGroupTitle) {
$bill->objectGroups()->sync([]);
$bill->save();
}
$bill->objectGroups()->sync([]);
$bill->save();
}
if (array_key_exists('object_group_id', $data)) {
// try also with ID:
@@ -130,10 +128,8 @@ class BillUpdateService
return $bill;
}
if (0 === $objectGroupId) {
$bill->objectGroups()->sync([]);
$bill->save();
}
$bill->objectGroups()->sync([]);
$bill->save();
}
return $bill;