Filter::follow()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 0
cts 5
cp 0
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 2
1
<?php declare(strict_types = 1);
2
3
namespace PeeHaa\AsyncTwitter\Api\Request\Stream;
4
5
/**
6
 * @link https://dev.twitter.com/streaming/reference/post/statuses/filter
7
 */
8
class Filter extends BaseRequest
9
{
10
    const METHOD   = 'POST';
11
    const ENDPOINT = '/statuses/filter.json';
12
13
    public function __construct()
14
    {
15
        parent::__construct(self::METHOD, self::ENDPOINT);
16
    }
17
18
    public function follow(array $users)
19
    {
20
        $this->parameters['follow'] = implode(',', $users);
21
22
        return $this;
23
    }
24
25
    public function track(array $keywords)
26
    {
27
        $this->parameters['track'] = implode(',', $keywords);
28
29
        return $this;
30
    }
31
32
    public function locations(array $boxes)
33
    {
34
        $this->parameters['locations'] = implode(',', $boxes);
35
36
        return $this;
37
    }
38
}
39