1 | <?php |
||
13 | class Configuration implements ConfigurationInterface |
||
14 | { |
||
15 | /** |
||
16 | * @var array |
||
17 | */ |
||
18 | protected $configuration; |
||
19 | |||
20 | /** |
||
21 | * Create a configuration from array. |
||
22 | * |
||
23 | * @param array $configuration |
||
24 | * @param array $analyzersConfiguration |
||
25 | */ |
||
26 | 747 | public function __construct(array $configuration = [], array $analyzersConfiguration = []) |
|
37 | |||
38 | /** |
||
39 | * Generates the configuration tree. |
||
40 | * |
||
41 | * @param array $analyzersConfiguration |
||
42 | * |
||
43 | * @return TreeBuilder |
||
44 | */ |
||
45 | 747 | public function getConfigTreeBuilder(array $analyzersConfiguration = []) |
|
82 | |||
83 | /** |
||
84 | * Sets a configuration setting. |
||
85 | * |
||
86 | * @param string $key |
||
87 | * @param string $value |
||
88 | */ |
||
89 | public function setValue($key, $value) |
||
93 | |||
94 | /** |
||
95 | * Gets a configuration setting. |
||
96 | * |
||
97 | * @param string $key |
||
98 | * @param mixed $default |
||
99 | * |
||
100 | * @return mixed |
||
101 | */ |
||
102 | 1 | public function getValue($key, $default = null) |
|
110 | |||
111 | /** |
||
112 | * Checks if a configuration setting is set. |
||
113 | * |
||
114 | * @param string $key |
||
115 | * @return bool |
||
116 | */ |
||
117 | 23 | public function valueIsTrue($key) |
|
121 | } |
||
122 |
Very long variable names usually make code harder to read. It is therefore recommended not to make variable names too verbose.