Total Complexity | 3 |
Total Lines | 36 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | final class AttributesConfig extends InjectableConfig |
||
10 | { |
||
11 | public const CONFIG = 'attributes'; |
||
12 | |||
13 | /** |
||
14 | * @var array{ |
||
|
|||
15 | * annotations: array{support:bool}, |
||
16 | * cache: array{storage: null|non-empty-string, enabled: bool}, |
||
17 | * } |
||
18 | */ |
||
19 | protected array $config = [ |
||
20 | 'annotations' => [ |
||
21 | 'support' => true, |
||
22 | ], |
||
23 | 'cache' => [ |
||
24 | 'storage' => null, |
||
25 | 'enabled' => false, |
||
26 | ], |
||
27 | ]; |
||
28 | |||
29 | 377 | public function isAnnotationsReaderEnabled(): bool |
|
30 | { |
||
31 | 377 | return (bool)$this->config['annotations']['support']; |
|
32 | } |
||
33 | |||
34 | 377 | public function isCacheEnabled(): bool |
|
35 | { |
||
36 | 377 | return (bool)($this->config['cache']['enabled'] ?? false); |
|
37 | } |
||
38 | |||
39 | /** |
||
40 | * @return non-empty-string|null |
||
41 | */ |
||
42 | 2 | public function getCacheStorage(): ?string |
|
45 | } |
||
46 | } |
||
47 |