Code Duplication    Length = 16-16 lines in 2 locations

src/WSClient.php 2 locations

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