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)
121121 private function reportAddedNodesWithDuplicateCheck ($ afterFile , $ addedNodes , $ moduleNodesBefore )
122122 {
123123 print_r ('Report Added Nodes function called. ' );
124+ $ isDuplicate = false ;
125+
124126 foreach ($ addedNodes as $ nodeId => $ node ) {
125127 $ this ->inspectObject ($ node );
128+
126129 // Check for duplicates by comparing node content except for 'id'
127- $ isDuplicate = false ;
128130 foreach ($ moduleNodesBefore as $ existingNodeId => $ existingNode ) {
129131 if ($ this ->isDuplicateNode ($ node , $ existingNode )) {
130132 $ isDuplicate = true ;
131- break ;
133+ break 2 ; // Break out of both loops if a duplicate is found
132134 }
133135 }
134- return $ isDuplicate ;
135136 }
137+
138+ return $ isDuplicate ;
136139 }
137140
138141 private function inspectObject ($ object )
You can’t perform that action at this time.
0 commit comments