Upgrade to 3.7.1

This commit is contained in:
Bastian Allgeier
2022-07-12 13:33:21 +02:00
parent 7931eb5e47
commit 1ad1eaf387
377 changed files with 63981 additions and 63824 deletions

View File

@@ -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();
}
}