buildChainServiceName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 9.6666
c 0
b 0
f 0
cc 1
eloc 6
nc 1
nop 2
crap 1
1
<?php
2
3
namespace KGzocha\Bundle\SearcherBundle\DependencyInjection\CompilerPass;
4
5
/**
6
 * @author Krzysztof Gzocha <[email protected]>
7
 */
8
abstract class AbstractChainsCompilerPass extends AbstractContextCompilerPass
9
{
10
    /**
11
     * @inheritDoc
12
     */
13 6
    protected function getParamToBeProcessed()
14
    {
15 6
        return 'chains';
16
    }
17
18
    /**
19
     * @param string $contextId
20
     * @param string $name
21
     *
22
     * @return string
23
     */
24 5
    protected function buildChainServiceName($contextId, $name)
25
    {
26 5
        return sprintf(
27 5
            '%s.chains.%s.%s',
28 5
            $this->servicePrefix,
29
            $contextId,
30
            $name
31
        );
32
    }
33
}
34