diff --git a/src/Presentation/Api/V1/Dto/IncoSheets/IncoSheetDto.php b/src/Presentation/Api/V1/Dto/IncoSheets/IncoSheetDto.php index 0adcdc2..aad7182 100644 --- a/src/Presentation/Api/V1/Dto/IncoSheets/IncoSheetDto.php +++ b/src/Presentation/Api/V1/Dto/IncoSheets/IncoSheetDto.php @@ -128,11 +128,9 @@ final readonly class IncoSheetDto implements ApiResponseDto /** @var array $vars */ $vars = get_object_vars($this); - // Map over allergens and additives to call their toArray methods $vars['allergens'] = array_map(static fn (AllergenDto $dto): array => $dto->toArray(), $this->allergens); $vars['additives'] = array_map(static fn (AdditiveDto $dto): array => $dto->toArray(), $this->additives); - // Call toArray on the nested object DTOs $vars['allegations'] = $this->allegations->toArray(); if ($this->portions !== null) { $vars['portions'] = $this->portions->toArray();