Code Duplication    Length = 24-25 lines in 3 locations

src/Api/Request/Block/Ids.php 1 location

@@ 10-34 (lines=25) @@
7
/**
8
 * @link https://dev.twitter.com/rest/reference/get/blocks/ids
9
 */
10
class Ids extends BaseRequest
11
{
12
    const METHOD   = 'GET';
13
14
    const ENDPOINT = '/blocks/ids.json';
15
16
    public function __construct()
17
    {
18
        parent::__construct(self::METHOD, self::ENDPOINT);
19
    }
20
21
    public function stringifyIds(): Ids
22
    {
23
        $this->parameters['stringify_ids'] = 'true';
24
25
        return $this;
26
    }
27
28
    public function fromCursor(int $cursor): Ids
29
    {
30
        $this->parameters['cursor'] = (string) $cursor;
31
32
        return $this;
33
    }
34
}
35

src/Api/Request/Friendship/Lookup.php 1 location

@@ 10-34 (lines=25) @@
7
/**
8
 * @link https://dev.twitter.com/rest/reference/get/friendships/lookup
9
 */
10
class Lookup extends BaseRequest
11
{
12
    const METHOD   = 'GET';
13
14
    const ENDPOINT = '/friendships/lookup.json';
15
16
    public function __construct()
17
    {
18
        parent::__construct(self::METHOD, self::ENDPOINT);
19
    }
20
21
    public function userIds(array $ids): Lookup
22
    {
23
        $this->parameters['user_id'] = implode(',', $ids);
24
25
        return $this;
26
    }
27
28
    public function screenNames(array $screenNames): Lookup
29
    {
30
        $this->parameters['screen_name'] = implode(',', $screenNames);
31
32
        return $this;
33
    }
34
}
35

src/Api/Request/Status/Retweets.php 1 location

@@ 10-33 (lines=24) @@
7
/**
8
 * @link https://dev.twitter.com/rest/reference/get/statuses/retweets/id
9
 */
10
class Retweets extends BaseRequest
11
{
12
    const METHOD   = 'GET';
13
    const ENDPOINT = '/statuses/retweets/%d.json';
14
15
    public function __construct(int $id)
16
    {
17
        parent::__construct(self::METHOD, sprintf(self::ENDPOINT, $id));
18
    }
19
20
    public function amount(int $amount): Retweets
21
    {
22
        $this->parameters['count'] = (string) $amount;
23
24
        return $this;
25
    }
26
27
    public function trimUser(): Retweets
28
    {
29
        $this->parameters['trim_user'] = 'true';
30
31
        return $this;
32
    }
33
}
34