diff --git a/src/Tag.php b/src/Tag.php index abf5e06..feb8a32 100644 --- a/src/Tag.php +++ b/src/Tag.php @@ -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; @@ -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(); @@ -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(); @@ -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();