| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 3 |
| CRAP Score | 4.125 |
| Changes | 0 | ||
| 1 | <?php |
||
| 21 | 10 | public function fetchRequest(): ?ServerRequestInterface |
|
| 22 | { |
||
| 23 | 10 | if ($this->container->has(ServerRequestInterface::class)) { |
|
| 24 | /** @psalm-suppress MixedAssignment */ |
||
| 25 | $result = $this->container->get(ServerRequestInterface::class); |
||
| 26 | |||
| 27 | if ($result instanceof ServerRequestInterface) { |
||
| 28 | return $result; |
||
| 29 | } |
||
| 30 | } |
||
| 31 | |||
| 32 | 10 | return (new RequestFetcher())->fetchRequest(); |
|
| 33 | } |
||
| 35 |