public static function getPossibleValues(): array
    {
        if ((static::$possibleValues[static::class] ?? null) === null) {
            static::$possibleValues[static::class] = [];
            try {
                $reflectionClass = new \ReflectionClass(static::class);
            } catch (\ReflectionException $reflectionException) {
                throw new Exceptions\CanNotDeterminePossibleValuesFromClassReflection($reflectionException->getMessage());
            }
            foreach ($reflectionClass->getReflectionConstants() as $reflectionConstant) {
                if ($reflectionConstant->isPublic()) {
                    static::$possibleValues[static::class][] = $reflectionConstant->getValue();
                }
            }
        }

        return static::$possibleValues[static::class];
    }
public static function getPossibleValues(): array
    {
        if ((static::$possibleValues[static::class] ?? null) === null) {
            static::$possibleValues[static::class] = [];
            try {
                $reflectionClass = new \ReflectionClass(static::class);
            } catch (\ReflectionException $reflectionException) {
                throw new Exceptions\CanNotDeterminePossibleValuesFromClassReflection($reflectionException->getMessage());
            }
            foreach ($reflectionClass->getReflectionConstants() as $reflectionConstant) {
                if ($reflectionConstant->isPublic()) {
                    static::$possibleValues[static::class][] = $reflectionConstant->getValue();
                }
            }
        }

        return static::$possibleValues[static::class];
    }
public static function getPossibleValues ( ) : array { if ( ( static :: $ possibleValues [ static :: class ] ?? null ) === null ) { static :: $ possibleValues [ static :: class ] = [ ] ; try { $ reflectionClass = new \ ReflectionClass ( static :: class ) ; } catch ( \ ReflectionException $ reflectionException ) { throw new Exceptions \ CanNotDeterminePossibleValuesFromClassReflection ( $ reflectionException -> getMessage ( ) ) ; } foreach ( $ reflectionClass -> getReflectionConstants ( ) as $ reflectionConstant ) { if ( $ reflectionConstant -> isPublic ( ) ) { static :: $ possibleValues [ static :: class ] [ ] = $ reflectionConstant -> getValue ( ) ; } } } return static :: $ possibleValues [ static :: class ] ; }
Overload this by basic array with listed constants. Taking them via Reflection is not the fastest way.

@return array|string[]
Overload this by basic array with listed constants . Taking them via Reflection is not the fastest way .