WellCommerceOrderBundle   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 8

Importance

Changes 0
Metric Value
wmc 2
lcom 0
cbo 8
dl 0
loc 17
rs 10
c 0
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A build() 0 9 1
A registerBundles() 0 4 1
1
<?php
2
/*
3
 * WellCommerce Open-Source E-Commerce Platform
4
 *
5
 * This file is part of the WellCommerce package.
6
 *
7
 * (c) Adam Piotrowski <[email protected]>
8
 *
9
 * For the full copyright and license information,
10
 * please view the LICENSE file that was distributed with this source code.
11
 */
12
13
namespace WellCommerce\Bundle\OrderBundle;
14
15
use Doctrine\Common\Collections\Collection;
16
use Symfony\Component\DependencyInjection\ContainerBuilder;
17
use WellCommerce\Bundle\CoreBundle\HttpKernel\AbstractWellCommerceBundle;
18
use WellCommerce\Bundle\OrderBundle\DependencyInjection\Compiler;
19
20
/**
21
 * Class WellCommerceOrderBundle
22
 *
23
 * @author  Adam Piotrowski <[email protected]>
24
 */
25
final class WellCommerceOrderBundle extends AbstractWellCommerceBundle
26
{
27
    public function build(ContainerBuilder $container)
28
    {
29
        parent::build($container);
30
        $container->addCompilerPass(new Compiler\RegisterOrderVisitorPass());
31
        $container->addCompilerPass(new Compiler\RegisterOrderModifierPass());
32
        $container->addCompilerPass(new Compiler\RegisterPaymentProcessorPass());
33
        $container->addCompilerPass(new Compiler\RegisterShippingMethodCalculatorPass());
34
        $container->addCompilerPass(new Compiler\RegisterShippingMethodOptionsProviderPass());
35
    }
36
    
37
    public static function registerBundles(Collection $bundles, string $environment)
38
    {
39
        $bundles->add(new self());
40
    }
41
}
42