Code Duplication    Length = 6-11 lines in 2 locations

src/command/PSFSConsole.php 1 location

@@ 37-42 (lines=6) @@
34
    foreach ($commands as $com) include_once($com->getRealPath());
35
36
    //Hidratamos con los comandos de los módulos
37
    if (file_exists(CORE_DIR))
38
    {
39
        $commands = new Finder();
40
        $commands->in(CORE_DIR)->path("Command")->name("*.php");
41
        foreach ($commands as $com) include_once($com->getRealPath());
42
    }
43
44
    $console->run();
45

src/bootstrap.php 1 location

@@ 45-55 (lines=11) @@
42
    }
43
}
44
45
if (file_exists(CORE_DIR)) {
46
    //Autoload de módulos
47
    $finder = new Finder();
48
    $finder->files()->in(CORE_DIR)->name('autoload.php');
49
    /* @var $file SplFileInfo */
50
    foreach ($finder as $file) {
51
        $path = $file->getRealPath();
52
        include_once($path);
53
    }
54
}
55
56
\PSFS\base\Logger::log('Bootstrap initialized');
57
58
defined('PSFS_BOOTSTRAP_LOADED') or define('PSFS_BOOTSTRAP_LOADED', true);