static function all(): array
    {
        $instances = [];

        foreach (static::getMap() as $key => $value) {
            $instances[$key] = self::$instanceCache[static::class][$key]
                ?? (self::$instanceCache[static::class][$key] = new static($key, $value));
        }

        return $instances;
    }
static function all(): array
    {
        $instances = [];

        foreach (static::getMap() as $key => $value) {
            $instances[$key] = self::$instanceCache[static::class][$key]
                ?? (self::$instanceCache[static::class][$key] = new static($key, $value));
        }

        return $instances;
    }
static function all ( ) : array { $ instances = [ ] ; foreach ( static :: getMap ( ) as $ key => $ value ) { $ instances [ $ key ] = self :: $ instanceCache [ static :: class ] [ $ key ] ?? ( self :: $ instanceCache [ static :: class ] [ $ key ] = new static ( $ key , $ value ) ) ; } return $ instances ; }
Get instance for each defined key-value pair

@return static[]
Get instance for each defined key - value pair