Completed
Push — master ( c8e320...41a25f )
by Mike
03:33
created

LocatorProxy   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 3
eloc 9
dl 0
loc 29
c 0
b 0
f 0
ccs 9
cts 9
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A facade() 0 3 1
A businessLocator() 0 11 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\Core\Business\Model\Locator\Proxy;
5
6
7
use Xervice\Core\Business\Model\Facade\FacadeInterface;
8
use Xervice\Core\Business\Model\Locator\BusinessLocator;
0 ignored issues
show
Bug introduced by
The type Xervice\Core\Business\Mo...Locator\BusinessLocator was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
9
use Xervice\Core\Business\Model\Locator\Proxy\Business\BusinessLocatorProxy;
10
11
class LocatorProxy extends AbstractLocatorProxy
12
{
13
    /**
14
     * @var \Xervice\Core\Business\Model\Locator\Proxy\Business\BusinessLocatorProxy
15
     */
16
    protected $businessLocator;
17
18
    /**
19
     * @return \Xervice\Core\Business\Model\Facade\FacadeInterface
20
     */
21 2
    public function facade(): FacadeInterface
22
    {
23 2
        return $this->businessLocator()->facade();
24
    }
25
26
    /**
27
     * @return \Xervice\Core\Business\Model\Locator\Proxy\Business\BusinessLocatorProxy
28
     */
29 5
    public function businessLocator(): BusinessLocatorProxy
30
    {
31 5
        if ($this->businessLocator === null) {
32 2
            $this->businessLocator = new BusinessLocatorProxy(
33 2
                $this->coreNamespaces,
34 2
                $this->projectNamespaces,
35 2
                $this->name()
36
            );
37
        }
38
39 5
        return $this->businessLocator;
40
    }
41
}