Code Duplication    Length = 7-7 lines in 2 locations

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

src/base/extension/AssetsParser.php 1 location

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