Passed
Push — master ( 9af39e...49f273 )
by Mike
04:08
created

KernelFacade::run()   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
namespace Xervice\Kernel\Business;
4
5
use Xervice\Core\Business\Model\Facade\AbstractFacade;
6
use Xervice\Kernel\Business\Model\Service\ClearServiceInterface;
0 ignored issues
show
Bug introduced by
The type Xervice\Kernel\Business\...e\ClearServiceInterface 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...
7
8
/**
9
 * @method \Xervice\Kernel\Business\KernelBusinessFactory getFactory()
10
 */
11
class KernelFacade extends AbstractFacade
12
{
13 1
    public function boot(): void
14
    {
15 1
        $this->getFactory()->getServiceProvider()->boot();
16 1
    }
17
18 1
    public function run(): void
19
    {
20 1
        $this->getFactory()->getServiceProvider()->execute();
21 1
    }
22
23
    /**
24
     * @param string $serviceName
25
     *
26
     * @return \Xervice\Kernel\Business\Model\Service\ClearServiceInterface
27
     */
28
    public function getService(string $serviceName): ClearServiceInterface
29
    {
30
        return $this->getFactory()->getServiceProvider()->get($serviceName);
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->getFactory...er()->get($serviceName) returns the type Xervice\Kernel\Business\...arServiceInterface|null which is incompatible with the type-hinted return Xervice\Kernel\Business\...e\ClearServiceInterface.
Loading history...
31
    }
32
}
33