Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
trippo committed Jun 14, 2022
2 parents be63903 + 9c371ec commit f576b49
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Traits/EnumProperties.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ protected static function dynamicList(string $method, ?array $cases = null, ?str
*/
protected static function dynamicByKey(string $key, string $method, ?array $cases = null, ?string $lang = null): array
{
if($key === 'value' && ! is_subclass_of(static::class, BackedEnum::class)) {
if ($key === 'value' && ! is_subclass_of(static::class, BackedEnum::class)) {
throw new NotBackedEnum(static::class);
}

Expand All @@ -56,7 +56,7 @@ protected static function dynamicByKey(string $key, string $method, ?array $case
*/
protected static function dynamicAsSelect(string $method, ?array $cases = null, ?string $lang = null): array
{
if(is_subclass_of(static::class, BackedEnum::class)) {
if (is_subclass_of(static::class, BackedEnum::class)) {
return self::dynamicByKey('value', $method, $cases, $lang);
}

Expand Down

0 comments on commit f576b49

Please sign in to comment.