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.

AnnotationBuilderConfig   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 39
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 4
c 1
b 0
f 0
lcom 1
cbo 0
dl 0
loc 39
rs 10

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A setConfig() 0 4 1
A getConfig() 0 7 2
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