| Conditions | 3 |
| Paths | 3 |
| Total Lines | 14 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 3 |
| Changes | 0 | ||
| 1 | <?php |
||
| 32 | 2 | public function process(ContainerBuilder $containerBuilder) |
|
| 33 | { |
||
| 34 | 2 | $parameterBag = $containerBuilder->getParameterBag(); |
|
| 35 | 2 | foreach ($containerBuilder->getDefinitions() as $serviceId => $definition) { |
|
| 36 | 2 | if (! $this->isValidServiceDefinition($definition)) { |
|
| 37 | 2 | continue; |
|
| 38 | } |
||
| 39 | |||
| 40 | 2 | $this->serviceMap->addService( |
|
| 41 | 2 | $parameterBag->resolveValue($definition->getClass()), |
|
| 42 | $serviceId |
||
| 43 | ); |
||
| 44 | } |
||
| 45 | 2 | } |
|
| 46 | |||
| 64 |
In PHP, under loose comparison (like
==, or!=, orswitchconditions), values of different types might be equal.For
stringvalues, the empty string''is a special case, in particular the following results might be unexpected: