Created
November 13, 2017 11:39
-
-
Save zlikavac32/3d28200a434a203ecfc9d2c12440ce6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
| /** | |
| * @method static YesNo YES | |
| * @method static YesNo NO | |
| */ | |
| abstract class YesNo extends \Zlikavac32\Enum\Enum | |
| { | |
| protected static function enumerate(): array | |
| { | |
| return [ | |
| 'YES', 'NO' | |
| ]; | |
| } | |
| } | |
| var_dump(YesNo::YES()->name()); // YES |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment