AbstractConfig   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Test Coverage

Coverage 60%

Importance

Changes 0
Metric Value
wmc 2
eloc 4
dl 0
loc 24
c 0
b 0
f 0
ccs 3
cts 5
cp 0.6
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A get() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\Core\Business\Model\Config;
5
6
use Xervice\Config\Business\XerviceConfig;
7
8
class AbstractConfig implements ConfigInterface
9
{
10
    /**
11
     * @var \Xervice\Config\Business\Container\ConfigContainer
12
     */
13
    private $config;
14
15
    /**
16
     * AbstractConfig constructor.
17
     */
18 4
    public function __construct()
19
    {
20 4
        $this->config = XerviceConfig::getInstance()->getConfig();
21 4
    }
22
23
    /**
24
     * @param string $name
25
     * @param mixed $default
26
     *
27
     * @return mixed
28
     */
29
    protected function get(string $name, $default = null)
30
    {
31
        return $this->config->get($name, $default);
32
    }
33
}
34