Code Duplication    Length = 13-13 lines in 3 locations

code/api/CampaignMonitorAPIConnector.php 3 locations

@@ 1500-1512 (lines=13) @@
1497
     *
1498
     * @return CS_REST_Wrapper_Result A successful response will be empty
1499
     */
1500
    public function deleteSubscriber($listID, $member)
1501
    {
1502
        if ($member instanceof Member) {
1503
            $member = $member->Email;
1504
        }
1505
        $wrap = new CS_REST_Subscribers($listID, $this->getAuth());
1506
        $result = $wrap->delete($member);
1507
        return $this->returnResult(
1508
            $result,
1509
            "DELETE /api/v3.1/subscribers/{list id}.{format}?email={emailAddress}",
1510
            "Unsubscribed with code  ..."
1511
        );
1512
    }
1513
1514
    /**
1515
     * Unsubscribes the given subscriber from the current list
@@ 1522-1534 (lines=13) @@
1519
     *
1520
     * @return CS_REST_Wrapper_Result A successful response will be empty
1521
     */
1522
    public function unsubscribeSubscriber($listID, $member)
1523
    {
1524
        if ($member instanceof Member) {
1525
            $member = $member->Email;
1526
        }
1527
        $wrap = new CS_REST_Subscribers($listID, $this->getAuth());
1528
        $result = $wrap->unsubscribe($member);
1529
        return $this->returnResult(
1530
            $result,
1531
            "GET /api/v3.1/subscribers/{list id}/unsubscribe.{format}",
1532
            "Unsubscribed with code  ..."
1533
        );
1534
    }
1535
1536
    /**
1537
     * Is this user part of this list at all?
@@ 1680-1692 (lines=13) @@
1677
     * }
1678
     *
1679
     */
1680
    public function getHistory($listID, $member)
1681
    {
1682
        if ($member instanceof Member) {
1683
            $member = $member->Email;
1684
        }
1685
        $wrap = new CS_REST_Subscribers($listID, $this->getAuth());
1686
        $result = $wrap->get_history($member);
1687
        return $this->returnResult(
1688
            $result,
1689
            "GET /api/v3.1/subscribers/{list id}/history.{format}?email={email}",
1690
            "got subscriber history"
1691
        );
1692
    }
1693
}
1694