src/ConfigProvider.php
public function get(string $environment): ConfigInterface
    {
        if (!isset($this->configMappings[$environment])) {
            throw ConfigException::createByEnvironment($environment);
        }

        if (!isset($this->configs[$environment])) {
            $class = $this->configMappings[$environment];

            $this->configs[$environment] = $class::create($this->rootDir);
        }

        return $this->configs[$environment];
    }
public function get(string $environment): ConfigInterface
    {
        if (!isset($this->configMappings[$environment])) {
            throw ConfigException::createByEnvironment($environment);
        }

        if (!isset($this->configs[$environment])) {
            $class = $this->configMappings[$environment];

            $this->configs[$environment] = $class::create($this->rootDir);
        }

        return $this->configs[$environment];
    }
@param string $environment

@return ConfigInterface

@throws ConfigException