Test Failed
Push — master ( 3c3be4...ec7459 )
by Ricardo Jesus Ruiz
02:59
created

Bootstrap   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 22
rs 10
c 0
b 0
f 0
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A go() 0 6 1
A getConfig() 0 6 2
1
<?php
2
/**
3
 * Rioxygen
4
 * @copyright Copyright (c) 2018 Rioxygen. (http://www.Rioxygen.com/)
5
 * @license  BSD 3-clause "New" or "Revised" License 
6
 */
7
8
/**
9
 * Clase para el cargado de clases
10
 * @package \
11
 * @author Ricardo Ruiz <[email protected]>
12
 */
13
class Bootstrap
14
{
15
    /**
16
     * <p>Comando para levantar el autoloader</p>
17
     */
18
    static public function go()
19
    {
20
        // Make everything relative to the root
21
        chdir(dirname(__DIR__));
22
        // Setup autoloading
23
        require_once( __DIR__ . '/vendor/autoload.php' );
24
    }
25
    /**
26
     * Carga Archivo de Configuración
27
     * en la seccion de Pruebas.
28
     */
29
    static public function getConfig()
30
    {
31
        if(file_exists(__DIR__.'/config/local.php')){
32
            return include __DIR__.'/config/local.php';
33
        }
34
        return include __DIR__.'/config/production.php';
35
    }
36
}
37
Bootstrap::go();