| Conditions | 3 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 12 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 36 | public static function __callStatic(string $name, array $arguments) |
||
| 37 | { |
||
| 38 | if ( |
||
| 39 | Str::startsWith($name, 'addAction') |
||
| 40 | && ($hookAction = Str::camel(Str::after($name, 'addAction'))) |
||
| 41 | ) { |
||
| 42 | static::addHookAction($hookAction, ...$arguments); |
||
|
|
|||
| 43 | |||
| 44 | return; |
||
| 45 | } |
||
| 46 | |||
| 47 | throw new \BadMethodCallException("Method [$name] not exists"); |
||
| 48 | } |
||
| 50 |