| 1 | <?php |
||
| 13 | class Http extends AbstractHttp |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * Redirect to specific uri path |
||
| 18 | * |
||
| 19 | * @param string $location The path as string |
||
| 20 | * @param integer $code The status code |
||
| 21 | * @return mixed |
||
| 22 | * @throws InvalidArgumentException |
||
| 23 | */ |
||
| 24 | public function redirect(string $location, int $code = 301) |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Workaround to mock this method in phpunit |
||
| 36 | * |
||
| 37 | * @param string $location |
||
| 38 | * @param int $code |
||
| 39 | * |
||
| 40 | * @codeCoverageIgnore |
||
| 41 | * @return void |
||
| 42 | */ |
||
| 43 | protected function triggerRedirect($location = '/', $code = 301) |
||
| 50 | |||
| 51 | } |