Options   A
last analyzed

Complexity

Total Complexity 8

Size/Duplication

Total Lines 117
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 117
rs 10
c 0
b 0
f 0
wmc 8

8 Methods

Rating   Name   Duplication   Size   Complexity  
A getImportsKey() 0 3 1
A getParametersKey() 0 3 1
A setImportsKey() 0 5 1
A areImportsEnabled() 0 3 1
A setEnableImports() 0 5 1
A areParametersEnabled() 0 3 1
A setParametersKey() 0 5 1
A setEnableParameters() 0 5 1
1
<?php
2
3
/*
4
 * This file is part of the awurth/config package.
5
 *
6
 * (c) Alexis Wurth <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace AWurth\Config;
13
14
/**
15
 * Options.
16
 *
17
 * @author Alexis Wurth <[email protected]>
18
 */
19
class Options
20
{
21
    /**
22
     * @var bool
23
     */
24
    protected $enableImports = true;
25
26
    /**
27
     * @var bool
28
     */
29
    protected $enableParameters = true;
30
31
    /**
32
     * @var string
33
     */
34
    protected $importsKey = 'imports';
35
36
    /**
37
     * @var string
38
     */
39
    protected $parametersKey = 'parameters';
40
41
    /**
42
     * Tells whether imports are enabled.
43
     *
44
     * @return bool
45
     */
46
    public function areImportsEnabled()
47
    {
48
        return $this->enableImports;
49
    }
50
51
    /**
52
     * Sets whether to enable imports.
53
     *
54
     * @param bool $enabled
55
     *
56
     * @return self
57
     */
58
    public function setEnableImports($enabled)
59
    {
60
        $this->enableImports = $enabled;
61
62
        return $this;
63
    }
64
65
    /**
66
     * Tells whether parameters are enabled.
67
     *
68
     * @return bool
69
     */
70
    public function areParametersEnabled()
71
    {
72
        return $this->enableParameters;
73
    }
74
75
    /**
76
     *
77
     * Sets whether to enable parameters.
78
     *
79
     * @param bool $enabled
80
     *
81
     * @return self
82
     */
83
    public function setEnableParameters($enabled)
84
    {
85
        $this->enableParameters = $enabled;
86
87
        return $this;
88
    }
89
90
    /**
91
     * Gets the imports key.
92
     *
93
     * @return string
94
     */
95
    public function getImportsKey()
96
    {
97
        return $this->importsKey;
98
    }
99
100
    /**
101
     * Sets the imports key.
102
     *
103
     * @param string $key
104
     *
105
     * @return self
106
     */
107
    public function setImportsKey($key)
108
    {
109
        $this->importsKey = $key;
110
111
        return $this;
112
    }
113
114
    /**
115
     * Gets the parameters key.
116
     *
117
     * @return string
118
     */
119
    public function getParametersKey()
120
    {
121
        return $this->parametersKey;
122
    }
123
124
    /**
125
     * Sets the parameters key.
126
     *
127
     * @param string $key
128
     *
129
     * @return self
130
     */
131
    public function setParametersKey($key)
132
    {
133
        $this->parametersKey = $key;
134
135
        return $this;
136
    }
137
}
138