Code Duplication    Length = 16-16 lines in 2 locations

src/WSClient.php 2 locations

@@ 422-437 (lines=16) @@
419
     * @param  string $entityID The ID of the entity to retrieve
420
     * @return boolean  Entity data
421
     */
422
    public function entityRetrieveByID($moduleName, $entityID)
423
    {
424
        // Perform re-login if required.
425
        $this->checkLogin();
426
427
        // Preprend so-called moduleid if needed
428
        $entityID = $this->getTypedID($moduleName, $entityID);
429
430
        $getdata = [
431
            'operation' => 'retrieve',
432
            'sessionName' => $this->sessionName,
433
            'id' => $entityID
434
        ];
435
436
        return $this->sendHttpRequest($getdata, 'GET');
437
    }
438
439
    /**
440
     * Uses VTiger queries to retrieve the entity matching a list of constraints
@@ 576-591 (lines=16) @@
573
     * @param  string $entityID The ID of the entity to delete
574
     * @return array  Removal status object
575
     */
576
    public function entityDelete($moduleName, $entityID)
577
    {
578
        // Perform re-login if required.
579
        $this->checkLogin();
580
581
        // Preprend so-called moduleid if needed
582
        $entityID = $this->getTypedID($moduleName, $entityID);
583
584
        $postdata = [
585
            'operation' => 'delete',
586
            'sessionName' => $this->sessionName,
587
            'id' => $entityID
588
        ];
589
590
        return $this->sendHttpRequest($postdata);
591
    }
592
593
    /**
594
     * Retrieves multiple records using module name and a set of constraints