Skip to content

Commit 0706460

Browse files
committed
Fixed a type problem with expiration date
1 parent 7d104e4 commit 0706460

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/CloudFrontUrlSigner.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ protected function isFuture(int $timestamp): bool
6161
* - DateTime: The value will be used as expiration date
6262
* - int: The expiration time will be set to X days from now
6363
*
64-
* @return string
64+
* @return int
6565
* @throws \Dreamonkey\CloudFrontUrlSigner\Exceptions\InvalidExpiration
6666
*/
67-
protected function getExpirationTimestamp($expiration): string
67+
protected function getExpirationTimestamp($expiration): int
6868
{
6969
if (is_int($expiration)) {
7070
$expiration = (new DateTime())->modify((int)$expiration . ' days');
@@ -78,6 +78,6 @@ protected function getExpirationTimestamp($expiration): string
7878
throw new InvalidExpiration('Expiration date must be in the future');
7979
}
8080

81-
return (string)$expiration->getTimestamp();
81+
return $expiration->getTimestamp();
8282
}
8383
}

0 commit comments

Comments
 (0)