AbstractConfig::get()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

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