Conditions | 4 |
Paths | 4 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 4 |
1 | <?php |
||
46 | 8 | public function parseArguments(ExecutorInterface $executor) : array |
|
47 | { |
||
48 | 8 | $result = []; |
|
49 | |||
50 | 8 | foreach ($this->getArguments() as $argument) { |
|
51 | 8 | if ($argument instanceof ActionInterface) { |
|
52 | 3 | $result[] = $executor->execute($argument); |
|
53 | 8 | } elseif (is_callable($argument)) { |
|
54 | 4 | $result[] = call_user_func($argument); |
|
55 | } else { |
||
56 | 7 | $result[] = $argument; |
|
57 | } |
||
58 | } |
||
59 | |||
60 | 7 | return $result; |
|
61 | } |
||
62 | } |
||
63 |