| Conditions | 4 |
| Paths | 5 |
| Total Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 2 | public function __invoke($exp, Env\EnvInterface $env) |
|
| 29 | { |
||
| 30 | 2 | foreach ($this->handlers as $handler) { |
|
| 31 | 2 | if ($handler->handles($exp)) { |
|
| 32 | 2 | return $handler->evaluate($exp, $env, $this); |
|
| 33 | } |
||
| 34 | } |
||
| 35 | |||
| 36 | 1 | $call = $this($exp[0], $env); |
|
| 37 | 1 | $args = []; |
|
| 38 | 1 | foreach (\array_slice($exp, 1) as $arg) { |
|
| 39 | 1 | $args[] = $this($arg, $env); |
|
| 40 | } |
||
| 41 | |||
| 42 | 1 | return $call(...$args); |
|
| 43 | } |
||
| 44 | } |