Code Duplication    Length = 7-7 lines in 2 locations

core/console/controller_console.php 1 location

@@ 48-54 (lines=7) @@
45
        $controller_name = array_pop($path);
46
47
        // si se agrupa el controlador en un directorio
48
        if (count($path)) {
49
            $dir = implode('/', $path);
50
            $file .= "/$dir";
51
            if (!is_dir($file) && !FileUtil::mkdir($file)) {
52
                throw new KumbiaException("No se ha logrado crear el directorio \"$file\"");
53
            }
54
        }
55
        $file .= "/{$controller_name}_controller.php";
56
57
        // si no existe o se sobreescribe

core/console/model_console.php 1 location

@@ 43-49 (lines=7) @@
40
        // obtiene el nombre de modelo
41
        $model_name = array_pop($path);
42
43
        if (count($path)) {
44
            $dir = implode('/', $path);
45
            $file .= "/$dir";
46
            if (!is_dir($file) && !FileUtil::mkdir($file)) {
47
                throw new KumbiaException("No se ha logrado crear el directorio \"$file\"");
48
            }
49
        }
50
        $file .= "/$model_name.php";
51
52
        // si no existe o se sobreescribe