1 | <?php |
||
16 | class Configuration implements ConfigurationInterface |
||
17 | { |
||
18 | /** |
||
19 | * @var array |
||
20 | */ |
||
21 | protected $configuration; |
||
22 | |||
23 | /** |
||
24 | * Create a configuration from array. |
||
25 | * |
||
26 | * @param array $configuration |
||
27 | * @param array $analyzersConfiguration |
||
28 | */ |
||
29 | 882 | public function __construct(array $configuration = [], array $analyzersConfiguration = []) |
|
40 | |||
41 | /** |
||
42 | * Generates the configuration tree. |
||
43 | * |
||
44 | * @param array $analyzersConfiguration |
||
45 | * |
||
46 | * @return TreeBuilder |
||
47 | */ |
||
48 | 882 | public function getConfigTreeBuilder(array $analyzersConfiguration = []) |
|
91 | |||
92 | /** |
||
93 | * Sets a configuration setting. |
||
94 | * |
||
95 | * @param string $key |
||
96 | * @param string $value |
||
97 | */ |
||
98 | public function setValue($key, $value) |
||
102 | |||
103 | /** |
||
104 | * Gets a configuration setting. |
||
105 | * |
||
106 | * @param string $key |
||
107 | * @param mixed $default |
||
108 | * |
||
109 | * @return mixed |
||
110 | */ |
||
111 | 48 | public function getValue($key, $default = null) |
|
119 | |||
120 | /** |
||
121 | * Checks if a configuration setting is set. |
||
122 | * |
||
123 | * @param string $key |
||
124 | * @return bool |
||
125 | */ |
||
126 | 48 | public function valueIsTrue($key) |
|
130 | } |
||
131 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.