Total Complexity | 5 |
Total Lines | 51 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 4 | ||
Bugs | 1 | Features | 0 |
1 | <?php |
||
19 | class RedirectResponse extends Psr7Response { |
||
20 | /** |
||
21 | * Current request. |
||
22 | * |
||
23 | * @var RequestInterface |
||
24 | */ |
||
25 | protected $request = null; |
||
26 | |||
27 | /** |
||
28 | * Constructor. |
||
29 | * |
||
30 | * @codeCoverageIgnore |
||
31 | * @param RequestInterface $request |
||
32 | */ |
||
33 | public function __construct( RequestInterface $request ) { |
||
36 | } |
||
37 | |||
38 | /** |
||
39 | * Get a response redirecting to a specific url. |
||
40 | * |
||
41 | * @param string $url |
||
42 | * @param integer $status |
||
43 | * @return ResponseInterface |
||
44 | */ |
||
45 | 2 | public function to( $url, $status = 302 ) { |
|
49 | } |
||
50 | |||
51 | /** |
||
52 | * Get a response redirecting back to the referrer or a fallback. |
||
53 | * |
||
54 | * @param string $fallback |
||
55 | * @param integer $status |
||
56 | * @return ResponseInterface |
||
57 | */ |
||
58 | 4 | public function back( $fallback = '', $status = 302 ) { |
|
72 |