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 |
||
60 | 23 | public static function __callStatic($method, $arguments) |
|
61 | { |
||
62 | 16 | if (in_array($method, static::$availableMethods) === false) { |
|
|
|||
63 | 2 | throw new \InvalidArgumentException( |
|
64 | 3 | sprintf('%s is not a valid method', $method) |
|
65 | 2 | ); |
|
66 | } |
||
67 | |||
68 | 21 | list($pattern, $handler) = $arguments; |
|
69 | |||
70 | 14 | return new self( |
|
71 | 14 | $method, $pattern, $handler |
|
72 | 14 | ); |
|
73 | } |
||
74 | |||
99 |
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.