Failed Conditions
Pull Request — master (#25)
by Yo
05:43 queued 02:51
created

AbstractExtension::createService()   B

Complexity

Conditions 5
Paths 12

Size

Total Lines 28
Code Lines 18

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 14
CRAP Score 5

Importance

Changes 0
Metric Value
dl 0
loc 28
ccs 14
cts 14
cp 1
rs 8.439
c 0
b 0
f 0
cc 5
eloc 18
nc 12
nop 7
crap 5
1
<?php
2
namespace Yoanm\Behat3SymfonyExtension\ServiceContainer;
3
4
use Behat\Testwork\ServiceContainer\Extension;
5
use Symfony\Component\DependencyInjection\ContainerBuilder;
6
use Symfony\Component\DependencyInjection\Definition;
7
8
abstract class AbstractExtension implements Extension
9
{
10
    const BASE_CONTAINER_ID = 'behat3_symfony_extension';
11
    const KERNEL_SERVICE_ID = 'behat3_symfony_extension.kernel';
12
    const TEST_CLIENT_SERVICE_ID = 'behat3_symfony_extension.test.client';
13
14
    /**
15
     * @param string $key
16
     *
17
     * @return string
18
     */
19
    protected function buildContainerId($key)
20
    {
21
        return sprintf(
22
            '%s.%s',
23
            self::BASE_CONTAINER_ID,
24
            $key
25
        );
26
    }
27
}
28