final public static function names()
    {
        $result = [];
        $classes = self::hierarchy(\get_called_class());

        /* @var $class ReflectionClass */
        foreach ($classes as $class) {
            $result = \array_merge(self::namesFor($class->name), $result);
        }

        return $result;
    }
final public static function names()
    {
        $result = [];
        $classes = self::hierarchy(\get_called_class());

        /* @var $class ReflectionClass */
        foreach ($classes as $class) {
            $result = \array_merge(self::namesFor($class->name), $result);
        }

        return $result;
    }
final public static function names ( ) { $ result = [ ] ; $ classes = self :: hierarchy ( \ get_called_class ( ) ) ; /* @var $class ReflectionClass */ foreach ( $ classes as $ class ) { $ result = \ array_merge ( self :: namesFor ( $ class -> name ) , $ result ) ; } return $ result ; }
Returns an array containing the names of the enumeration constants of
this enumeration type, in the order they are declared.

This method may be used to iterate over the names of the enumerated
constants as follows:

/---code php
foreach (ConcreteEnum::names() as $name) {
echo $name, \PHP_EOL;
}
\---

@return string[] An array containing the names of the constants of this
enumeration type, in the order they are declared.
Returns an array containing the names of the enumeration constants of this enumeration type in the order they are declared .