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

AbstractChainsCompilerPass   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
c 1
b 0
f 0
lcom 1
cbo 1
dl 0
loc 26
ccs 6
cts 6
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getParamToBeProcessed() 0 4 1
A buildChainServiceName() 0 9 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