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