@@ -98,7 +98,7 @@ public function analyze($registryBefore, $registryAfter)
98
98
if ($ addedNodes ) {
99
99
$ afterFile = $ registryAfter ->mapping [XmlRegistry::NODES_KEY ][$ moduleName ];
100
100
if (strpos ($ afterFile , '_files ' ) !== false ) {
101
- $ this ->reportAddedNodes ($ afterFile ,$ addedNodes );
101
+ $ this ->reportAddedNodes ($ afterFile , $ addedNodes );
102
102
} else {
103
103
$ baseDir = $ this ->getBaseDir ($ afterFile );
104
104
foreach ($ addedNodes as $ nodeId => $ node ) {
@@ -116,7 +116,13 @@ public function analyze($registryBefore, $registryAfter)
116
116
list ($ sectionId , $ groupId , $ fieldId ) = $ extractedData ;
117
117
118
118
// Call function to check if this field is duplicated in other system.xml files
119
- $ isDuplicated = $ this ->isDuplicatedFieldInXml ($ baseDir , $ sectionId , $ groupId , $ fieldId , $ afterFile );
119
+ $ isDuplicated = $ this ->isDuplicatedFieldInXml (
120
+ $ baseDir ,
121
+ $ sectionId ,
122
+ $ groupId ,
123
+ $ fieldId ,
124
+ $ afterFile
125
+ );
120
126
121
127
foreach ($ isDuplicated as $ isDuplicatedItem ) {
122
128
if ($ isDuplicatedItem ['status ' ] === 'duplicate ' ) {
@@ -162,7 +168,7 @@ private function getSystemXmlFiles($magentoBaseDir, $excludeFile = null)
162
168
{
163
169
$ systemXmlFiles = [];
164
170
$ directoryToSearch = [
165
- $ magentoBaseDir. '/app/code '
171
+ $ magentoBaseDir . '/app/code '
166
172
];
167
173
168
174
// Check if 'vendor' directory exists, and only add it if it does
@@ -363,8 +369,13 @@ private function reportRemovedNodes(string $file, array $nodes)
363
369
* @return array
364
370
* @throws \Exception
365
371
*/
366
- private function isDuplicatedFieldInXml (?string $ baseDir , string $ sectionId , string $ groupId , ?string $ fieldId , string $ afterFile ): array
367
- {
372
+ private function isDuplicatedFieldInXml (
373
+ ?string $ baseDir ,
374
+ string $ sectionId ,
375
+ string $ groupId ,
376
+ ?string $ fieldId ,
377
+ string $ afterFile
378
+ ): array {
368
379
$ hasDuplicate = false ;
369
380
370
381
$ result = [
0 commit comments