Skip to content

Commit 0c8560b

Browse files
committed
- Fix CR notes
1 parent 23edff1 commit 0c8560b

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Handlers/OperationDefinitionObjectHandler.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ private function initialize()
145145
$auth = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_AUTH] ?? null;
146146
$successRegex = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_SUCCESS_REGEX] ?? null;
147147
$returnRegex = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_RETURN_REGEX] ?? null;
148-
$returnIndex = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_RETURN_INDEX] ?? null;
148+
$returnIndex = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_RETURN_INDEX] ?? 0;
149149
$contentType = $opDefArray[OperationDefinitionObjectHandler::ENTITY_OPERATION_CONTENT_TYPE][0]['value']
150150
?? null;
151151
$headers = $this->initializeHeaders($opDefArray);

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/Curl/AdminExecutor.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,7 @@ public function read($successRegex = null, $returnRegex = null, $returnIndex = n
159159
if (!empty($returnRegex)) {
160160
preg_match($returnRegex, $this->response, $returnMatches);
161161
if (!empty($returnMatches)) {
162-
return isset($returnIndex, $returnMatches[$returnIndex])
163-
? $returnMatches[$returnIndex]
164-
: $returnMatches;
162+
return $returnMatches[$returnIndex] ?? $returnMatches[0];
165163
}
166164
}
167165
return $this->response;

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/Curl/FrontendExecutor.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -180,9 +180,7 @@ public function read($successRegex = null, $returnRegex = null, $returnIndex = n
180180
if (!empty($returnRegex)) {
181181
preg_match($returnRegex, $this->response, $returnMatches);
182182
if (!empty($returnMatches)) {
183-
return isset($returnIndex, $returnMatches[$returnIndex])
184-
? $returnMatches[$returnIndex]
185-
: $returnMatches;
183+
return $returnMatches[$returnIndex] ?? $returnMatches[0];
186184
}
187185
}
188186
return $this->response;

0 commit comments

Comments
 (0)