@@ -122,6 +122,7 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
122
122
{
123
123
print_r ('Report Added Nodes function called. ' );
124
124
foreach ($ addedNodes as $ nodeId => $ node ) {
125
+ $ this ->inspectObject ($ node );
125
126
// Check for duplicates by comparing node content except for 'id'
126
127
$ isDuplicate = false ;
127
128
foreach ($ moduleNodesBefore as $ existingNodeId => $ existingNode ) {
@@ -134,6 +135,23 @@ private function reportAddedNodesWithDuplicateCheck($afterFile, $addedNodes, $mo
134
135
}
135
136
}
136
137
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
+
137
155
/**
138
156
* Check if node is duplicate or not
139
157
*
@@ -145,7 +163,7 @@ private function isDuplicateNode($node, $existingNode)
145
163
{
146
164
// Access the 'id' properties using possible getter methods
147
165
//Testing file
148
-
166
+
149
167
$ nodeId = $ this ->getPrivateProperty ($ node , 'id ' );
150
168
$ existingNodeId = $ this ->getPrivateProperty ($ existingNode , 'id ' );
151
169
0 commit comments