Skip to content

Commit 038a769

Browse files
committed
rector fix
1 parent 4f20cc3 commit 038a769

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/SignedUrl.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,23 @@ public function __construct(protected SignedUrlConfig $config)
2020
{
2121
$this->key = config('Encryption')->key;
2222

23-
if (empty($this->config->algorithm) || ! in_array($this->config->algorithm, hash_hmac_algos(), true)) {
23+
if ($this->config->algorithm === '' || $this->config->algorithm === '0' || ! in_array($this->config->algorithm, hash_hmac_algos(), true)) {
2424
throw SignedUrlException::forIncorrectAlgorithm();
2525
}
2626

27-
if (empty($this->config->expirationKey)) {
27+
if ($this->config->expirationKey === '' || $this->config->expirationKey === '0') {
2828
throw SignedUrlException::forEmptyExpirationKey();
2929
}
3030

31-
if (empty($this->config->tokenKey)) {
31+
if ($this->config->tokenKey === '' || $this->config->tokenKey === '0') {
3232
throw SignedUrlException::forEmptyTokenKey();
3333
}
3434

35-
if (empty($this->config->signatureKey)) {
35+
if ($this->config->signatureKey === '' || $this->config->signatureKey === '0') {
3636
throw SignedUrlException::forEmptySignatureKey();
3737
}
3838

39-
if (empty($this->config->algorithmKey)) {
39+
if ($this->config->algorithmKey === '' || $this->config->algorithmKey === '0') {
4040
throw SignedUrlException::forEmptyAlgorithmKey();
4141
}
4242

0 commit comments

Comments
 (0)