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

MapSettings::getEncryptionKey()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 5
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 2
eloc 4
c 1
b 0
f 0
nc 2
nop 0
dl 0
loc 9
ccs 5
cts 5
cp 1
crap 2
rs 10
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