@@ -122,6 +122,7 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
122122 {
123123 print_r ('Report Added Nodes function called. ' );
124124 foreach ($ addedNodes as $ nodeId => $ node ) {
125+ $ this ->inspectObject ($ node );
125126 // Check for duplicates by comparing node content except for 'id'
126127 $ isDuplicate = false ;
127128 foreach ($ moduleNodesBefore as $ existingNodeId => $ existingNode ) {
@@ -134,6 +135,23 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
134135 }
135136 }
136137
138+ private function inspectObject ($ object )
139+ {
140+ $ reflection = new \ReflectionClass ($ object );
141+ $ properties = $ reflection ->getProperties ();
142+ $ methods = $ reflection ->getMethods ();
143+
144+ echo "\nProperties: \n" ;
145+ foreach ($ properties as $ property ) {
146+ echo $ property ->getName () . "\n" ;
147+ }
148+
149+ echo "\nMethods: \n" ;
150+ foreach ($ methods as $ method ) {
151+ echo $ method ->getName () . "\n" ;
152+ }
153+ }
154+
137155 /**
138156 * Check if node is duplicate or not
139157 *
@@ -145,7 +163,7 @@ private function isDuplicateNode($node, $existingNode)
145163 {
146164 // Access the 'id' properties using possible getter methods
147165 //Testing file
148-
166+
149167 $ nodeId = $ this ->getPrivateProperty ($ node , 'id ' );
150168 $ existingNodeId = $ this ->getPrivateProperty ($ existingNode , 'id ' );
151169
0 commit comments