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.
Completed
Push — develop ( 3775f1...a1ecb7 )
by Sébastien
02:32
created

JpGraph   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 5
lcom 1
cbo 0
1
<?php
2
/**
3
 * Novactive Collection.
4
 *
5
 * @author    Luke Visinoni <[email protected], [email protected]>
6
 * @author    Sébastien Morel <[email protected], [email protected]>
7
 * @copyright 2017 Novactive
8
 * @license   MIT
9
 */
10
11
namespace JpGraph;
12
13
/**
14
 * Class JpGraph.
15
 */
16
class JpGraph
17
{
18
    /**
19
     * @var bool
20
     */
21
    public static $loaded = false;
22
23
    /**
24
     * @var array
25
     */
26
    public static $modules = [];
27
28
    /**
29
     * Load.
30
     */
31
    public static function load()
32
    {
33
        if (self::$loaded !== true) {
34
            include_once __DIR__.'/../../vendor/jpgraph/jpgraph/src/jpgraph.php';
35
            self::$loaded = true;
36
        }
37
    }
38
39
    /**
40
     * @param $moduleName
41
     *
42
     * @throws \Exception
43
     */
44
    public static function module($moduleName)
45
    {
46
        self::load();
47
        if (!in_array($moduleName, self::$modules)) {
48
            $path = __DIR__.'/../../vendor/jpgraph/jpgraph/src/jpgraph_'.$moduleName.'.php';
49
            if (!file_exists($path)) {
50
                throw new \Exception('The JpGraphs\'s module "'.$moduleName.'" does not exist');
51
            }
52
            include_once $path;
53
        }
54
    }
55
}
56