Skip to content

Commit

Permalink
Fixed a type problem with expiration date
Browse files Browse the repository at this point in the history
  • Loading branch information
IlCallo committed Feb 18, 2018
1 parent 7d104e4 commit 0706460
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/CloudFrontUrlSigner.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ protected function isFuture(int $timestamp): bool
* - DateTime: The value will be used as expiration date
* - int: The expiration time will be set to X days from now
*
* @return string
* @return int
* @throws \Dreamonkey\CloudFrontUrlSigner\Exceptions\InvalidExpiration
*/
protected function getExpirationTimestamp($expiration): string
protected function getExpirationTimestamp($expiration): int
{
if (is_int($expiration)) {
$expiration = (new DateTime())->modify((int)$expiration . ' days');
Expand All @@ -78,6 +78,6 @@ protected function getExpirationTimestamp($expiration): string
throw new InvalidExpiration('Expiration date must be in the future');
}

return (string)$expiration->getTimestamp();
return $expiration->getTimestamp();
}
}

0 comments on commit 0706460

Please sign in to comment.