| Conditions | 4 |
| Paths | 5 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 24 | public function __invoke($exp, Env $env) |
||
| 25 | { |
||
| 26 | foreach ($this->handlers as $handler) { |
||
| 27 | if ($handler->handles($exp)) { |
||
| 28 | return $handler->evaluate($exp, $env, $this); |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | $call = $this($exp[0], $env); |
||
| 33 | $args = []; |
||
| 34 | foreach (\array_slice($exp, 1) as $arg) { |
||
| 35 | $args[] = $this($arg, $env); |
||
| 36 | } |
||
| 37 | |||
| 38 | return $call(...$args); |
||
| 39 | } |
||
| 40 | } |