Upgrade to 3.7.1
This commit is contained in:
@@ -18,29 +18,29 @@ use Exception;
|
||||
*/
|
||||
class Redirect extends Exception
|
||||
{
|
||||
/**
|
||||
* Returns the HTTP code for the redirect
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function code(): int
|
||||
{
|
||||
$codes = [301, 302, 303, 307, 308];
|
||||
/**
|
||||
* Returns the HTTP code for the redirect
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
public function code(): int
|
||||
{
|
||||
$codes = [301, 302, 303, 307, 308];
|
||||
|
||||
if (in_array($this->getCode(), $codes) === true) {
|
||||
return $this->getCode();
|
||||
}
|
||||
if (in_array($this->getCode(), $codes) === true) {
|
||||
return $this->getCode();
|
||||
}
|
||||
|
||||
return 302;
|
||||
}
|
||||
return 302;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the URL for the redirect
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function location(): string
|
||||
{
|
||||
return $this->getMessage();
|
||||
}
|
||||
/**
|
||||
* Returns the URL for the redirect
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function location(): string
|
||||
{
|
||||
return $this->getMessage();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user