Code Duplication    Length = 16-16 lines in 2 locations

src/WSClient.php 2 locations

@@ 415-430 (lines=16) @@
412
     * @param  string $entityID The ID of the entity to retrieve
413
     * @return boolean  Entity data
414
     */
415
    public function entityRetrieveByID($moduleName, $entityID)
416
    {
417
        // Perform re-login if required.
418
        $this->checkLogin();
419
420
        // Preprend so-called moduleid if needed
421
        $entityID = $this->getTypedID($moduleName, $entityID);
422
423
        $getdata = [
424
            'operation' => 'retrieve',
425
            'sessionName' => $this->sessionName,
426
            'id' => $entityID
427
        ];
428
429
        return $this->sendHttpRequest($getdata, 'GET');
430
    }
431
432
    /**
433
     * Uses VTiger queries to retrieve the entity matching a list of constraints
@@ 539-554 (lines=16) @@
536
     * @param  string $entityID The ID of the entity to delete
537
     * @return array  Removal status object
538
     */
539
    public function entityDelete($moduleName, $entityID)
540
    {
541
        // Perform re-login if required.
542
        $this->checkLogin();
543
544
        // Preprend so-called moduleid if needed
545
        $entityID = $this->getTypedID($moduleName, $entityID);
546
547
        $postdata = [
548
            'operation' => 'delete',
549
            'sessionName' => $this->sessionName,
550
            'id' => $entityID
551
        ];
552
553
        return $this->sendHttpRequest($postdata);
554
    }
555
556
    /**
557
     * Retrieves multiple records using module name and a set of constraints