Skip to content

Commit

Permalink
resolve nested parameters recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Mar 3, 2024
1 parent 964a698 commit 6c0ec8f
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/Parser.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ public function query(array $parameters, array $structNames = []): array

if (in_array($name, $structNames)) {
if ($value instanceof RecordableInterface) {
foreach ($value->toRecord()->getAll() as $nestedName => $nestedValue) {
$result[$nestedName] = $this->toString($nestedValue);
}
$result = array_merge($result, $this->query($value->toRecord()->getAll()));
}
} else {
$result[$name] = $this->toString($value);
Expand Down

0 comments on commit 6c0ec8f

Please sign in to comment.