Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
21 | public static function with(): Closure |
||
22 | { |
||
23 | $possibleCallable = ['static', 'on']; |
||
24 | |||
25 | if (true === is_callable($possibleCallable)) { |
||
26 | return Closure::fromCallable($possibleCallable); |
||
27 | } |
||
28 | |||
29 | throw new InvalidArgumentException('Implement on() method in ' . get_called_class() . '.'); |
||
30 | } |
||
32 |