|
25 | 25 | use Magento\SemanticVersionChecker\Registry\XmlRegistry;
|
26 | 26 | use PHPSemVerChecker\Registry\Registry;
|
27 | 27 | use PHPSemVerChecker\Report\Report;
|
28 |
| -use Magento\SemanticVersionChecker\Operation\SystemXml\FieldDuplicated; |
| 28 | +use Magento\SemanticVersionChecker\Operation\SystemXml\DuplicateFieldAdded; |
29 | 29 | use RecursiveDirectoryIterator;
|
30 | 30 |
|
31 | 31 | /**
|
@@ -153,7 +153,7 @@ private function getBaseDir($filePath)
|
153 | 153 | * @param string $excludeFile The file to exclude from the search.
|
154 | 154 | * @return array An array of paths to system.xml files, excluding the specified file.
|
155 | 155 | */
|
156 |
| - private function searchSystemXmlFiles($magentoBaseDir, $excludeFile = null) |
| 156 | + private function getSystemXmlFiles($magentoBaseDir, $excludeFile = null) |
157 | 157 | {
|
158 | 158 | $systemXmlFiles = [];
|
159 | 159 | $directoryToSearch = [
|
@@ -305,7 +305,7 @@ private function reportDuplicateNodes(string $file, array $nodes)
|
305 | 305 | foreach ($nodes as $node) {
|
306 | 306 | switch (true) {
|
307 | 307 | case $node instanceof Field:
|
308 |
| - $this->report->add('system', new FieldDuplicated($file, $node->getPath())); |
| 308 | + $this->report->add('system', new DuplicateFieldAdded($file, $node->getPath())); |
309 | 309 | break;
|
310 | 310 | default:
|
311 | 311 | }
|
@@ -363,8 +363,9 @@ private function reportRemovedNodes(string $file, array $nodes)
|
363 | 363 | private function isDuplicatedFieldInXml(?string $baseDir, string $sectionId, string $groupId, ?string $fieldId, string $afterFile): array
|
364 | 364 | {
|
365 | 365 | $hasDuplicate = false;
|
| 366 | + |
366 | 367 | if ($baseDir) {
|
367 |
| - $systemXmlFiles = $this->searchSystemXmlFiles($baseDir, $afterFile); |
| 368 | + $systemXmlFiles = $this->getSystemXmlFiles($baseDir, $afterFile); |
368 | 369 |
|
369 | 370 | $result = [];
|
370 | 371 |
|
|
0 commit comments