Conditions | 4 |
Paths | 4 |
Total Lines | 11 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php namespace Tarsana\Command\Helpers; |
||
46 | public function fields(Syntax $syntax) : array |
||
47 | { |
||
48 | $type = $this->type($syntax); |
||
49 | switch ($type) { |
||
50 | case 'object': |
||
51 | return $syntax->fields(); |
||
52 | case 'array': |
||
53 | case 'optional': |
||
54 | return $this->fields($syntax->syntax()); |
||
55 | } |
||
56 | return []; |
||
57 | } |
||
60 |