| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 63 | protected function load(): void |
||
| 64 | { |
||
| 65 | if (!$this->entities) { |
||
|
|
|||
| 66 | return; |
||
| 67 | } |
||
| 68 | |||
| 69 | $entities = $this->entitiesArgumentConverter->convertEntitiesToArrayCollection($this->entities); |
||
| 70 | |||
| 71 | $this->entityLoader->load( |
||
| 72 | $entities, |
||
| 73 | $this->associationTree, |
||
| 74 | $this->entityClassName |
||
| 75 | ); |
||
| 76 | |||
| 77 | $this->entities = []; |
||
| 78 | } |
||
| 80 |
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.