1 | <?php |
||
11 | class Tweet |
||
12 | { |
||
13 | /** |
||
14 | * @var int |
||
15 | */ |
||
16 | private $id; |
||
17 | |||
18 | /** |
||
19 | * @var \DateTime |
||
20 | */ |
||
21 | private $created_at; |
||
22 | |||
23 | /** |
||
24 | * @var string |
||
25 | */ |
||
26 | private $text; |
||
27 | |||
28 | /** |
||
29 | * @var int |
||
30 | */ |
||
31 | private $retweet_count = 0; |
||
32 | |||
33 | /** |
||
34 | * @var int |
||
35 | */ |
||
36 | private $favorite_count = 0; |
||
37 | |||
38 | /** |
||
39 | * @var User |
||
40 | */ |
||
41 | private $user; |
||
42 | |||
43 | /** |
||
44 | * In timeline: false for retweeted Tweets. |
||
45 | * |
||
46 | * @var bool |
||
47 | */ |
||
48 | private $in_timeline = false; |
||
49 | |||
50 | /** |
||
51 | * @var Tweet |
||
52 | */ |
||
53 | private $retweeted_status = null; |
||
54 | |||
55 | /** |
||
56 | * @var Collection<int, Tweet> |
||
57 | */ |
||
58 | private $retweeting_statuses; |
||
59 | |||
60 | /** |
||
61 | * @var Collection<int, Media> |
||
62 | */ |
||
63 | private $medias; |
||
64 | |||
65 | 14 | public function __construct() |
|
70 | |||
71 | /** |
||
72 | * Set id. |
||
73 | * |
||
74 | * @return Tweet |
||
75 | */ |
||
76 | 14 | public function setId(int $id): self |
|
82 | |||
83 | /** |
||
84 | * Get id. |
||
85 | */ |
||
86 | 9 | public function getId(): int |
|
90 | |||
91 | /** |
||
92 | * Set created_at. |
||
93 | */ |
||
94 | 14 | public function setCreatedAt(\DateTime $createdAt): self |
|
100 | |||
101 | /** |
||
102 | * Get created_at. |
||
103 | */ |
||
104 | 10 | public function getCreatedAt(): \DateTime |
|
108 | |||
109 | /** |
||
110 | * Set text. |
||
111 | */ |
||
112 | 14 | public function setText(string $text): self |
|
118 | |||
119 | /** |
||
120 | * Get text. |
||
121 | */ |
||
122 | 11 | public function getText(): string |
|
126 | |||
127 | 6 | public function getTextLinkified(): ?string |
|
136 | |||
137 | /** |
||
138 | * Set retweet_count. |
||
139 | */ |
||
140 | 14 | public function setRetweetCount(int $retweetCount): self |
|
146 | |||
147 | /** |
||
148 | * Get retweet_count. |
||
149 | */ |
||
150 | 8 | public function getRetweetCount(): int |
|
154 | |||
155 | /** |
||
156 | * Set favorite_count. |
||
157 | */ |
||
158 | 14 | public function setFavoriteCount(int $favoriteCount): self |
|
164 | |||
165 | /** |
||
166 | * Get favorite_count. |
||
167 | */ |
||
168 | 8 | public function getFavoriteCount(): int |
|
172 | |||
173 | /** |
||
174 | * Set user. |
||
175 | */ |
||
176 | 14 | public function setUser(User $user): self |
|
183 | |||
184 | /** |
||
185 | * Get User. |
||
186 | */ |
||
187 | 9 | public function getUser(): User |
|
191 | |||
192 | /** |
||
193 | * Set in timeline. |
||
194 | */ |
||
195 | 14 | public function setInTimeline(bool $inTimeline): self |
|
201 | |||
202 | /** |
||
203 | * Get in timeline. |
||
204 | */ |
||
205 | 3 | public function isInTimeline(): bool |
|
209 | |||
210 | /** |
||
211 | * Set retweeted |
||
212 | * "This attribute contains a representation of the original Tweet |
||
213 | * that was retweeted.". |
||
214 | */ |
||
215 | 13 | public function setRetweetedStatus(self $retweetedStatus): self |
|
221 | |||
222 | /** |
||
223 | * Get retweeted status. |
||
224 | */ |
||
225 | 7 | public function getRetweetedStatus(): ?self |
|
229 | |||
230 | /** |
||
231 | * Get medias. |
||
232 | * |
||
233 | * @return Collection<int, Media> |
||
234 | */ |
||
235 | 6 | public function getMedias(): Collection |
|
239 | |||
240 | 13 | public function addMedia(Media $media): self |
|
247 | |||
248 | 1 | public function removeMedia(Media $media): self |
|
255 | |||
256 | /** |
||
257 | * Get retweeting status. |
||
258 | * |
||
259 | * @return Collection<int, Tweet> |
||
260 | */ |
||
261 | 2 | public function getRetweetingStatuses(): Collection |
|
265 | |||
266 | /** |
||
267 | * Call setter functions. |
||
268 | */ |
||
269 | 3 | public function setValues(\stdClass $tweetTmp): self |
|
279 | |||
280 | /** |
||
281 | * Check that tweet can be deleted. |
||
282 | */ |
||
283 | 2 | public function mustBeKept(int $tweetId): bool |
|
300 | } |
||
301 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..