From c5dc1f6a9b8d11b47f2024f6d6133a28d87320e8 Mon Sep 17 00:00:00 2001 From: Dariusz Korsak Date: Fri, 4 Nov 2022 12:11:17 +0100 Subject: [PATCH] offsetGet omit the deprecation notice in PHP 8.1 (#12) Co-authored-by: Dariusz Korsak --- .phpunit.result.cache | 1 - src/RateLimitOptions.php | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) delete mode 100644 .phpunit.result.cache diff --git a/.phpunit.result.cache b/.phpunit.result.cache deleted file mode 100644 index c55a0c1..0000000 --- a/.phpunit.result.cache +++ /dev/null @@ -1 +0,0 @@ -C:37:"PHPUnit\Runner\DefaultTestResultCache":937:{a:2:{s:7:"defects";a:6:{s:61:"LosMiddlewareTest\RateLimit\RateLimitTest::testNeedIpOuApiKey";i:4;s:66:"LosMiddlewareTest\RateLimit\RateLimitTest::testAddHeadersForApiKey";i:4;s:62:"LosMiddlewareTest\RateLimit\RateLimitTest::testAddHeadersForIp";i:4;s:64:"LosMiddlewareTest\RateLimit\RateLimitTest::testDecreaseRemaining";i:4;s:58:"LosMiddlewareTest\RateLimit\RateLimitTest::testGenerate429";i:3;s:52:"LosMiddlewareTest\RateLimit\RateLimitTest::testReset";i:3;}s:5:"times";a:6:{s:61:"LosMiddlewareTest\RateLimit\RateLimitTest::testNeedIpOuApiKey";d:0.039;s:66:"LosMiddlewareTest\RateLimit\RateLimitTest::testAddHeadersForApiKey";d:0.018;s:62:"LosMiddlewareTest\RateLimit\RateLimitTest::testAddHeadersForIp";d:0.017;s:64:"LosMiddlewareTest\RateLimit\RateLimitTest::testDecreaseRemaining";d:0.018;s:58:"LosMiddlewareTest\RateLimit\RateLimitTest::testGenerate429";d:0.022;s:52:"LosMiddlewareTest\RateLimit\RateLimitTest::testReset";d:0.02;}}} \ No newline at end of file diff --git a/src/RateLimitOptions.php b/src/RateLimitOptions.php index 956be32..55be175 100644 --- a/src/RateLimitOptions.php +++ b/src/RateLimitOptions.php @@ -43,6 +43,7 @@ class RateLimitOptions extends ArrayObject * * @return mixed|null */ + #[\ReturnTypeWillChange] public function offsetGet($index) { if (! $this->offsetExists($index) && array_key_exists($index, $this->defaultValues)) {