| Conditions | 2 |
| Paths | 2 |
| Total Lines | 11 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 12 | protected function getControllerClass(ServerRequestInterface $request) : string |
||
| 13 | { |
||
| 14 | $route = $this->getRoute($request); |
||
| 15 | $matches = $route->getMatchesParams(); |
||
| 16 | |||
| 17 | if (!array_key_exists('_controller', $matches)) { |
||
| 18 | throw new \BadMethodCallException('Not found controller name for dynamic controller point'); |
||
| 19 | } |
||
| 20 | |||
| 21 | return $this->prefix . $this->normalizeClassFromUrl($matches['_controller']); |
||
| 22 | } |
||
| 23 | |||
| 36 |