Code Duplication    Length = 7-7 lines in 2 locations

src/base/extension/AssetsParser.php 1 location

@@ 179-185 (lines=7) @@
176
     * @param string $content
177
     * @throws ConfigException
178
     */
179
    private function storeContents($path, $content = "")
180
    {
181
        GeneratorHelper::createDir(dirname($path));
182
        if ("" !== $content && false === file_put_contents($path, $content)) {
183
            throw new ConfigException(_('No se tienen permisos para escribir en ' . $path));
184
        }
185
    }
186
187
    /**
188
     * Método que imprime el resultado de la generación de los assets

src/base/Cache.php 1 location

@@ 44-50 (lines=7) @@
41
     * @param string $path
42
     * @throws ConfigException
43
     */
44
    private function saveTextToFile($data, $path)
45
    {
46
        GeneratorHelper::createDir(dirname($path));
47
        if (false === FileHelper::writeFile($path, $data)) {
48
            throw new ConfigException(_('No se tienen los permisos suficientes para escribir en el fichero ') . $path);
49
        }
50
    }
51
52
    /**
53
     * Método que extrae el texto de un fichero