Created
June 23, 2023 15:13
-
-
Save praisedare/5c6a7214c2c9a64bc2d0dd2f21cce6f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
trait EnumerableConstants | |
{ | |
static function values() | |
{ | |
return array_values ( | |
(new \ReflectionClass(static::class))->getConstants() | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment