Completed
Push — experimental/3.1 ( 24445a...d4772e )
by Yangsin
271:33 queued 265:16
created

PagenatorServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 9 1
1
<?php
2
3
namespace Eccube\ServiceProvider;
4
5
use Eccube\EventListener\PaginatorListener;
6
use Knp\Component\Pager\Paginator;
7
use Pimple\Container;
8
use Pimple\ServiceProviderInterface;
9
10
class PagenatorServiceProvider implements ServiceProviderInterface
0 ignored issues
show
introduced by
Missing class doc comment
Loading history...
11
{
12
    public function register(Container $app)
0 ignored issues
show
introduced by
Missing function doc comment
Loading history...
13
    {
14
        $app['paginator'] = $app->protect(function () {
15
            $paginator = new Paginator();
16
            $paginator->subscribe(new PaginatorListener());
17
18
            return $paginator;
19
        });
20
    }
21
}
22