Code Duplication    Length = 8-9 lines in 2 locations

src/Helper.php 2 locations

@@ 79-86 (lines=8) @@
76
    /**
77
     * Get configuration
78
     */
79
    public static function getConfig($name = 'application', $context = null)
80
    {
81
        if($context == null)
82
            $context = getenv('ERDIKO_CONTEXT');
83
84
        $filename = ERDIKO_APP."/config/{$context}/{$name}.json";
85
        return static::getConfigFile($filename);
86
    }
87
    
88
    /**
89
     * Get the compiled application routes from the config files
@@ 93-101 (lines=9) @@
90
     *
91
     * @todo cache the loaded/compiled routes
92
     */
93
    public static function getRoutes($context = null)
94
    {
95
        if($context == null)
96
            $context = getenv('ERDIKO_CONTEXT');
97
        $file = ERDIKO_APP."/config/{$context}/routes.json";
98
        $applicationConfig = static::getConfigFile($file);
99
        
100
        return $applicationConfig['routes'];
101
    }
102
    
103
    /**
104
     * Send email