Passed
Push — master ( 6b02b9...a180a6 )
by Nico
26:39 queued 18:43
created

MapSettings   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 19
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 19
ccs 7
cts 7
cp 1
rs 10
wmc 3

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigPath() 0 3 1
A getEncryptionKey() 0 9 2
1
<?php
2
3
namespace Stu\Module\Config\Model;
4
5
final class MapSettings extends AbstractSettings implements MapSettingsInterface
6
{
7
    private const CONFIG_PATH = 'map';
8
    private const SETTING_ENCRYPTION_KEY = 'encryptionKey';
9
10 2
    public function getEncryptionKey(): ?string
11
    {
12 2
        if ($this->exists(self::SETTING_ENCRYPTION_KEY)) {
13 1
            $key = $this->getStringConfigValue(self::SETTING_ENCRYPTION_KEY);
14
15 1
            return $key;
16
        }
17
18 1
        return null;
19
    }
20
21 2
    public function getConfigPath(): string
22
    {
23 2
        return self::CONFIG_PATH;
24
    }
25
}
26