Code Duplication    Length = 7-7 lines in 2 locations

src/base/extension/AssetsParser.php 1 location

@@ 198-204 (lines=7) @@
195
     * @param string $content
196
     * @throws ConfigException
197
     */
198
    private function storeContents($path, $content = "")
199
    {
200
        GeneratorHelper::createDir(dirname($path));
201
        if ("" !== $content && false === file_put_contents($path, $content)) {
202
            throw new ConfigException(_('No se tienen permisos para escribir en ' . $path));
203
        }
204
    }
205
206
    /**
207
     * Método que imprime el resultado de la generación de los assets

src/base/Cache.php 1 location

@@ 53-59 (lines=7) @@
50
     * @throws GeneratorException
51
     * @throws ConfigException
52
     */
53
    private function saveTextToFile($data, $path)
54
    {
55
        GeneratorHelper::createDir(dirname($path));
56
        if (false === FileHelper::writeFile($path, $data)) {
57
            throw new ConfigException(_('No se tienen los permisos suficientes para escribir en el fichero ') . $path);
58
        }
59
    }
60
61
    /**
62
     * @param string $path