| 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 |
||
| 11 | 3 | public function resolve(HandlerParameterAttributeInterface $attribute, ServerRequestInterface $request): mixed |
|
| 12 | { |
||
| 13 | 3 | if ($attribute::class !== Request::class) { |
|
| 14 | 1 | throw new \InvalidArgumentException(sprintf('Expected "%s", got "%s".', Request::class, $attribute::class)); |
|
| 15 | } |
||
| 16 | |||
| 17 | 2 | return $request->getAttribute($attribute->getName()); |
|
|
|
|||
| 18 | } |
||
| 20 |