Conditions | 7 |
Paths | 64 |
Total Lines | 22 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 11 |
CRAP Score | 7.9295 |
Changes | 0 |
1 | <?php |
||
56 | 3 | public function toArray() |
|
57 | { |
||
58 | $request = [ |
||
59 | 3 | 'include_rts' => $this->includeRetweets ? 'true' : 'false', |
|
60 | 3 | 'trim_user' => $this->trimUser ? 'true' : 'false', |
|
61 | 3 | 'include_entities' => $this->includeEntities ? 'true' : 'false' |
|
62 | 2 | ]; |
|
63 | |||
64 | 3 | if ($this->count !== null) { |
|
65 | 3 | $request['count'] = $this->count; |
|
66 | 2 | } |
|
67 | |||
68 | 3 | if ($this->fromId !== null) { |
|
69 | $request['since_id'] = $this->fromId; |
||
70 | } |
||
71 | |||
72 | 3 | if ($this->toId !== null) { |
|
73 | $request['max_id'] = $this->toId; |
||
74 | } |
||
75 | |||
76 | 3 | return $request; |
|
77 | } |
||
78 | } |
||
79 |