Code Duplication    Length = 12-13 lines in 2 locations

plugins/actions/twitter/twitter.php 2 locations

@@ 1502-1513 (lines=12) @@
1499
     * @return mixed
1500
     * @throws TwitterException
1501
     */
1502
    public function userListMembersId($user, $id, $userId)
1503
    {
1504
        try {
1505
            // make the call
1506
            return (array)$this->doCall((string)$user . '/' . (string)$id . '/members/' . (string)$userId . '.json', null, true);
1507
        } // catch exceptions
1508
        catch (TwitterException $e) {
1509
            if ($e->getMessage() === 'The specified user is not a member of this list') {
1510
                return false;
1511
            } else throw $e;
1512
        }
1513
    }
1514
1515
1516
    // List Subscribers resources
@@ 1573-1585 (lines=13) @@
1570
     * @return mixed
1571
     * @throws TwitterException
1572
     */
1573
    public function userListSubscribersId($user, $id, $userId)
1574
    {
1575
        try {
1576
            // make the call
1577
            return (array)$this->doCall((string)$user . '/' . (string)$id . '/subscribers/' . (string)$userId . '.json', null, true);
1578
        } // catch exceptions
1579
        catch (TwitterException $e) {
1580
            if ($e->getMessage() === 'The specified user is not a subscriber of this list') {
1581
                return false;
1582
            } else throw $e;
1583
        }
1584
1585
    }
1586
1587
1588
    // Direct Messages resources