| Conditions | 2 |
| Paths | 2 |
| Total Lines | 20 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 36 | public function __invoke(... $parameterInput) |
||
| 37 | { |
||
| 38 | if ([] === $this->parameters) { |
||
| 39 | return ($this->function)(... $parameterInput); |
||
| 40 | } |
||
| 41 | |||
| 42 | $nextParameter = $this->parameters[0]; |
||
| 43 | |||
| 44 | $otherParameters = array_slice($this->parameters, 1); |
||
| 45 | |||
| 46 | return self::lazyParameters( |
||
| 47 | function (... $parameters) use ($nextParameter, $parameterInput) { |
||
| 48 | return ($this->function)( |
||
| 49 | $nextParameter(... $parameterInput), |
||
| 50 | ... $parameters |
||
| 51 | ); |
||
| 52 | }, |
||
| 53 | ... $otherParameters |
||
| 54 | ); |
||
| 55 | } |
||
| 56 | } |
||
| 57 |