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