Completed
Push — master ( 665b5b...7e390c )
by Mike
03:12
created

AbstractFacade::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

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