Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
13 | public function __construct($uri, int $statusCode = 302, array $headers = [], $body = null, string $version = '1.1', string $reason = null) |
||
14 | { |
||
15 | if (!is_string($uri) and !$uri instanceof UriInterface) { |
||
16 | throw new InvalidArgumentException('Uri must be a string or an instance of UriInterface'); |
||
17 | } |
||
18 | |||
19 | parent::__construct($statusCode, $headers + [ |
||
20 | 'Location' => (string) $uri |
||
21 | ], '', $version, $reason); |
||
22 | } |
||
23 | } |