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