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

AbstractFacade::getFactory()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

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