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

Filter   A

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
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