Conditions | 3 |
Paths | 2 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php declare(strict_types = 1); |
||
31 | 2 | if ($routeMatch->isMatch()) { |
|
32 | // Register Controller to the request object |
||
33 | 1 | $request = $request->withAttribute('controller', $routeMatch->getController()); |
|
34 | |||
35 | // Add all routing attributes to request |
||
36 | 1 | foreach ($routeMatch->getAttributes() as $key => $value) { |
|
37 | 1 | $request = $request->withAttribute($key, $value); |
|
38 | } |
||
39 | } else { |
||
40 | 1 | $request = $request->withAttribute('controller', $this->fallbackController); |
|
41 | } |
||
42 | |||
43 | 2 | return $delegate->next($request); |
|
44 | } |
||
45 | } |
||
46 |