Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 7 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
20 | 9 | public function process(ContainerBuilder $container) |
|
21 | { |
||
22 | 9 | $parameterBag = $container->getParameterBag(); |
|
23 | |||
24 | 9 | foreach ($container->getDefinitions() as $serviceId => $definition) { |
|
25 | 9 | if (!$this->canBeAdded($definition)) { |
|
26 | 2 | continue; |
|
27 | } |
||
28 | |||
29 | 9 | $this->classMap->put($parameterBag->resolveValue($definition->getClass()), $serviceId); |
|
30 | } |
||
31 | 9 | } |
|
32 | |||
47 |
In PHP, under loose comparison (like
==
, or!=
, orswitch
conditions), values of different types might be equal.For
string
values, the empty string''
is a special case, in particular the following results might be unexpected: