Completed
Pull Request — experimental/3.1 (#2566)
by chihiro
205:03 queued 181:20
created

ForwardOnlyServiceProvider::subscribe()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 2
c 1
b 1
f 0
nc 1
nop 2
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Eccube\ServiceProvider;
4
5
6
use Eccube\EventListener\ForwardOnlyListener;
7
use Pimple\Container;
8
use Pimple\ServiceProviderInterface;
9
use Silex\Api\EventListenerProviderInterface;
10
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
11
12
class ForwardOnlyServiceProvider implements EventListenerProviderInterface, ServiceProviderInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
13
{
14
    public function register(Container $app)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
15
    {
16
        $app['eccube.listener.forward_only'] = function (Container $app) {
0 ignored issues
show
Unused Code introduced by
The parameter $app 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...
17
            return new ForwardOnlyListener();
18
        };
19
    }
20
21
    public function subscribe(Container $app, EventDispatcherInterface $dispatcher)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
22
    {
23
        $dispatcher->addSubscriber($app['eccube.listener.forward_only']);
24
    }
25
}