Skip to content

Commit 7e4def3

Browse files
authored
Merge pull request #526 from l3aro/patch-implicit-nullable-type-php-84
fix implicit nullable type declaration PHP 8.4
2 parents 65e5589 + 210aa2a commit 7e4def3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Tag.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public static function getLocale()
2828
return app()->getLocale();
2929
}
3030

31-
public function scopeWithType(Builder $query, string $type = null): Builder
31+
public function scopeWithType(Builder $query, ?string $type = null): Builder
3232
{
3333
if (is_null($type)) {
3434
return $query;
@@ -65,7 +65,7 @@ public static function getWithType(string $type): DbCollection
6565
return static::withType($type)->get();
6666
}
6767

68-
public static function findFromString(string $name, string $type = null, string $locale = null)
68+
public static function findFromString(string $name, ?string $type = null, ?string $locale = null)
6969
{
7070
$locale = $locale ?? static::getLocale();
7171

@@ -78,7 +78,7 @@ public static function findFromString(string $name, string $type = null, string
7878
->first();
7979
}
8080

81-
public static function findFromStringOfAnyType(string $name, string $locale = null)
81+
public static function findFromStringOfAnyType(string $name, ?string $locale = null)
8282
{
8383
$locale = $locale ?? static::getLocale();
8484

@@ -88,7 +88,7 @@ public static function findFromStringOfAnyType(string $name, string $locale = nu
8888
->get();
8989
}
9090

91-
public static function findOrCreateFromString(string $name, string $type = null, string $locale = null)
91+
public static function findOrCreateFromString(string $name, ?string $type = null, ?string $locale = null)
9292
{
9393
$locale = $locale ?? static::getLocale();
9494

0 commit comments

Comments
 (0)