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 — master ( ecf461...e116b7 )
by Vadim
15:02
created

AnnotationBuilderConfig::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 1
1
<?php
2
3
namespace Newage\Annotations\Config;
4
5
/**
6
 * @package Newage\Annotations\Config
7
 */
8
class AnnotationBuilderConfig
9
{
10
    /**
11
     * @var array
12
     */
13
    private $config;
14
15
    /**
16
     * AnnotationConfig constructor.
17
     *
18
     * @param array $config
19
     */
20
    public function __construct($config)
21
    {
22
        $this->setConfig($config);
23
    }
24
25
    /**
26
     * Set configuration
27
     * @param array $config
28
     */
29
    public function setConfig(array $config)
30
    {
31
        $this->config = $config;
32
    }
33
34
    /**
35
     * Get configuration or by name
36
     * @param string $key
37
     * @return array|mixed
38
     */
39
    public function getConfig($key = null)
40
    {
41
        if (isset($this->config[$key])) {
42
            return $this->config[$key];
43
        }
44
        return $this->config;
45
    }
46
}
47