Completed
Push — experimental/3.1 ( 777914...cb54a4 )
by chihiro
27s
created

EntityEventServiceProvider   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 15
rs 10
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A register() 0 6 1
A boot() 0 5 1
1
<?php
2
3
namespace Plugin\EntityEvent\ServiceProvider;
4
5
use Pimple\Container;
6
use Pimple\ServiceProviderInterface;
7
use Plugin\EntityEvent\Entity\BaseInfoListener;
8
use Silex\Api\BootableProviderInterface;
9
use Silex\Application;
10
11
class EntityEventServiceProvider implements ServiceProviderInterface, BootableProviderInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
12
{
13
    public function register(Container $app)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
14
    {
15
        $app['plugin.entity_event.base_info_listener'] = function (Container $container) {
0 ignored issues
show
Unused Code introduced by
The parameter $container is not used and could be removed.

This check looks from parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
16
            return new BaseInfoListener();
17
        };
18
    }
19
20
    public function boot(Application $app)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
21
    {
22
        $app['eccube.entity.event.dispatcher']
23
            ->addEventListener($app['plugin.entity_event.base_info_listener']);
24
    }
25
}
26