ArrayHandlerBusinessFactory::createArrayHandler()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Xervice\ArrayHandler\Business;
5
6
7
use Xervice\ArrayHandler\Business\Model\ArrayHandler;
8
use Xervice\ArrayHandler\Business\Model\ArrayHandlerInterface;
9
use Xervice\ArrayHandler\Business\Model\ArrayLocator\ArrayLocator;
0 ignored issues
show
Bug introduced by
The type Xervice\ArrayHandler\Bus...rayLocator\ArrayLocator 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...
10
use Xervice\ArrayHandler\Business\Model\ArrayLocator\ArrayLocatorInterface;
0 ignored issues
show
Bug introduced by
The type Xervice\ArrayHandler\Bus...r\ArrayLocatorInterface 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...
11
use Xervice\ArrayHandler\Dependency\FieldHandlerPluginInterface;
12
use Xervice\Core\Business\Model\Factory\AbstractBusinessFactory;
13
14
/**
15
 * @method \Xervice\ArrayHandler\ArrayHandlerConfig getConfig()
16
 */
17
class ArrayHandlerBusinessFactory extends AbstractBusinessFactory
18
{
19
    /**
20
     * @param \Xervice\ArrayHandler\Dependency\FieldHandlerPluginInterface $handlerPlugin
21
     *
22
     * @return \Xervice\ArrayHandler\Business\Model\ArrayHandlerInterface
23
     */
24 3
    public function createArrayHandler(FieldHandlerPluginInterface $handlerPlugin): ArrayHandlerInterface
25
    {
26 3
        return new ArrayHandler(
27 3
            $handlerPlugin
28
        );
29
    }
30
}