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.
Passed
Push — master ( 8b5091...c51706 )
by Anton
01:50
created

ConfigurationAccessor   A

Complexity

Total Complexity 5

Size/Duplication

Total Lines 55
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
dl 0
loc 55
rs 10
c 0
b 0
f 0
ccs 12
cts 12
cp 1
wmc 5
lcom 1
cbo 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfig() 0 4 1
A get() 0 4 1
A has() 0 4 1
A set() 0 5 1
A add() 0 5 1
1
<?php declare(strict_types=1);
2
/* (c) Anton Medvedev <[email protected]>
3
 *
4
 * For the full copyright and license information, please view the LICENSE
5
 * file that was distributed with this source code.
6
 */
7
8
namespace Deployer\Configuration;
9
10
trait ConfigurationAccessor
11
{
12
    /**
13
     * @var Configuration
14
     */
15
    private $config;
16
17 11
    public function getConfig(): Configuration
18
    {
19 11
        return $this->config;
20
    }
21
22
    /**
23
     * Get configuration options
24
     *
25
     * @param mixed $default
26
     * @return mixed
27
     */
28 20
    public function get(string $name, $default = null)
29
    {
30 20
        return $this->config->get($name, $default);
31
    }
32
33
    /**
34
     * Check configuration option
35
     */
36 19
    public function has(string $name): bool
37
    {
38 19
        return $this->config->has($name);
39
    }
40
41
    /**
42
     * Set configuration option
43
     *
44
     * @param mixed $value
45
     * @return static
46
     */
47 17
    public function set(string $name, $value)
48
    {
49 17
        $this->config->set($name, $value);
50 17
        return $this;
51
    }
52
53
    /**
54
     * Add configuration option
55
     *
56
     * @param mixed[] $value
57
     * @return static
58
     */
59 1
    public function add(string $name, array $value)
60
    {
61 1
        $this->config->add($name, $value);
62 1
        return $this;
63
    }
64
}
65