DefaultEventProvider   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 4
dl 0
loc 23
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A provideEvent() 0 3 1
A __construct() 0 3 1
1
<?php
2
3
4
namespace Xervice\Event\Business\Model\Provider;
5
6
7
use DataProvider\EventDataProvider;
0 ignored issues
show
Bug introduced by
The type DataProvider\EventDataProvider 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...
8
9
class DefaultEventProvider implements EventProviderInterface
10
{
11
    /**
12
     * @var \Xervice\Event\Business\Model\Listener\ListenerProviderInterface
13
     */
14
    private $listenerProvider;
15
16
    /**
17
     * DefaultEventProvider constructor.
18
     *
19
     * @param \Xervice\Event\Business\Model\Listener\ListenerProviderInterface $listenerProvider
20
     */
21 1
    public function __construct(\Xervice\Event\Business\Model\Listener\ListenerProviderInterface $listenerProvider)
22
    {
23 1
        $this->listenerProvider = $listenerProvider;
24 1
    }
25
26
    /**
27
     * @param \DataProvider\EventDataProvider $eventDataProvider
28
     */
29 1
    public function provideEvent(EventDataProvider $eventDataProvider): void
30
    {
31 1
        $this->listenerProvider->provideListener($eventDataProvider);
32
    }
33
}