public function delete(string $name) : bool
    {
        $path = explode('.', $name);
        $key = $path[0];
        $file = $this->configFile($key);

        if (count($path) === 1) {
            if (file_exists($file)) {
                if (unlink($file)) {
                    unset($this->cache[$key]);
                    return true;
                }

                return false;
            }

            return false;
        }

        if (!isset($this->cache[$key])) {
            if (!file_exists($file)) {
                return false;
            }

            $this->cache[$key] = new ConfigHelper($this->readConfig($file));
        }

        if ($this->cache[$key]->delete($path)) {
            $this->writeConfig($file, $this->cache[$key]->getConfig());
            return true;
        }

        return false;
    }
public function delete(string $name) : bool
    {
        $path = explode('.', $name);
        $key = $path[0];
        $file = $this->configFile($key);

        if (count($path) === 1) {
            if (file_exists($file)) {
                if (unlink($file)) {
                    unset($this->cache[$key]);
                    return true;
                }

                return false;
            }

            return false;
        }

        if (!isset($this->cache[$key])) {
            if (!file_exists($file)) {
                return false;
            }

            $this->cache[$key] = new ConfigHelper($this->readConfig($file));
        }

        if ($this->cache[$key]->delete($path)) {
            $this->writeConfig($file, $this->cache[$key]->getConfig());
            return true;
        }

        return false;
    }
{@inheritdoc}