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