Completed
Push — experimental/3.1 ( 742b88...c83f5d )
by Yangsin
98:33 queued 98:18
created

EntityEventServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 17
rs 10
wmc 1
lcom 0
cbo 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
1
<?php
2
3
4
namespace Eccube\ServiceProvider;
5
6
7
use Eccube\Entity\Event\EntityEventDispatcher;
8
use Pimple\Container;
9
use Pimple\ServiceProviderInterface;
10
11
class EntityEventServiceProvider implements ServiceProviderInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
12
{
13
    /**
0 ignored issues
show
introduced by
Doc comment for parameter "$container" missing
Loading history...
14
     * Registers services on the given container.
15
     *
16
     * This method should only be used to configure services and parameters.
17
     * It should not get services.
18
     *
19
     * @param Container $pimple A container instance
0 ignored issues
show
Bug introduced by
There is no parameter named $pimple. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
introduced by
Doc comment for parameter $pimple does not match actual variable name $container
Loading history...
20
     */
21
    public function register(Container $container)
22
    {
23
        $container['eccube.entity.event.dispatcher'] = function($container) {
0 ignored issues
show
Coding Style introduced by
Expected 1 space after FUNCTION keyword; 0 found
Loading history...
24
            return new EntityEventDispatcher($container['orm.em']);
25
        };
26
    }
27
}