Failed Conditions
Pull Request — experimental/sf (#3236)
by Kentaro
121:51 queued 107:46
created

PurchaseProcessorsServiceProvider   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 1
lcom 0
cbo 2
1
<?php
2
3
/*
4
 * This file is part of EC-CUBE
5
 *
6
 * Copyright(c) LOCKON CO.,LTD. All Rights Reserved.
7
 *
8
 * http://www.lockon.co.jp/
9
 *
10
 * For the full copyright and license information, please view the LICENSE
11
 * file that was distributed with this source code.
12
 */
13
14
namespace Plugin\PurchaseProcessors\ServiceProvider;
15
16
use Doctrine\Common\Collections\ArrayCollection;
17
use Pimple\Container;
18
use Pimple\ServiceProviderInterface;
19
use Plugin\PurchaseProcessors\Processor\EmptyProcessor;
20
use Plugin\PurchaseProcessors\Processor\ValidatableEmptyProcessor;
21
22
class PurchaseProcessorsServiceProvider implements ServiceProviderInterface
23
{
24
    public function register(Container $app)
25
    {
26
        $app->extend(
27
            'eccube.purchase.flow.cart.item_processors',
28
            function (ArrayCollection $processors, Container $app) {
29
                $processors[] = new EmptyProcessor();
30
                $processors[] = new ValidatableEmptyProcessor();
31
32
                return $processors;
33
            }
34
        );
35
    }
36
}
37