| Conditions | 4 |
| Paths | 3 |
| Total Lines | 8 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 51 | private static function havePropertyConflicts(MappingInterface $subject, MappingInterface $opponent): bool |
||
| 52 | { |
||
| 53 | foreach ($subject->getProperties() as $name => $property) { |
||
| 54 | if ($opponent->hasProperty($name) && static::haveConflicts($property, $opponent->getProperty($name))) { |
||
| 55 | return true; |
||
| 56 | } |
||
| 57 | } |
||
| 58 | return false; |
||
| 59 | } |
||
| 61 |
If the size of the collection does not change during the iteration, it is generally a good practice to compute it beforehand, and not on each iteration: