Completed
Push — master ( 387ec3...961eec )
by Pieter
06:24
created

Filter::locations()   A

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
class Filter extends BaseRequest
6
{
7
    const METHOD   = 'POST';
8
    const ENDPOINT = '/statuses/filter.json';
9
10
    public function __construct()
11
    {
12
        parent::__construct(self::METHOD, self::ENDPOINT);
13
    }
14
15
    public function follow(array $users)
16
    {
17
        $this->parameters['follow'] = implode(',', $users);
18
19
        return $this;
20
    }
21
22
    public function track(array $keywords)
23
    {
24
        $this->parameters['track'] = implode(',', $keywords);
25
26
        return $this;
27
    }
28
29
    public function locations(array $boxes)
30
    {
31
        $this->parameters['locations'] = implode(',', $boxes);
32
33
        return $this;
34
    }
35
}
36