Extension   A
last analyzed

Complexity

Total Complexity 5

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 0
Metric Value
wmc 5
lcom 0
cbo 2
dl 0
loc 41
rs 10
c 0
b 0
f 0

5 Methods

Rating   Name   Duplication   Size   Complexity  
A getConfigKey() 0 4 1
A load() 0 6 1
A initialize() 0 3 1
A process() 0 3 1
A configure() 0 3 1
1
<?php
2
3
namespace Novaway\CommonContexts;
4
5
use Behat\Behat\Context\ServiceContainer\ContextExtension;
6
use Behat\Testwork\ServiceContainer\Extension as ExtensionInterface;
7
use Behat\Testwork\ServiceContainer\ExtensionManager;
8
use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition;
9
use Symfony\Component\DependencyInjection\ContainerBuilder;
10
use Symfony\Component\DependencyInjection\Definition;
11
12
class Extension implements ExtensionInterface
13
{
14
    /**
15
     * {@inheritdoc}
16
     */
17
    public function getConfigKey()
18
    {
19
        return 'nwcontext';
20
    }
21
22
    /**
23
     * {@inheritdoc}
24
     */
25
    public function load(ContainerBuilder $container, array $config)
26
    {
27
        $definition = new Definition('Novaway\CommonContexts\Context\ContextClass\ClassResolver');
28
        $definition->addTag(ContextExtension::CLASS_RESOLVER_TAG);
29
        $container->setDefinition('nw_common_contexts.class_resolver', $definition);
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function initialize(ExtensionManager $extensionManager)
36
    {
37
    }
38
39
    /**
40
     * {@inheritdoc}
41
     */
42
    public function process(ContainerBuilder $container)
43
    {
44
    }
45
46
    /**
47
     * {@inheritdoc}
48
     */
49
    public function configure(ArrayNodeDefinition $builder)
50
    {
51
    }
52
}
53