Skip to content

Commit 1901d43

Browse files
authored
Fix PHP 8.4 deprecation warnings (#18)
* Fix PHP 8.4 deprecation warnings * Fix another PHP 8.4 deprecation warning
1 parent f4f3b59 commit 1901d43

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
}
1111
],
1212
"require": {
13-
"php": ">=5.5",
13+
"php": ">=7.1",
1414
"desarrolla2/cache": "~2.0"
1515
},
1616
"require-dev": {

src/RateLimiter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public function __construct(
7171
/**
7272
* @inheritdoc
7373
*/
74-
public function get($data, ThrottleSettingsInterface $settings = null)
74+
public function get($data, ?ThrottleSettingsInterface $settings = null)
7575
{
7676
if (empty($data)) {
7777
throw new \InvalidArgumentException('Invalid data, please check the data.');
@@ -92,7 +92,7 @@ public function get($data, ThrottleSettingsInterface $settings = null)
9292
*
9393
* @return ThrottlerInterface
9494
*/
95-
private function createThrottler(Data $object, ThrottleSettingsInterface $settings = null)
95+
private function createThrottler(Data $object, ?ThrottleSettingsInterface $settings = null)
9696
{
9797
if (null === $settings) {
9898
$settings = $this->defaultSettings;

src/RateLimiterInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ interface RateLimiterInterface
4040
*
4141
* @throws \InvalidArgumentException
4242
*/
43-
public function get($data, ThrottleSettingsInterface $throttlerSettings = null);
43+
public function get($data, ?ThrottleSettingsInterface $throttlerSettings = null);
4444
}

0 commit comments

Comments
 (0)