We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 88b7653 commit 3a7c95dCopy full SHA for 3a7c95d
src/SimpleDTO.php
@@ -491,11 +491,9 @@ private function formatArrayableValue(mixed $value): array|int|string
491
492
private function transformCollectionToArray(Collection $collection): array
493
{
494
- return $collection->map(function ($item) {
495
- return $this->isArrayable($item)
+ return $collection->map(fn ($item) => $this->isArrayable($item)
496
? $this->formatArrayableValue($item)
497
- : $item;
498
- })->toArray();
+ : $item)->toArray();
499
}
500
501
private function transformDTOToArray(SimpleDTO $dto): array
0 commit comments