Conditions | 2 |
Paths | 2 |
Total Lines | 7 |
Code Lines | 3 |
Lines | 0 |
Ratio | 0 % |
Tests | 4 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 4 | public function resolve(HandlerParameterAttributeInterface $attribute, ServerRequestInterface $request): mixed |
|
20 | { |
||
21 | 4 | if ($attribute::class !== Route::class) { |
|
22 | 1 | throw new InvalidArgumentException(sprintf('Expected "%s", got "%s".', Route::class, $attribute::class)); |
|
23 | } |
||
24 | |||
25 | 3 | return $this->currentRoute->getArgument($attribute->getName()); |
|
|
|||
26 | } |
||
28 |