Fixed constant assignment on enum which is not valid for PHP 8.1

This commit is contained in:
Alejandro Celaya 2023-01-07 17:09:53 +01:00
parent 3e98485c8b
commit edaf999bf5

View File

@ -2,16 +2,14 @@
namespace Shlinkio\Shlink\Core\Util; namespace Shlinkio\Shlink\Core\Util;
use Fig\Http\Message\StatusCodeInterface;
use function Functional\contains; use function Functional\contains;
enum RedirectStatus: int enum RedirectStatus: int
{ {
case STATUS_301 = StatusCodeInterface::STATUS_MOVED_PERMANENTLY; case STATUS_301 = 301; // StatusCodeInterface::STATUS_MOVED_PERMANENTLY;
case STATUS_302 = StatusCodeInterface::STATUS_FOUND; case STATUS_302 = 302; // StatusCodeInterface::STATUS_FOUND;
case STATUS_307 = StatusCodeInterface::STATUS_TEMPORARY_REDIRECT; case STATUS_307 = 307; // StatusCodeInterface::STATUS_TEMPORARY_REDIRECT;
case STATUS_308 = StatusCodeInterface::STATUS_PERMANENT_REDIRECT; case STATUS_308 = 308; // StatusCodeInterface::STATUS_PERMANENT_REDIRECT;
public function allowsCache(): bool public function allowsCache(): bool
{ {