Fix nulls.

This commit is contained in:
James Cole
2025-08-16 06:02:26 +02:00
parent fb19739b54
commit 8d52f83b4f
2 changed files with 6 additions and 3 deletions

View File

@@ -79,8 +79,11 @@ class CategoryTransformer extends AbstractTransformer
];
}
private function beautify(array $array): array
private function beautify(?array $array): ?array
{
if(null === $array) {
return null;
}
$return = [];
foreach ($array as $data) {
$data['sum'] = Steam::bcround($data['sum'], (int)$data['currency_decimal_places']);