Skip to content

Commit 9c25010

Browse files
committed
AC-3483:: SVC false-positive: modifying system.xml file from another module
1 parent 3945b35 commit 9c25010

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Analyzer/SystemXml/Analyzer.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,9 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
126126
foreach ($addedNodes as $nodeId => $node) {
127127
$this->inspectObject($node);
128128

129+
print_r('Modules node before in reportAddedNodesWithDuplicateCheck method');
130+
print_r($moduleNodesBefore);
131+
129132
// Check for duplicates by comparing node content except for 'id'
130133
foreach ($moduleNodesBefore as $existingNodeId => $existingNode) {
131134
if ($this->isDuplicateNode($node, $existingNode)) {
@@ -134,6 +137,7 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
134137
}
135138
}
136139
}
140+
print_r("Duplicate node values: $isDuplicate");
137141

138142
return $isDuplicate;
139143
}
@@ -164,10 +168,15 @@ private function inspectObject($object)
164168
*/
165169
private function isDuplicateNode($node, $existingNode)
166170
{
171+
print_r('\nis Duplicated node\n');
167172
// Get node data excluding 'id' and 'parent' for comparison
168173
$nodeData = $this->getNodeData($node);
169174
$existingNodeData = $this->getNodeData($existingNode);
170175

176+
echo "\nnddata\n";
177+
print_r($nodeData);
178+
echo "\nexisting node\n";
179+
print_r($existingNodeData);
171180
// Compare the remaining parts of the nodes
172181
return $nodeData == $existingNodeData;
173182
}

0 commit comments

Comments
 (0)