@@ -144,7 +144,7 @@ public function analyze($registryBefore, $registryAfter)
144
144
* @param string $filePath
145
145
* @return string|null
146
146
*/
147
- private function getBaseDir ($ filePath )
147
+ private function getBaseDir ($ filePath ): ? string
148
148
{
149
149
$ currentDir = dirname ($ filePath );
150
150
while ($ currentDir !== '/ ' && $ currentDir !== false ) {
@@ -164,7 +164,7 @@ private function getBaseDir($filePath)
164
164
* @param string $excludeFile The file to exclude from the search.
165
165
* @return array An array of paths to system.xml files, excluding the specified file.
166
166
*/
167
- private function getSystemXmlFiles ($ magentoBaseDir , $ excludeFile = null )
167
+ private function getSystemXmlFiles ($ magentoBaseDir , $ excludeFile = null ): array
168
168
{
169
169
$ systemXmlFiles = [];
170
170
$ directoryToSearch = [
@@ -195,7 +195,7 @@ private function getSystemXmlFiles($magentoBaseDir, $excludeFile = null)
195
195
* @param $nodePath
196
196
* @return array|null
197
197
*/
198
- private function extractSectionGroupField ($ nodePath )
198
+ private function extractSectionGroupField ($ nodePath ): ? array
199
199
{
200
200
$ parts = explode ('/ ' , $ nodePath );
201
201
@@ -218,7 +218,7 @@ private function extractSectionGroupField($nodePath)
218
218
* @return array
219
219
* @throws \ReflectionException
220
220
*/
221
- private function getNodeData ($ node )
221
+ private function getNodeData ($ node ): array
222
222
{
223
223
$ data = [];
224
224
@@ -309,8 +309,9 @@ private function reportAddedNodes(string $file, array $nodes)
309
309
*
310
310
* @param string $file
311
311
* @param NodeInterface[] $nodes
312
+ * @return void
312
313
*/
313
- private function reportDuplicateNodes (string $ file , array $ nodes )
314
+ private function reportDuplicateNodes (string $ file , array $ nodes ): void
314
315
{
315
316
foreach ($ nodes as $ node ) {
316
317
switch (true ) {
@@ -326,8 +327,9 @@ private function reportDuplicateNodes(string $file, array $nodes)
326
327
*
327
328
* @param array $modules
328
329
* @param XmlRegistry $registryBefore
330
+ * @return void
329
331
*/
330
- private function reportRemovedFiles (array $ modules , XmlRegistry $ registryBefore )
332
+ private function reportRemovedFiles (array $ modules , XmlRegistry $ registryBefore ): void
331
333
{
332
334
foreach ($ modules as $ module ) {
333
335
$ beforeFile = $ registryBefore ->mapping [XmlRegistry::NODES_KEY ][$ module ];
@@ -340,8 +342,9 @@ private function reportRemovedFiles(array $modules, XmlRegistry $registryBefore)
340
342
*
341
343
* @param string $file
342
344
* @param NodeInterface[] $nodes
345
+ * @return void
343
346
*/
344
- private function reportRemovedNodes (string $ file , array $ nodes )
347
+ private function reportRemovedNodes (string $ file , array $ nodes ): void
345
348
{
346
349
foreach ($ nodes as $ node ) {
347
350
switch (true ) {
@@ -360,15 +363,14 @@ private function reportRemovedNodes(string $file, array $nodes)
360
363
}
361
364
}
362
365
363
- /**
364
- * @param string|null $baseDir
365
- * @param string $sectionId
366
- * @param string $groupId
367
- * @param string $fieldId
368
- * @param string $afterFile
369
- * @return array
370
- * @throws \Exception
371
- */
366
+ /**
367
+ * @param string|null $baseDir
368
+ * @param string $sectionId
369
+ * @param string $groupId
370
+ * @param string|null $fieldId
371
+ * @param string $afterFile
372
+ * @return array
373
+ */
372
374
private function isDuplicatedFieldInXml (
373
375
?string $ baseDir ,
374
376
string $ sectionId ,
@@ -406,7 +408,6 @@ private function isDuplicatedFieldInXml(
406
408
[
407
409
'status ' => 'duplicate ' ,
408
410
'field ' => $ fieldId
409
-
410
411
]
411
412
];
412
413
}
0 commit comments