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