| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 7 |
| CRAP Score | 3 |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 55 | 7 | public function getAction() |
|
| 56 | { |
||
| 57 | 7 | if ($this->action instanceof Closure) { |
|
| 58 | |||
| 59 | 2 | return $this->action; |
|
| 60 | } |
||
| 61 | |||
| 62 | 5 | list($controller, $method) = explode('@', $this->action); |
|
| 63 | |||
| 64 | 5 | if (!class_exists($controller)) { |
|
| 65 | 1 | throw new InvalidArgumentException('Invalid controller specified'); |
|
| 66 | } |
||
| 67 | |||
| 68 | 4 | return [$controller, $method]; |
|
| 69 | } |
||
| 93 |