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.

Text   A
last analyzed

Complexity

Total Complexity 6

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 0
Metric Value
wmc 6
lcom 1
cbo 0
dl 0
loc 30
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
B get() 0 25 6
1
<?php
2
3
class Text
4
{
5
    private static $texts;
6
7
    public static function get($key, $data = null)
8
    {
9
        // if not $key
10
        if (!$key) {
11
            return null;
12
        }
13
14
        if ($data) {
15
            foreach ($data as $var => $value) {
16
                ${$var} = $value;
17
            }
18
        }
19
20
        // load config file (this is only done once per application lifecycle)
21
        if (!self::$texts) {
22
            self::$texts = require('../application/config/texts.php');
23
        }
24
25
        // check if array key exists
26
        if (!array_key_exists($key, self::$texts)) {
27
            return null;
28
        }
29
30
        return self::$texts[$key];
31
    }
32
}
33