|
16 | 16 | use DOMElement;
|
17 | 17 | use Magento\FunctionalTestingFramework\Exceptions\TestFrameworkException;
|
18 | 18 |
|
19 |
| - |
20 | 19 | /**
|
21 | 20 | * Class ActionGroupArgumentsCheck
|
22 | 21 | * @package Magento\FunctionalTestingFramework\StaticCheck
|
@@ -105,12 +104,21 @@ private function findErrorsInFileSet($files)
|
105 | 104 | $contents = $filePath->getContents();
|
106 | 105 | preg_match_all(self::STEP_KEY_REGEX_PATTERN, $contents, $actionGroupReferences);
|
107 | 106 | foreach ($actionGroupReferences[0] as $actionGroupReferencesData) {
|
108 |
| - $actionGroupReferencesDataArray[] = trim(str_replace(['stepKey','='],[""],$actionGroupReferencesData)).'"'; |
| 107 | + $actionGroupReferencesDataArray[] = trim( |
| 108 | + str_replace(['stepKey', '='], [""], $actionGroupReferencesData) |
| 109 | + ).'"'; |
109 | 110 | }
|
110 |
| - $duplicateStepKeys = array_unique( array_diff_assoc( $actionGroupReferencesDataArray, array_unique( $actionGroupReferencesDataArray ) ) ); |
111 |
| - unset( $actionGroupReferencesDataArray); |
| 111 | + $duplicateStepKeys = array_unique( |
| 112 | + array_diff_assoc( |
| 113 | + $actionGroupReferencesDataArray, |
| 114 | + array_unique( |
| 115 | + $actionGroupReferencesDataArray |
| 116 | + ) |
| 117 | + ) |
| 118 | + ); |
| 119 | + unset($actionGroupReferencesDataArray); |
112 | 120 | if (isset($duplicateStepKeys) && count($duplicateStepKeys) > 0) {
|
113 |
| - throw new TestFrameworkException('Action group has duplicate step keys'); |
| 121 | + throw new TestFrameworkException('Action group has duplicate step keys'); |
114 | 122 | }
|
115 | 123 | /** @var DOMElement $actionGroup */
|
116 | 124 | $actionGroup = $this->getActionGroupDomElement($contents);
|
|
0 commit comments