Skip to content

Commit cafe3ac

Browse files
authored
Merge pull request #1 from calebdw/php84
fix: php 8.4 compatibility
2 parents 8ead3fc + 59dc756 commit cafe3ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Gravatar.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ class Gravatar extends Base
1818

1919
private const URL = 'https://www.gravatar.com/avatar/%s?d=%s&size=%d';
2020

21-
public static function gravatarUrl(string $mode = null, string $email = null, int $size = 80): string
21+
public static function gravatarUrl(?string $mode = null, ?string $email = null, int $size = 80): string
2222
{
2323
if (!$mode || !in_array($mode, static::MODES, true)) {
2424
$mode = 'retro';
@@ -29,7 +29,7 @@ public static function gravatarUrl(string $mode = null, string $email = null, in
2929
return sprintf(static::URL, $hash, $mode, $size);
3030
}
3131

32-
public static function gravatar(string $dir = null, string $mode = null, string $email = null, int $size = 80, bool $fullPath = true): ?string
32+
public static function gravatar(?string $dir = null, ?string $mode = null, ?string $email = null, int $size = 80, bool $fullPath = true): ?string
3333
{
3434
$dir = $dir ?? sys_get_temp_dir();
3535

0 commit comments

Comments
 (0)