MockPlugin::getApiResourceFactory()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 12
Code Lines 8

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 8
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 12
rs 10
1
<?php
2
3
namespace Apie\MockPlugin;
4
5
use Apie\Core\Interfaces\ApiResourceFactoryInterface;
6
use Apie\Core\PluginInterfaces\ApieAwareInterface;
7
use Apie\Core\PluginInterfaces\ApieAwareTrait;
8
use Apie\Core\PluginInterfaces\ApiResourceFactoryProviderInterface;
9
10
final class MockPlugin implements ApiResourceFactoryProviderInterface, ApieAwareInterface
11
{
12
    use ApieAwareTrait;
13
14
    private $ignoreList = [];
15
16
    public function __construct(array $ignoreList = [])
17
    {
18
        $this->ignoreList = $ignoreList;
19
    }
20
21
    public function getApiResourceFactory(array $next = []): ApiResourceFactoryInterface
22
    {
23
        $apie = $this->getApie();
24
25
        return new MockApiResourceFactory(
0 ignored issues
show
Bug introduced by
The type Apie\MockPlugin\MockApiResourceFactory 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...
26
            new MockApiResourceDataLayer(
0 ignored issues
show
Bug introduced by
The type Apie\MockPlugin\MockApiResourceDataLayer 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...
27
                $this->getApie()->getCacheItemPool(),
28
                $this->getApie()->getIdentifierExtractor(),
29
                $this->getApie()->getObjectAccess()
30
            ),
31
            $apie,
32
            $this->ignoreList
33
        );
34
    }
35
}
36