Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 7 |
Lines | 0 |
Ratio | 0 % |
Tests | 9 |
CRAP Score | 2 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
59 | 21 | public static function __callStatic($method, $arguments) |
|
60 | { |
||
61 | 21 | if (in_array($method, static::$availableMethods) === false) { |
|
|
|||
62 | 3 | throw new \InvalidArgumentException( |
|
63 | 3 | sprintf('%s is not a valid method', $method) |
|
64 | 3 | ); |
|
65 | } |
||
66 | |||
67 | 18 | list($pattern, $handler) = $arguments; |
|
68 | |||
69 | 18 | return new self( |
|
70 | 18 | $method, $pattern, $handler |
|
71 | 18 | ); |
|
72 | } |
||
73 | |||
98 |
Late static binding only has effect in subclasses. A
final
class cannot be extended anymore so late static binding cannot occurr. Consider replacingstatic::
withself::
.To learn more about late static binding, please refer to the PHP core documentation.