Passed
Push — master ( bd8f44...48c747 )
by Nico
15:42 queued 06:57
created

StuConfig::getSecuritySettings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 2
cp 0
crap 2
rs 10
1
<?php
2
3
namespace Stu\Module\Config;
4
5
use Override;
0 ignored issues
show
Bug introduced by
The type Override was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
use Stu\Module\Config\Model\CacheSettingsInterface;
7
use Stu\Module\Config\Model\DbSettingsInterface;
8
use Stu\Module\Config\Model\DebugSettingsInterface;
9
use Stu\Module\Config\Model\GameSettingsInterface;
10
use Stu\Module\Config\Model\ResetSettingsInterface;
11
use Stu\Module\Config\Model\SecuritySettingsInterface;
12
use Stu\Module\Config\Model\SettingsCacheInterface;
13
14
final class StuConfig implements StuConfigInterface
15
{
16 2
    public function __construct(
17
        private SettingsCacheInterface $settingsCache
18 2
    ) {}
19
20 2
    #[Override]
21
    public function getCacheSettings(): CacheSettingsInterface
22
    {
23 2
        return $this->settingsCache->getSettings(CacheSettingsInterface::class, null);
24
    }
25
26 2
    #[Override]
27
    public function getDbSettings(): DbSettingsInterface
28
    {
29 2
        return $this->settingsCache->getSettings(DbSettingsInterface::class, null);
30
    }
31
32 2
    #[Override]
33
    public function getDebugSettings(): DebugSettingsInterface
34
    {
35 2
        return $this->settingsCache->getSettings(DebugSettingsInterface::class, null);
36
    }
37
38 210
    #[Override]
39
    public function getGameSettings(): GameSettingsInterface
40
    {
41 210
        return $this->settingsCache->getSettings(GameSettingsInterface::class, null);
42
    }
43
44
    #[Override]
45
    public function getResetSettings(): ResetSettingsInterface
46
    {
47
        return $this->settingsCache->getSettings(ResetSettingsInterface::class, null);
48
    }
49
50
    #[Override]
51
    public function getSecuritySettings(): SecuritySettingsInterface
52
    {
53
        return $this->settingsCache->getSettings(SecuritySettingsInterface::class, null);
54
    }
55
}
56