GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

Constant   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 49
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
wmc 3
lcom 0
cbo 1
dl 0
loc 49
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A getGlobals() 0 14 3
1
<?php declare (strict_types=1);
2
/**
3
 * @license MIT
4
 * @author Samuel Adeshina <[email protected]>
5
 *
6
 * This file is part of the EmmetBlue project, please read the license document
7
 * available in the root level of the project
8
 */
9
namespace EmmetBlue\Core;
10
11
use Session\Session;
12
13
/**
14
 * Class Events
15
 *
16
 * @author Samuel Adeshina <[email protected]>
17
 *
18
 * @since v0.0.1 08/06/2016 14:20
19
 */
20
class Constant
21
{
22
    /**
23
     * Events
24
     */
25
    const EVENT_INSERT = 'EVENT: INSERT DML EVENT';
26
    const EVENT_SELECT = 'EVENT: SELECT DML EVENT';
27
    const EVENT_UPDATE = 'EVENT: UPDATE DML EVENT';
28
29
    /**
30
     * @author Lucky Bardeson
31
     */
32
    const EVENT_DELETE = 'EVENT: DELETE DML EVENT';
33
34
    /**
35
     * Error Numbers
36
     */
37
    const ERROR_401 = 'ERROR_401: Resource Inaccessible';
38
    const ERROR_402 = 'ERROR_402: Resource Requirements Not Met';
39
    const ERROR_403 = 'ERROR_403: Resource Not Writable';
40
    const ERROR_404 = 'ERROR_404: Resource Not Found';
41
42
    /**
43
     * Error Severities
44
     */
45
    const ERROR_HIGH = 'ERROR_SEVERITY: HIGH';
46
    const ERROR_LOW = 'ERROR_SEVERITY: LOW';
47
    const ERROR_NORMAL = 'ERROR_SEVERITY: NORMAL';
48
49
    /**
50
     * 
51
     */
52
    const UNDEFINED = 0;
53
54
    public static function getGlobals($config = "configs") {        
0 ignored issues
show
Unused Code introduced by
The parameter $config is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
55
        if (is_file("globals.json")){
56
            $globalLoc = json_decode(file_get_contents("globals.json"), true);
57
58
            if (isset($globalLoc["globals"])){
59
                $file = $globalLoc["globals"].".json";
60
61
                return json_decode(file_get_contents($file), true);
62
            }
63
        }
64
65
        throw new Exception\UndefinedValueException("No configuration data set.", 0);
66
67
    }
68
}
69