Skip to content

Commit

Permalink
Remove unnecessary in_array
Browse files Browse the repository at this point in the history
  • Loading branch information
stevebauman committed Apr 17, 2023
1 parent b4e3995 commit e52f535
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Models/Concerns/HasAttributes.php
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ protected function castAttribute(string $key, array|null $value): mixed
*/
protected function castRequiresArrayValue(string $key): bool
{
return in_array($this->getCastType($key), ['collection']);
return $this->getCastType($key) === 'collection';
}

/**
Expand Down

0 comments on commit e52f535

Please sign in to comment.