Conditions | 5 |
Paths | 8 |
Total Lines | 10 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 5 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
14 | 4 | public function process(mixed $argument, ArgumentResolverInterface $argumentResolver): array |
|
15 | { |
||
16 | 4 | $isConfig = \is_array($argument) |
|
17 | 4 | && isset($argument['name'], $argument['type']) |
|
18 | 4 | && \is_string($argument['name']) |
|
19 | 4 | && $argument['type'] instanceof Webonyx\Type; |
|
20 | |||
21 | 4 | return $isConfig |
|
22 | 1 | ? $argument |
|
23 | 4 | : $argumentResolver->resolve($argument); |
|
24 | } |
||
26 |