public function loadToConfig($path, $configKey)
    {
        $loaded = $this->cleanArrayKeysRecursive(
            $this->file->isYamlFile($path)
                ? $this->loadFile($path)
                : $this->loadFromDirectory($path)
        );

        return $this->resolver->findAndReplaceExecutableCodeToExhaustion($loaded, $configKey);
    }