Conditions | 6 |
Paths | 32 |
Total Lines | 21 |
Code Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 10 |
CRAP Score | 6.8395 |
Changes | 0 |
1 | <?php |
||
50 | 3 | public function toArray() |
|
51 | { |
||
52 | $request = [ |
||
53 | 3 | 'include_entities' => $this->includeEntities ? 'true' : 'false', |
|
54 | 3 | 'skip_status' => $this->skipStatus ? 'true' : 'false' |
|
55 | 2 | ]; |
|
56 | |||
57 | 3 | if ($this->count !== null) { |
|
58 | 3 | $request['count'] = $this->count; |
|
59 | 2 | } |
|
60 | |||
61 | 3 | if ($this->fromId !== null) { |
|
62 | $request['since_id'] = $this->fromId; |
||
63 | } |
||
64 | |||
65 | 3 | if ($this->toId !== null) { |
|
66 | $request['max_id'] = $this->toId; |
||
67 | } |
||
68 | |||
69 | 3 | return $request; |
|
70 | } |
||
71 | } |
||
72 |