Code Duplication    Length = 7-8 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

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