Completed
Pull Request — master (#84)
by Nick
01:52
created

ConfigEnvironment   A

Complexity

Total Complexity 6

Size/Duplication

Total Lines 88
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

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

6 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
A getAllScriptPaths() 0 4 1
A getDynamicVariables() 0 4 1
A getConstants() 0 4 1
A getTemplates() 0 4 1
A getDotenvPaths() 0 4 1
1
<?php declare(strict_types=1);
2
3
4
namespace Shopware\Psh\Config;
5
6
/**
7
 * A single configuration environment
8
 */
9
class ConfigEnvironment
10
{
11
    /**
12
     * @var array
13
     */
14
    private $commandPaths;
15
16
    /**
17
     * @var array
18
     */
19
    private $dynamicVariables;
20
21
    /**
22
     * @var array
23
     */
24
    private $constants;
25
26
    /**
27
     * @var array
28
     */
29
    private $templates;
30
31
    /**
32
     * @var array
33
     */
34
    private $dotenvPaths;
35
36
    /**
37
     * @param array $commandPaths
38
     * @param array $dynamicVariables
39
     * @param array $constants
40
     * @param array $templates
41
     * @param array $dotenvPaths
42
     */
43
    public function __construct(
44
        array $commandPaths = [],
45
        array $dynamicVariables = [],
46
        array $constants = [],
47
        array $templates = [],
48
        array $dotenvPaths = []
49
    ) {
50
        $this->commandPaths = $commandPaths;
51
        $this->dynamicVariables = $dynamicVariables;
52
        $this->constants = $constants;
53
        $this->templates = $templates;
54
        $this->dotenvPaths = $dotenvPaths;
55
    }
56
57
    /**
58
     * @return array
59
     */
60
    public function getAllScriptPaths(): array
61
    {
62
        return $this->commandPaths;
63
    }
64
65
    /**
66
     * @return array
67
     */
68
    public function getDynamicVariables(): array
69
    {
70
        return $this->dynamicVariables;
71
    }
72
73
    /**
74
     * @return array
75
     */
76
    public function getConstants(): array
77
    {
78
        return $this->constants;
79
    }
80
81
    /**
82
     * @return array
83
     */
84
    public function getTemplates(): array
85
    {
86
        return $this->templates;
87
    }
88
89
    /**
90
     * @return array
91
     */
92
    public function getDotenvPaths(): array
93
    {
94
        return $this->dotenvPaths;
95
    }
96
}
97