Conditions | 7 |
Paths | 6 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 56 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
54 | public function getArguments(): iterable |
||
55 | { |
||
56 | foreach ($this->arguments ?? [] as $name => $argument) { |
||
57 | if ($argument instanceof ArgumentInterface || $argument instanceof Webonyx\Type) { |
||
58 | yield $argument; |
||
59 | } elseif (is_string($argument)) { |
||
60 | yield new Argument($name, $argument); |
||
61 | } elseif (is_array($argument)) { |
||
62 | if (is_string($name)) { |
||
63 | $argument['name'] ??= $name; |
||
64 | } |
||
65 | |||
66 | yield $this->extract($argument, Argument::class); |
||
67 | } |
||
71 |