Total Complexity | 7 |
Total Lines | 40 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
9 | class Config |
||
10 | { |
||
11 | /** |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $config = []; |
||
15 | |||
16 | public function __construct(array $config = []) |
||
17 | { |
||
18 | $this->config = $config; |
||
19 | } |
||
20 | |||
21 | public function getType() |
||
22 | { |
||
23 | $type = $this->config['type'] ?? ''; |
||
24 | if (empty($type)) { |
||
25 | throw new MissingCacheConfigException('type is missing from cache config'); |
||
26 | } |
||
27 | |||
28 | return $type; |
||
29 | } |
||
30 | |||
31 | public function getOptions(): array |
||
32 | { |
||
33 | return $this->config['options'] ?? []; |
||
34 | } |
||
35 | |||
36 | public function getNamespace(): ?string |
||
39 | } |
||
40 | |||
41 | public function getPrefix(): ?string |
||
44 | } |
||
45 | |||
46 | public function getLoggerServiceName(): ?string |
||
49 | } |
||
50 | } |
||
51 |