Completed
Push — master ( d83f32...d4821e )
by Rémi
04:29
created

DeleteTweetParameters   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 31
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Test Coverage

Coverage 0%

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 5 1
A toArray() 0 7 2
1
<?php
2
3
namespace Twitter\API\REST\DTO;
4
5
use Twitter\API\REST\ApiParameters;
6
7
class DeleteTweetParameters implements ApiParameters
8
{
9
    /** @var int */
10
    private $id;
11
12
    /** @var bool */
13
    private $trimUser;
14
15
    /**
16
     * DeleteTweetParameters constructor.
17
     *
18
     * @param int  $id
19
     * @param bool $trimUser
20
     */
21
    public function __construct($id, $trimUser = false)
22
    {
23
        $this->id = $id;
24
        $this->trimUser = $trimUser;
25
    }
26
27
    /**
28
     * @return array
29
     */
30
    public function toArray()
31
    {
32
        return [
33
            'id' => $this->id,
34
            'trim_user' => $this->trimUser ? 'true' : 'false'
35
        ];
36
    }
37
}
38