protected static function getConstants(): array
    {
        $calledClass = get_called_class();

        if (!array_key_exists($calledClass, static::$constCacheArray)) {
            $reflect = new ReflectionClass($calledClass);
            static::$constCacheArray[$calledClass] = $reflect->getConstants();
        }

        return static::$constCacheArray[$calledClass];
    }
protected static function getConstants(): array
    {
        $calledClass = get_called_class();

        if (!array_key_exists($calledClass, static::$constCacheArray)) {
            $reflect = new ReflectionClass($calledClass);
            static::$constCacheArray[$calledClass] = $reflect->getConstants();
        }

        return static::$constCacheArray[$calledClass];
    }
protected static function getConstants ( ) : array { $ calledClass = get_called_class ( ) ; if ( ! array_key_exists ( $ calledClass , static :: $ constCacheArray ) ) { $ reflect = new ReflectionClass ( $ calledClass ) ; static :: $ constCacheArray [ $ calledClass ] = $ reflect -> getConstants ( ) ; } return static :: $ constCacheArray [ $ calledClass ] ; }
Get all of the constants on the class

@return array
Get all of the constants on the class