Skip to content

Commit 1f96f3d

Browse files
authored
Merge pull request #12 from artisansdk/master
Cast TTL to integer to satisfy input type expectations
2 parents 08abab7 + cc6d7ca commit 1f96f3d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Limiter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ public function hit(): int
164164
$this->cache->put(
165165
$bucket->key(),
166166
$bucket->toArray(),
167-
max(1, $bucket->duration()) // $ttl to $seconds conversion requires minimally 1s
167+
(int) max(1, ceil($bucket->duration())) // $ttl to $seconds conversion requires minimally 1s
168168
);
169169
}
170170

0 commit comments

Comments
 (0)