public function getValue(string $key, string $file = null)
    {
        $nbConfigFile = count($this->config);

        if ($file === null && $nbConfigFile > 1) {
            throw new Exception(
                'There are many config files. Please indicate the file to'
                .' obtain the config '.$key,
                $this::ERR_GETVALUE_FILE_NOT_INDICATED
            );
        }

        if ($nbConfigFile === 1) {
            $file = key($this->config);
        }

        if (!isset($this->config[$file])) {
            throw new Exception(
                'The file '.$file.' has not been found for config '.$key,
                $this::ERR_FILE_NOT_FOUND
            );
        }

        $config = (array) $this->config[$file];
        if (!array_key_exists($key, $config)) {
            throw new Exception(
                'The config key '.$key.' has not been found',
                $this::ERR_KEY_NOT_FOUND
            );
        }

        return $config[$key];
    }