mirror of
https://github.com/itflow-org/itflow
synced 2026-08-18 05:25:12 +00:00
Allow PHP-8.2 and up Compatibility instead of just PHP-8.4
This commit is contained in:
@@ -121,19 +121,12 @@ class UriSigner
|
||||
$uri = self::normalize($uri);
|
||||
$status = $this->doVerify($uri);
|
||||
|
||||
if (self::STATUS_VALID === $status) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (self::STATUS_MISSING === $status) {
|
||||
throw new UnsignedUriException();
|
||||
}
|
||||
|
||||
if (self::STATUS_INVALID === $status) {
|
||||
throw new UnverifiedSignedUriException();
|
||||
}
|
||||
|
||||
throw new ExpiredSignedUriException();
|
||||
match ($status) {
|
||||
self::STATUS_VALID => null,
|
||||
self::STATUS_INVALID => throw new UnverifiedSignedUriException(),
|
||||
self::STATUS_EXPIRED => throw new ExpiredSignedUriException(),
|
||||
default => throw new UnsignedUriException(),
|
||||
};
|
||||
}
|
||||
|
||||
private function computeHash(string $uri): string
|
||||
|
||||
Reference in New Issue
Block a user