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