private function getServiceConfig(string $name)
    {
        $config = $this->services()[$name] ?? null;
        if ($config === null) {
            return null;
        }

        if (\is_string($config)) {
            return [
                'class' => $config,
            ];
        }
        if (\is_array($config) && array_key_exists('class', $config)) {
            return $config;
        }

        throw new InvalidConfigException('Config must be either type of string (class name) or array (with `class` element');
    }