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