GlobalConfiguration   A
last analyzed

Complexity

Total Complexity 7

Size/Duplication

Total Lines 71
Duplicated Lines 0 %

Coupling/Cohesion

Components 2
Dependencies 0

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 7
lcom 2
cbo 0
dl 0
loc 71
ccs 10
cts 20
cp 0.5
rs 10
c 0
b 0
f 0

7 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A getExternalToolConfigurations() 0 4 1
A setExternalToolConfigurations() 0 5 1
A addExternalToolConfigurations() 0 5 1
A getPlugins() 0 4 1
A setPlugins() 0 5 1
A addPlugins() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Paysera\PhpStormHelper\Entity;
5
6
/**
7
 * @api
8
 */
9
class GlobalConfiguration
10
{
11
    /**
12
     * @var array|ExternalToolConfiguration[]
13
     */
14
    private $externalToolConfigurations;
15
16
    /**
17
     * @var array
18
     */
19
    private $plugins;
20
21 6
    public function __construct()
22
    {
23 6
        $this->externalToolConfigurations = [];
24 6
        $this->plugins = [];
25 6
    }
26
27
    /**
28
     * @return array|ExternalToolConfiguration[]
29
     */
30
    public function getExternalToolConfigurations(): array
31
    {
32
        return $this->externalToolConfigurations;
33
    }
34
35
    /**
36
     * @param array|ExternalToolConfiguration[] $externalToolConfigurations
37
     * @return $this
38
     */
39 6
    public function setExternalToolConfigurations(array $externalToolConfigurations): self
40
    {
41 6
        $this->externalToolConfigurations = $externalToolConfigurations;
42 6
        return $this;
43
    }
44
45
    /**
46
     * @param array|ExternalToolConfiguration[] $externalToolConfigurations
47
     * @return $this
48
     */
49
    public function addExternalToolConfigurations(array $externalToolConfigurations): self
50
    {
51
        $this->externalToolConfigurations = array_merge($this->externalToolConfigurations, $externalToolConfigurations);
52
        return $this;
53
    }
54
55
    public function getPlugins(): array
56
    {
57
        return $this->plugins;
58
    }
59
60
    /**
61
     * @param array $plugins list or plugin URLs as strings
62
     * @return $this
63
     */
64 6
    public function setPlugins(array $plugins): self
65
    {
66 6
        $this->plugins = $plugins;
67 6
        return $this;
68
    }
69
70
    /**
71
     * @param array $plugins list or plugin URLs as strings
72
     * @return $this
73
     */
74
    public function addPlugins(array $plugins): self
75
    {
76
        $this->plugins = array_merge($this->plugins, $plugins);
77
        return $this;
78
    }
79
}
80