Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
26 | public function __invoke(ServerRequestInterface $request): array |
||
27 | { |
||
28 | $host = $this->getHeaderLine($request, 'HOST'); |
||
29 | |||
30 | if (null === $host) { |
||
31 | throw new CsrfHeaderCheckMiddlewareException('Could not find the HOST header in the HTTP request.'); |
||
32 | } |
||
33 | |||
34 | return [ $this->removePortFromHost($host) ]; |
||
35 | } |
||
36 | |||
42 |