Code Duplication    Length = 16-16 lines in 2 locations

plugins/actions/twitter/twitter.php 2 locations

@@ 708-723 (lines=16) @@
705
     * @param    int    [optional] $page            Specifies the page of results to retrieve.
706
     * @param    bool   [optional] $skipUser    When true each tweet returned in a timeline will not contain an entire user object. Instead, the user node will contain only an id element to indicate the numerical ID of the Twitter user that set the status.
707
     */
708
    public function statusesHomeTimeline($sinceId = null, $maxId = null, $count = null, $page = null, $skipUser = false)
709
    {
710
        // redefine
711
        $skipUser = (bool)$skipUser;
712
713
        // build parameters
714
        $parameters = array();
715
        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
716
        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
717
        if ($count != null) $parameters['count'] = (int)$count;
718
        if ($page != null) $parameters['page'] = (int)$page;
719
        if ($skipUser) $parameters['skip_user'] = 'true';
720
721
        // make the call
722
        return (array)$this->doCall('statuses/home_timeline.json', $parameters, true);
723
    }
724
725
    /**
726
     * Returns the 20 most recent statuses, including retweets, posted by the authenticating user and that user's friends.
@@ 739-754 (lines=16) @@
736
     * @param    int    [optional] $page            Specifies the page of results to retrieve.
737
     * @param    bool   [optional] $skipUser    When true each tweet returned in a timeline will not contain an entire user object. Instead, the user node will contain only an id element to indicate the numerical ID of the Twitter user that set the status.
738
     */
739
    public function statusesFriendsTimeline($sinceId = null, $maxId = null, $count = null, $page = null, $skipUser = false)
740
    {
741
        // redefine
742
        $skipUser = (bool)$skipUser;
743
744
        // build parameters
745
        $parameters = array();
746
        if ($sinceId != null) $parameters['since_id'] = (string)$sinceId;
747
        if ($maxId != null) $parameters['max_id'] = (string)$maxId;
748
        if ($count != null) $parameters['count'] = (int)$count;
749
        if ($page != null) $parameters['page'] = (int)$page;
750
        if ($skipUser) $parameters['skip_user'] = 'true';
751
752
        // make the call
753
        return (array)$this->doCall('statuses/friends_timeline.json', $parameters, true);
754
    }
755
756
    /**
757
     * Returns the 20 most recent statuses posted from the authenticating user. It's also possible to request another user's timeline via the id parameter.