final public static function all() : array
    {
        static $all = null;

        if ($all === null) {
            foreach ((new \ReflectionClass(get_called_class()))->getConstants() as $constant) {
                $all[] = new static($constant);
            }
        }

        return $all;
    }
final public static function all() : array
    {
        static $all = null;

        if ($all === null) {
            foreach ((new \ReflectionClass(get_called_class()))->getConstants() as $constant) {
                $all[] = new static($constant);
            }
        }

        return $all;
    }
final public static function all ( ) : array { static $ all = null ; if ( $ all === null ) { foreach ( ( new \ ReflectionClass ( get_called_class ( ) ) ) -> getConstants ( ) as $ constant ) { $ all [ ] = new static ( $ constant ) ; } } return $ all ; }
Returns an array of all enums.

@return AbstractEnum[]
Returns an array of all enums .