Total Complexity | 9 |
Total Lines | 79 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | <?php |
||
11 | final class Environment implements EnvironmentInterface |
||
12 | { |
||
13 | const VALUE_MAP = [ |
||
14 | 'true' => true, |
||
15 | '(true)' => true, |
||
16 | 'false' => false, |
||
17 | '(false)' => false, |
||
18 | 'null' => null, |
||
19 | '(null)' => null, |
||
20 | 'empty' => '' |
||
21 | ]; |
||
22 | |||
23 | /** @var string|null */ |
||
24 | private $id = null; |
||
25 | |||
26 | /** @var array */ |
||
27 | private $values = []; |
||
28 | |||
29 | /** |
||
30 | * @param array $values |
||
31 | */ |
||
32 | public function __construct(array $values = []) |
||
36 | |||
37 | /** |
||
38 | * @inheritdoc |
||
39 | */ |
||
40 | public function getID(): string |
||
48 | |||
49 | /** |
||
50 | * @inheritdoc |
||
51 | */ |
||
52 | public function set(string $name, $value) |
||
59 | |||
60 | /** |
||
61 | * @inheritdoc |
||
62 | */ |
||
63 | public function get(string $name, $default = null) |
||
71 | |||
72 | /** |
||
73 | * @param mixed $value |
||
74 | * @return bool|null|string |
||
75 | */ |
||
76 | protected function normalize($value): ?string |
||
89 | } |