AbstractFacade   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 0
Metric Value
wmc 3
eloc 7
dl 0
loc 41
ccs 4
cts 8
cp 0.5
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 6 1
A getFactory() 0 3 1
A getConfig() 0 3 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\Core\Business\Model\Facade;
5
6
7
use Xervice\Core\Business\Model\Config\ConfigInterface;
8
use Xervice\Core\Business\Model\Factory\FactoryInterface;
9
10
class AbstractFacade implements FacadeInterface
11
{
12
    /**
13
     * @var \Xervice\Core\Business\Model\Factory\FactoryInterface
14
     */
15
    protected $factory;
16
17
    /**
18
     * @var \Xervice\Core\Business\Model\Config\ConfigInterface
19
     */
20
    protected $config;
21
22
    /**
23
     * AbstractFacade constructor.
24
     *
25
     * @param \Xervice\Core\Business\Model\Factory\FactoryInterface $factory
26
     * @param \Xervice\Core\Business\Model\Config\ConfigInterface $config
27
     */
28 3
    public function __construct(
29
        FactoryInterface $factory,
30
        ConfigInterface $config
31
    ) {
32 3
        $this->factory = $factory;
33 3
        $this->config = $config;
34 3
    }
35
36
37
    /**
38
     * @return \Xervice\Core\Business\Model\Factory\FactoryInterface
39
     */
40
    protected function getFactory(): FactoryInterface
41
    {
42
        return $this->factory;
43
    }
44
45
    /**
46
     * @return \Xervice\Core\Business\Model\Config\ConfigInterface
47
     */
48
    protected function getConfig(): ConfigInterface
49
    {
50
        return $this->config;
51
    }
52
}