mirror of
https://codeberg.org/vlw/php-xenum.git
synced 2025-09-13 20:23:41 +02:00
feat: add entries() method
This commit is contained in:
parent
166f8faf95
commit
5a686958fe
2 changed files with 6 additions and 0 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -5,6 +5,7 @@
|
|||
/public/storage
|
||||
/storage/*.key
|
||||
/vendor
|
||||
bin
|
||||
.env
|
||||
.env.backup
|
||||
.phpunit.result.cache
|
||||
|
|
|
@ -35,4 +35,9 @@
|
|||
public static function values(): array {
|
||||
return array_column(self::cases(), "value");
|
||||
}
|
||||
|
||||
// Return assoc array of enum names and values
|
||||
public static function entries(): array {
|
||||
return array_combine(self::names(), self::values());
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue