Total Complexity | 6 |
Total Lines | 43 |
Duplicated Lines | 0 % |
Coverage | 100% |
Changes | 0 |
1 | <?php |
||
13 | class BusinessLocatorProxy extends AbstractLocatorProxy |
||
14 | { |
||
15 | private const DIRECTORY = 'Business'; |
||
16 | |||
17 | /** |
||
18 | * @var \Xervice\Core\Business\Model\Factory\FactoryInterface |
||
19 | */ |
||
20 | private $factory; |
||
21 | |||
22 | /** |
||
23 | * @var \Xervice\Core\Business\Model\Facade\FacadeInterface |
||
24 | */ |
||
25 | private $facade; |
||
26 | |||
27 | /** |
||
28 | * @return \Xervice\Core\Business\Model\Factory\FactoryInterface |
||
29 | */ |
||
30 | 4 | public function factory(): FactoryInterface |
|
31 | { |
||
32 | 4 | if ($this->factory === null) { |
|
33 | 2 | $class = $this->getServiceClass('BusinessFactory', self::DIRECTORY) ?: AbstractBusinessFactory::class; |
|
34 | 2 | $this->factory = new $class( |
|
35 | 2 | $this->config(), |
|
36 | 2 | $this->container() |
|
37 | ); |
||
38 | } |
||
39 | |||
40 | 4 | return $this->factory; |
|
41 | } |
||
42 | |||
43 | /** |
||
44 | * @return \Xervice\Core\Business\Model\Facade\FacadeInterface |
||
45 | */ |
||
46 | 3 | public function facade(): FacadeInterface |
|
56 | } |
||
57 | } |