Code Duplication    Length = 5-6 lines in 2 locations

src/POData/ObjectModel/CynicDeserialiser.php 2 locations

@@ 380-385 (lines=6) @@
377
        if (!$hasUrl && $hasPayload) {
378
            $bulkResult = $this->getWrapper()->createBulkResourceforResourceSet($targSet, $data);
379
            assert(is_array($bulkResult));
380
            for ($i = 0; $i < $numEntries; $i++) {
381
                $targEntityInstance = $bulkResult[$i];
382
                $this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName);
383
                $key = $this->generateKeyDescriptor($targType, $targEntityInstance);
384
                $link->expandedResult->entries[$i]->id = $key;
385
            }
386
        }
387
        // update
388
        if ($hasUrl && $hasPayload) {
@@ 390-394 (lines=5) @@
387
        // update
388
        if ($hasUrl && $hasPayload) {
389
            $bulkResult = $this->getWrapper()->updateBulkResource($targSet, $targObj, $keys, $data);
390
            for ($i = 0; $i < $numEntries; $i++) {
391
                $targEntityInstance = $bulkResult[$i];
392
                $this->getWrapper()->hookSingleModel($sourceSet, $source, $targSet, $targEntityInstance, $propName);
393
                $link->expandedResult->entries[$i]->id = $keys[$i];
394
            }
395
        }
396
        assert(isset($bulkResult) && is_array($bulkResult));
397