EventRabbitMqDependencyProvider   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Test Coverage

Coverage 50%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 8
c 1
b 0
f 0
dl 0
loc 17
ccs 2
cts 4
cp 0.5
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A handleDependencies() 0 11 1
1
<?php
2
3
4
namespace Xervice\EventRabbitMq;
5
6
7
use Xervice\Core\Business\Model\Dependency\DependencyContainerInterface;
8
use Xervice\Core\Business\Model\Dependency\Provider\AbstractDependencyProvider;
9
10
class EventRabbitMqDependencyProvider extends AbstractDependencyProvider
11
{
12
    public const RABBITMQ_FACADE = 'rabbitmq.facade';
13
14
    public const EVENT_FACADE = 'event.facade';
15
16 1
    public function handleDependencies(DependencyContainerInterface $container): DependencyContainerInterface
17
    {
18
        $container[self::RABBITMQ_FACADE] = function (DependencyContainerInterface $container) {
19
            return $container->getLocator()->rabbitMQ()->facade();
0 ignored issues
show
Bug introduced by
The method facade() does not exist on Xervice\Core\Business\Mo...y\LocatorProxyInterface. It seems like you code against a sub-type of said class. However, the method does not exist in Xervice\Core\Business\Mo...xy\AbstractLocatorProxy or Xervice\Core\Business\Mo...PersistenceLocatorProxy. Are you sure you never get one of those? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

19
            return $container->getLocator()->rabbitMQ()->/** @scrutinizer ignore-call */ facade();
Loading history...
20
        };
21
22
        $container[self::EVENT_FACADE] = function (DependencyContainerInterface $container) {
23
            return $container->getLocator()->event()->facade();
24
        };
25
26 1
        return $container;
27
    }
28
}