Code Duplication    Length = 12-14 lines in 2 locations

src/Query/LaravelQuery.php 2 locations

@@ 318-331 (lines=14) @@
315
     *
316
     * @return object|null the new resource value if it is assignable or throw exception for null
317
     */
318
    public function updateResource(
319
        ResourceSet $sourceResourceSet,
320
        $sourceEntityInstance,
321
        KeyDescriptor $keyDescriptor,
322
        $data,
323
        $shouldUpdate = false
324
    ) {
325
        $source = $this->unpackSourceEntity($sourceEntityInstance);
326
327
        $verb = 'update';
328
        $result = $this->createUpdateCoreWrapper($sourceResourceSet, $data, $verb, $source);
329
        LaravelQuery::queueModel($result);
330
        return $result;
331
    }
332
    /**
333
     * Delete resource from a resource set.
334
     *
@@ 372-383 (lines=12) @@
369
     * @returns object|null                     returns the newly created model if successful,
370
     *                                          or null if model creation failed.
371
     */
372
    public function createResourceforResourceSet(
373
        ResourceSet $resourceSet,
374
        $sourceEntityInstance,
375
        $data
376
    ) {
377
        $source = $this->unpackSourceEntity($sourceEntityInstance);
378
379
        $verb = 'create';
380
        $result = $this->createUpdateCoreWrapper($resourceSet, $data, $verb, $source);
381
        LaravelQuery::queueModel($result);
382
        return $result;
383
    }
384
385
    /**
386
     * @param $sourceEntityInstance