Skip to content

Commit 20d228d

Browse files
committed
MQE-2045: Upgrade script to remove unused arguments
Fixed static checks
1 parent 295bae7 commit 20d228d

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

src/Magento/FunctionalTestingFramework/StaticCheck/ActionGroupArgumentsCheck.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ private function isParentActionGroupArgument($argument, $actionGroup)
211211
/**
212212
* Builds and returns error output for violating references
213213
*
214-
* @param array $actionGroupToArguments
214+
* @param array $actionGroupToArguments
215215
* @param SplFileInfo $path
216216
* @return mixed
217217
*/

src/Magento/FunctionalTestingFramework/Upgrade/RemoveUnusedArguments.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,14 @@ public function execute(InputInterface $input, OutputInterface $output)
5151
//Remove <arguments> block if all arguments are unused
5252
if (!empty(array_diff($allArguments, $unusedArguments))) {
5353
$contents = preg_replace(self::ARGUMENTS_BLOCK_REGEX_PATTERN, '', $contents);
54-
}
55-
else {
54+
} else {
5655
foreach ($unusedArguments as $argument) {
5756
$contents = preg_replace("/\s*<argument.*".$argument.".*\/>/", '', $contents);
5857
}
5958
}
6059
$fileSystem->dumpFile($file->getRealPath(), $contents);
6160
$actionGroupsUpdated++;
6261
}
63-
return "Finished removing unused action group arguments from " . $actionGroupsUpdated . " files.";
62+
return "Removed unused action group arguments from " . $actionGroupsUpdated . " files.";
6463
}
65-
}
64+
}

0 commit comments

Comments
 (0)