Completed
Pull Request — master (#35)
by Krzysztof
04:21
created

buildChainServiceName()   A

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 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 9
ccs 4
cts 4
cp 1
rs 9.6666
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 3
    protected function getParamToBeProcessed()
14
    {
15 3
        return 'chains';
16
    }
17
18
    /**
19
     * @param string $contextId
20
     * @param string $name
21
     *
22
     * @return string
23
     */
24 2
    protected function buildChainServiceName($contextId, $name)
25
    {
26 2
        return sprintf(
27 2
            '%s.chains.%s.%s',
28 2
            $this->servicePrefix,
29
            $contextId,
30
            $name
31
        );
32
    }
33
}
34