Conditions | 3 |
Paths | 3 |
Total Lines | 13 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
12 | public static function call($callable, array $params) |
||
13 | { |
||
14 | if (is_callable($callable)) { |
||
15 | return $callable(...$params); |
||
16 | } |
||
17 | |||
18 | if (is_string($callable)) { |
||
19 | $callableObject = App::make($callable); |
||
20 | |||
21 | return $callableObject(...$params); |
||
22 | } |
||
23 | |||
24 | throw new CallerException('Unexpected callable parameter'); |
||
25 | } |
||
27 |