Completed
Push — master ( 784303...e88874 )
by Pieter
03:18
created

Place::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 6
ccs 3
cts 3
cp 1
rs 9.4285
c 0
b 0
f 0
cc 1
eloc 3
nc 1
nop 1
crap 1
1
<?php declare(strict_types=1);
2
3
namespace PeeHaa\AsyncTwitter\Api\Request\Trend;
4
5
use PeeHaa\AsyncTwitter\Api\Request\BaseRequest;
6
7
/**
8
 * @link https://dev.twitter.com/rest/reference/get/trends/place
9
 */
10
class Place extends BaseRequest
11
{
12
    const METHOD   = 'GET';
13
    const ENDPOINT = '/trends/place.json';
14
15 3
    public function __construct(int $id)
16
    {
17 3
        parent::__construct(self::METHOD, self::ENDPOINT);
18
19 3
        $this->parameters['id'] = (string) $id;
20
    }
21
22 1
    public function excludeHashTags(): Place
23
    {
24 1
        $this->parameters['exclude'] = 'hashtags';
25
26 1
        return $this;
27
    }
28
}
29