| Conditions | 3 |
| Paths | 3 |
| Total Lines | 15 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 11 | public static function actionExists(string $action): bool |
||
| 12 | { |
||
| 13 | $actionData = explode('@', $action); |
||
| 14 | |||
| 15 | if (count($actionData) === 2) |
||
| 16 | { |
||
| 17 | [$actionController, $actionMethod] = $actionData; |
||
| 18 | |||
| 19 | $controllerNamespace = $actionController[0] !== '\\' |
||
| 20 | ? self::$defaultControllerNamespace : ''; |
||
| 21 | |||
| 22 | return method_exists($controllerNamespace.$actionController, $actionMethod); |
||
| 23 | } |
||
| 24 | |||
| 25 | throw SquadronHelperException::badRouteActionString($action); |
||
| 26 | } |
||
| 28 |