Skip to content

Commit 0187d4b

Browse files
authored
Update TestGenerator.php
1 parent eb56958 commit 0187d4b

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

src/Magento/FunctionalTestingFramework/Util/TestGenerator.php

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,7 @@ public function throwExceptionIfDuplicateArgumentsFound(string $fileContents, Te
259259
{
260260
$parsedSteps = $testObject->getUnresolvedSteps();
261261
foreach ($parsedSteps as $parsedStep) {
262-
if(
263-
$parsedStep->getType() !== 'actionGroup' &&
264-
$parsedStep->getType() !== 'helper'
265-
) {
262+
if ($parsedStep->getType() !== 'actionGroup' && $parsedStep->getType() !== 'helper') {
266263
continue;
267264
}
268265
$attributesActions = $parsedStep->getCustomActionAttributes();
@@ -277,18 +274,15 @@ public function throwExceptionIfDuplicateArgumentsFound(string $fileContents, Te
277274
$argumentArray = [];
278275
foreach ($fileToArr as $fileVal) {
279276
$fileVal = trim($fileVal);
280-
if (
281-
(str_contains($fileVal, '<actionGroup') || str_contains($fileVal, '<helper')) &&
282-
str_contains($fileVal, $stepKey)
283-
) {
277+
if ((str_contains($fileVal, '<actionGroup') || str_contains($fileVal, '<helper')) && str_contains($fileVal, $stepKey)) {
284278
$actionGroupStart = true;
285279
continue;
286280
}
287281
if (str_contains($fileVal, '</actionGroup') || str_contains($fileVal, '</helper')) {
288282
foreach ($arguments as $argumentName => $argumentValue) {
289283
$argumentCounter = 0;
290284
foreach ($argumentArray as $rawArgument) {
291-
if (str_contains($rawArgument, '<argument') && str_contains($rawArgument, $argumentName)){
285+
if (str_contains($rawArgument, '<argument') && str_contains($rawArgument, $argumentName)) {
292286
$argumentCounter++;
293287
}
294288
if ($argumentCounter > 1) {

0 commit comments

Comments
 (0)