Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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