Skip to content

Commit

Permalink
enum rawValues
Browse files Browse the repository at this point in the history
  • Loading branch information
asika32764 committed Dec 16, 2023
1 parent 99fd23e commit 67983fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/utilities/src/Enum/EnumPhpAdapterTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ public static function cases(): array
return array_values(static::values());
}

public static function rawValues(): array
{
return array_map(fn (self $case) => $case->value, self::values());
}

public function getValue(): mixed
{
if ($this instanceof \UnitEnum) {
Expand Down

0 comments on commit 67983fd

Please sign in to comment.