Filter   A
last analyzed

Complexity

Total Complexity 4

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 4
lcom 1
cbo 1
dl 0
loc 31
ccs 0
cts 19
cp 0
rs 10
c 0
b 0
f 0

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A follow() 0 6 1
A track() 0 6 1
A locations() 0 6 1
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