From 2bbc286d78fdc2d3add632fc92da3160f549a45f Mon Sep 17 00:00:00 2001 From: Rhys Lees <43909932+RhysLees@users.noreply.github.com> Date: Mon, 21 Apr 2025 14:14:43 +0100 Subject: [PATCH] Fix Deprecation Warnings --- src/Limit.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Limit.php b/src/Limit.php index dc5fbe0..b4cf65e 100644 --- a/src/Limit.php +++ b/src/Limit.php @@ -69,7 +69,7 @@ class Limit /** * @param (callable(): mixed)|null $responseHandler */ - final public function __construct(int $allow, float $threshold = 1, callable $responseHandler = null) + final public function __construct(int $allow, float $threshold = 1, ?callable $responseHandler = null) { $this->allow = $allow; $this->threshold = $threshold; @@ -123,7 +123,7 @@ public function hit(int $amount = 1): static /** * Set the limit as exceeded */ - public function exceeded(int $releaseInSeconds = null): void + public function exceeded(?int $releaseInSeconds = null): void { $this->exceeded = true;