| Conditions | 3 |
| Paths | 3 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 60 | public function endDiverge(): self |
||
| 61 | { |
||
| 62 | if (!$this->divergeNodes) { |
||
|
|
|||
| 63 | throw new \Exception(); |
||
| 64 | } |
||
| 65 | |||
| 66 | $lastDivergeNode = array_pop($this->divergeNodes); |
||
| 67 | while ($this->nodeBuilder->getNode() !== $lastDivergeNode) { |
||
| 68 | $this->nodeBuilder->end(); |
||
| 69 | } |
||
| 70 | $this->isAllowedToAlterAssociation = false; |
||
| 71 | |||
| 72 | return $this; |
||
| 73 | } |
||
| 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.