Failed Conditions
Push — experimental/3.1 ( 965511...751c7a )
by chihiro
21s
created

PurchaseProcessorsServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A register() 0 11 1
1
<?php
2
3
namespace Plugin\PurchaseProcessors\ServiceProvider;
4
5
use Doctrine\Common\Collections\ArrayCollection;
6
use Pimple\Container;
7
use Pimple\ServiceProviderInterface;
8
use Plugin\PurchaseProcessors\Processor\EmptyProcessor;
9
use Plugin\PurchaseProcessors\Processor\ValidatableEmptyProcessor;
10
11
class PurchaseProcessorsServiceProvider implements ServiceProviderInterface
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->extend(
16
            'eccube.purchase.flow.cart.item_processors',
17
            function (ArrayCollection $processors, 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...
18
                $processors[] = new EmptyProcessor();
19
                $processors[] = new ValidatableEmptyProcessor();
20
                return $processors;
0 ignored issues
show
introduced by
Missing blank line before return statement
Loading history...
21
            }
22
        );
23
    }
24
}
25