Skip to content

Commit 98e1075

Browse files
author
Sergey Nezbritskiy
committed
add description for newely created methods, fix issues catched by codesniffer
1 parent 9ba5d05 commit 98e1075

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,8 @@ private function initialize()
222222
}
223223

224224
/**
225+
* Convert headers metadata into an array of objects for further use in.
226+
*
225227
* @param array $opDefArray
226228
* @return array
227229
*/
@@ -242,6 +244,8 @@ private function initializeHeaders(array $opDefArray): array
242244
}
243245

244246
/**
247+
* Convert params metadata into an array of objects.
248+
*
245249
* @param array $opDefArray
246250
* @return array
247251
*/

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

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,21 @@ public function resolveOperationDataArray($entityObject, $operationMetadata, $op
103103
$operationElementType = $operationElement->getValue();
104104

105105
if (in_array($operationElementType, self::PRIMITIVE_TYPES)) {
106-
$this->resolvePrimitiveReferenceElement($entityObject, $operationElement, $operationElementType, $operationDataArray);
106+
$this->resolvePrimitiveReferenceElement(
107+
$entityObject,
108+
$operationElement,
109+
$operationElementType,
110+
$operationDataArray
111+
);
107112
} else {
108-
$this->resolveNonPrimitiveReferenceElement($entityObject, $operation, $fromArray, $operationElementType, $operationElement, $operationDataArray);
113+
$this->resolveNonPrimitiveReferenceElement(
114+
$entityObject,
115+
$operation,
116+
$fromArray,
117+
$operationElementType,
118+
$operationElement,
119+
$operationDataArray
120+
);
109121
}
110122
}
111123

@@ -323,6 +335,8 @@ private function castValue($type, $value)
323335
}
324336

325337
/**
338+
* Resolve a reference for a primitive piece of data
339+
*
326340
* @param EntityDataObject $entityObject
327341
* @param $operationElement
328342
* @param $operationElementType
@@ -364,6 +378,8 @@ private function resolvePrimitiveReferenceElement($entityObject, $operationEleme
364378
}
365379

366380
/**
381+
* Resolves DataObjects referenced by the operation
382+
*
367383
* @param $entityObject
368384
* @param $operation
369385
* @param $fromArray

0 commit comments

Comments
 (0)