| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 8 |
| CRAP Score | 2 |
| Changes | 2 | ||
| Bugs | 0 | Features | 2 |
| 1 | <?php |
||
| 21 | 6 | public function resolveFromContainerBuilder(ContainerBuilder $containerBuilder) : array |
|
| 22 | { |
||
| 23 | 6 | if ($this->resolvedConfiguration) { |
|
|
|
|||
| 24 | 1 | return $this->resolvedConfiguration; |
|
| 25 | } |
||
| 26 | |||
| 27 | 6 | $processor = new Processor(); |
|
| 28 | 6 | $configs = $containerBuilder->getExtensionConfig(SymplifyDefaultAutowireBundle::ALIAS); |
|
| 29 | 6 | $configs = $processor->processConfiguration(new Configuration(), $configs); |
|
| 30 | |||
| 31 | 6 | return $this->resolvedConfiguration = $containerBuilder->getParameterBag() |
|
| 32 | 6 | ->resolveValue($configs); |
|
| 33 | } |
||
| 34 | } |
||
| 35 |
This check marks implicit conversions of arrays to boolean values in a comparison. While in PHP an empty array is considered to be equal (but not identical) to false, this is not always apparent.
Consider making the comparison explicit by using
empty(..)or! empty(...)instead.