Skip to content

Commit

Permalink
Merge pull request #526 from l3aro/patch-implicit-nullable-type-php-84
Browse files Browse the repository at this point in the history
fix implicit nullable type declaration PHP 8.4
  • Loading branch information
Nielsvanpach authored Jan 6, 2025
2 parents 65e5589 + 210aa2a commit 7e4def3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Tag.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public static function getLocale()
return app()->getLocale();
}

public function scopeWithType(Builder $query, string $type = null): Builder
public function scopeWithType(Builder $query, ?string $type = null): Builder
{
if (is_null($type)) {
return $query;
Expand Down Expand Up @@ -65,7 +65,7 @@ public static function getWithType(string $type): DbCollection
return static::withType($type)->get();
}

public static function findFromString(string $name, string $type = null, string $locale = null)
public static function findFromString(string $name, ?string $type = null, ?string $locale = null)
{
$locale = $locale ?? static::getLocale();

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

public static function findFromStringOfAnyType(string $name, string $locale = null)
public static function findFromStringOfAnyType(string $name, ?string $locale = null)
{
$locale = $locale ?? static::getLocale();

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

public static function findOrCreateFromString(string $name, string $type = null, string $locale = null)
public static function findOrCreateFromString(string $name, ?string $type = null, ?string $locale = null)
{
$locale = $locale ?? static::getLocale();

Expand Down

0 comments on commit 7e4def3

Please sign in to comment.