Skip to content

Commit 1cff288

Browse files
committed
Return array for body when passed Definition object
1 parent 56b470b commit 1cff288

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tools/Generator.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,9 +291,10 @@ public function ~method~(~parameters~) : ~returnType~
291291

292292
$parameterArray = '[';
293293

294-
foreach ($parameters as $name => $junk)
294+
foreach ($parameters as $name => $definition)
295295
{
296-
$parameterArray .= "'{$name}' => {$dollar}{$name}, ";
296+
$getData = str_contains($definition, "\\Definition\\") ? '->getData()' : '';
297+
$parameterArray .= "'{$name}' => {$dollar}{$name}{$getData}, ";
297298
}
298299
$parameterArray .= ']';
299300
$code .= <<<ACTION

0 commit comments

Comments
 (0)