Conditions | 4 |
Paths | 3 |
Total Lines | 8 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
41 | private static function haveParameterConflicts(MappingInterface $subject, MappingInterface $opponent): bool |
||
42 | { |
||
43 | foreach ($subject->getParameters() as $parameter => $value) { |
||
44 | if ($opponent->hasParameter($parameter) && $opponent->getParameter($parameter) != $value) { |
||
45 | return true; |
||
46 | } |
||
47 | } |
||
48 | return false; |
||
49 | } |
||
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: