Passed
Push — master ( d4d417...37f3ab )
by Mike
03:14
created

AbstractFacade   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 56
Duplicated Lines 0 %

Test Coverage

Coverage 63.64%

Importance

Changes 0
Metric Value
wmc 4
eloc 10
dl 0
loc 56
ccs 7
cts 11
cp 0.6364
rs 10
c 0
b 0
f 0

4 Methods

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