Skip to content

Commit 231fe18

Browse files
committed
Cleaned up some code
1 parent 73c4371 commit 231fe18

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/Magento/FunctionalTestingFramework/DataGenerator/Persist/OperationDataArrayResolver.php

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ public function resolveOperationDataArray($entityObject, $operationMetadata, $op
136136
} else {
137137

138138
$operationElementProperty = null;
139-
if(strpos($operationElementType, '.') !== false){
140-
$operationElementComponents = explode('.',$operationElementType);
139+
if (strpos($operationElementType, '.') !== false) {
140+
$operationElementComponents = explode('.', $operationElementType);
141141
$operationElementType = $operationElementComponents[0];
142142
$operationElementProperty = $operationElementComponents[1];
143143
}
@@ -155,21 +155,22 @@ public function resolveOperationDataArray($entityObject, $operationMetadata, $op
155155
}
156156
foreach ($entityNamesOfType as $entityName) {
157157

158-
if($operationElementProperty === null) {
158+
if ($operationElementProperty === null) {
159159
$operationDataSubArray = $this->resolveNonPrimitiveElement(
160160
$entityName,
161161
$operationElement,
162162
$operation,
163163
$fromArray
164164
);
165-
}else {
165+
} else {
166166
$linkedEntityObj = $this->resolveLinkedEntityObject($entityName);
167-
$operationDataSubArray = $linkedEntityObj->getDataByName($operationElementProperty,0);
167+
$operationDataSubArray = $linkedEntityObj->getDataByName($operationElementProperty, 0);
168168

169-
if($operationDataSubArray === null)
169+
if ($operationDataSubArray === null) {
170170
throw new \Exception(
171171
sprintf('Property %s not found in entity %s \n', $operationElementProperty, $entityName)
172172
);
173+
}
173174
}
174175

175176
if ($operationElement->getType() == OperationDefinitionObjectHandler::ENTITY_OPERATION_ARRAY) {

0 commit comments

Comments
 (0)