diff --git a/src/Traits/HasStatuses.php b/src/Traits/HasStatuses.php index 1febabc..a34dc49 100644 --- a/src/Traits/HasStatuses.php +++ b/src/Traits/HasStatuses.php @@ -4,8 +4,8 @@ use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Arr; -use Illuminate\Support\Str; use Illuminate\Support\Collection; +use Illuminate\Support\Str; use SkoreLabs\LaravelStatus\Events\StatusCreating; use SkoreLabs\LaravelStatus\Status; use Spatie\Enum\Enum; @@ -217,8 +217,10 @@ protected function toStatusEnum($value) /** @var \SkoreLabs\LaravelStatus\Status $statusModel */ $statusModel = $this->status()->getModel(); - return $statusModel::toEnum(static::statusesClass(), - is_string($value) ? Str::camel($value) : $value); + return $statusModel::toEnum( + static::statusesClass(), + is_string($value) ? Str::camel($value) : $value + ); } /**