PHSubscriptionBundle   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 3

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getSupportedDrivers() 0 6 1
A build() 0 5 1
A getModelNamespace() 0 4 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace PH\Bundle\SubscriptionBundle;
6
7
use PH\Bundle\SubscriptionBundle\DependencyInjection\Compiler\RegisterDateTimeHelperCompilerPass;
8
use Sylius\Bundle\ResourceBundle\AbstractResourceBundle;
9
use Sylius\Bundle\ResourceBundle\SyliusResourceBundle;
10
use Symfony\Component\DependencyInjection\ContainerBuilder;
11
12
final class PHSubscriptionBundle extends AbstractResourceBundle
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getSupportedDrivers(): array
18
    {
19
        return [
20
            SyliusResourceBundle::DRIVER_DOCTRINE_ORM,
21
        ];
22
    }
23
24
    public function build(ContainerBuilder $container): void
25
    {
26
        parent::build($container);
27
        $container->addCompilerPass(new RegisterDateTimeHelperCompilerPass());
28
    }
29
30
    /**
31
     * {@inheritdoc}
32
     */
33
    protected function getModelNamespace(): ?string
34
    {
35
        return 'PH\Component\Subscription\Model';
36
    }
37
}
38