| Conditions | 4 |
| Paths | 3 |
| Total Lines | 17 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 41 | 60 | protected function prepare(array $args): array |
|
| 42 | { |
||
| 43 | 60 | $this->count = count($args); |
|
| 44 | |||
| 45 | 60 | if ($this->count === 1 && is_array($args[0])) { |
|
| 46 | 23 | if (Util::isAssoc($args[0])) { |
|
| 47 | 22 | $this->type = ArgType::Named; |
|
| 48 | } else { |
||
| 49 | 3 | $this->type = ArgType::Positional; |
|
| 50 | } |
||
| 51 | |||
| 52 | 23 | return $args[0]; |
|
| 53 | } |
||
| 54 | |||
| 55 | 48 | $this->type = ArgType::Positional; |
|
| 56 | |||
| 57 | 48 | return $args; |
|
| 58 | } |
||
| 60 |