Code Duplication    Length = 8-9 lines in 2 locations

src/Helper.php 2 locations

@@ 92-99 (lines=8) @@
89
    /**
90
     * Get configuration
91
     */
92
    public static function getConfig($name = 'application', $context = null)
93
    {
94
        if($context == null)
95
            $context = getenv('ERDIKO_CONTEXT');
96
97
        $filename = ERDIKO_APP."/config/{$context}/{$name}.json";
98
        return static::getConfigFile($filename);
99
    }
100
    
101
    /**
102
     * Get the compiled application routes from the config files
@@ 106-114 (lines=9) @@
103
     *
104
     * @todo cache the loaded/compiled routes
105
     */
106
    public static function getRoutes($context = null)
107
    {
108
        if($context == null)
109
            $context = getenv('ERDIKO_CONTEXT');
110
        $file = ERDIKO_APP."/config/{$context}/routes.json";
111
        $applicationConfig = static::getConfigFile($file);
112
        
113
        return $applicationConfig['routes'];
114
    }
115
    
116
    /**
117
     * Send email