File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -121,18 +121,21 @@ public function analyze($registryBefore, $registryAfter)
121
121
private function reportAddedNodesWithDuplicateCheck ($ afterFile , $ addedNodes , $ moduleNodesBefore )
122
122
{
123
123
print_r ('Report Added Nodes function called. ' );
124
+ $ isDuplicate = false ;
125
+
124
126
foreach ($ addedNodes as $ nodeId => $ node ) {
125
127
$ this ->inspectObject ($ node );
128
+
126
129
// Check for duplicates by comparing node content except for 'id'
127
- $ isDuplicate = false ;
128
130
foreach ($ moduleNodesBefore as $ existingNodeId => $ existingNode ) {
129
131
if ($ this ->isDuplicateNode ($ node , $ existingNode )) {
130
132
$ isDuplicate = true ;
131
- break ;
133
+ break 2 ; // Break out of both loops if a duplicate is found
132
134
}
133
135
}
134
- return $ isDuplicate ;
135
136
}
137
+
138
+ return $ isDuplicate ;
136
139
}
137
140
138
141
private function inspectObject ($ object )
You can’t perform that action at this time.
0 commit comments