Completed
Push — v2 ( e6c7b3...40717e )
by Beñat
06:35
created

Question::getCommunityOwnedDate()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
/*
4
 * This file is part of the Stack Exchange Api Client library.
5
 *
6
 * Copyright (c) 2014-2016 Beñat Espiña <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace BenatEspina\StackExchangeApiClient\Model;
13
14
/**
15
 * The question model class.
16
 *
17
 * @author Beñat Espiña <[email protected]>
18
 */
19
class Question implements Model
20
{
21
    protected $questionId;
22
    protected $acceptedAnswerId;
23
    protected $isAnswered;
24
    protected $answerCount;
25
    protected $answers;
26
    protected $canFlag;
27
    protected $deleteVoteCount;
28
    protected $notice;
29
    protected $protectedDate;
30
    protected $creationDate;
31
    protected $reopenVoteCount;
32
    protected $viewCount;
33
    protected $bountyAmount;
34
    protected $bountyClosesDate;
35
    protected $bountyUser;
36
    protected $canClose;
37
    protected $closeVoteCount;
38
    protected $closedDate;
39
    protected $closedDetails;
40
    protected $closedReason;
41
    protected $favoriteCount;
42
    protected $favorited;
43
    protected $migratedFrom;
44
    protected $migratedTo;
45
    protected $communityOwnedDate;
46
    protected $lockedDate;
47
    protected $owner;
48
    protected $tags;
49
    protected $downvoted;
50
    protected $lastActivityDate;
51
    protected $shareLink;
52
    protected $title;
53
    protected $commentCount;
54
    protected $comments;
55
    protected $lastEditDate;
56
    protected $lastEditor;
57
    protected $downVoteCount;
58
    protected $upVoteCount;
59
    protected $body;
60
    protected $bodyMarkdown;
61
    protected $link;
62
    protected $score;
63
    protected $upvoted;
64
65
    public static function fromJson(array $data)
66
    {
67
        $answers = [];
68 View Code Duplication
        if (array_key_exists('answers', $data) && is_array($data['answers'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
69
            foreach ($data['answers'] as $answer) {
70
                $answers[] = Answer::fromJson($answer);
71
            }
72
        }
73
        $comments = [];
74 View Code Duplication
        if (array_key_exists('comments', $data) && is_array($data['comments'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
75
            foreach ($data['comments'] as $comment) {
76
                $comments[] = Comment::fromJson($comment);
77
            }
78
        }
79
        $tags = [];
80 View Code Duplication
        if (array_key_exists('tags', $data) && is_array($data['tags'])) {
0 ignored issues
show
Duplication introduced by
This code seems to be duplicated across your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
81
            foreach ($data['tags'] as $tag) {
82
                $tags[] = Tag::fromJson($tag);
83
            }
84
        }
85
86
        $instance = new self();
87
        $instance
88
            ->setAcceptedAnswerId(array_key_exists('accepted_answer_id', $data) ? $data['accepted_answer_id'] : null)
89
            ->setAnswerCount(array_key_exists('answer_count', $data) ? $data['answer_count'] : null)
90
            ->setAnswers($answers)
91
            ->setBody(array_key_exists('body', $data) ? $data['body'] : null)
92
            ->setBodyMarkdown(array_key_exists('body_markdown', $data) ? $data['body_markdown'] : null)
93
            ->setBountyAmount(array_key_exists('body_amount', $data) ? $data['body_amount'] : null)
94
            ->setBountyClosesDate(
95
                array_key_exists('bounty_closes_date', $data)
96
                    ? new \DateTimeImmutable('@' . $data['bounty_closes_date'])
97
                    : null
98
            )
99
            ->setBountyUser(array_key_exists('bounty_user', $data) ? ShallowUser::fromJson($data['bounty_user']) : null)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('bounty...['bounty_user']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...estion::setBountyUser() does only seem to accept null|object<BenatEspina\...ient\Model\ShallowUser>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
100
            ->setCanClose(array_key_exists('can_close', $data) ? $data['can_close'] : null)
101
            ->setCanFlag(array_key_exists('can_flag', $data) ? $data['can_flag'] : null)
102
            ->setCloseVoteCount(array_key_exists('close_vote_count', $data) ? $data['close_vote_count'] : null)
103
            ->setClosedDate(
104
                array_key_exists('closed_date', $data)
105
                    ? new \DateTimeImmutable('@' . $data['closed_date'])
106
                    : null
107
            )
108
            ->setClosedDetails(
109
                array_key_exists('closed_details', $data)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('closed...losed_details']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...ion::setClosedDetails() does only seem to accept null|object<BenatEspina\...nt\Model\ClosedDetails>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
110
                    ? ClosedDetails::fromJson($data['closed_details'])
111
                    : null
112
            )
113
            ->setClosedReason(array_key_exists('closed_reason', $data) ? $data['closed_reason'] : null)
114
            ->setCommentCount(array_key_exists('comment_count', $data) ? $data['comment_count'] : null)
115
            ->setComments($comments)
116
            ->setCommunityOwnedDate(
117
                array_key_exists('community_owned_date', $data)
118
                    ? new \DateTimeImmutable('@' . $data['community_owned_date'])
119
                    : null
120
            )
121
            ->setCreationDate(
122
                array_key_exists('creation_date', $data)
123
                    ? new \DateTimeImmutable('@' . $data['creation_date'])
124
                    : null
125
            )
126
            ->setDeleteVoteCount(array_key_exists('delete_vote_count', $data) ? $data['delete_vote_count'] : null)
127
            ->setDownVoteCount(array_key_exists('down_vote_count', $data) ? $data['down_vote_count'] : null)
128
            ->setDownvoted(array_key_exists('downvoted', $data) ? $data['downvoted'] : null)
129
            ->setFavoriteCount(array_key_exists('favorite_count', $data) ? $data['favorite_count'] : null)
130
            ->setFavorited(array_key_exists('favorited', $data) ? $data['favorited'] : null)
131
            ->setIsAnswered(array_key_exists('is_answered', $data) ? $data['is_answered'] : null)
132
            ->setLastActivityDate(
133
                array_key_exists('last_activity_date', $data)
134
                    ? new \DateTimeImmutable('@' . $data['last_activity_date'])
135
                    : null
136
            )
137
            ->setLastEditDate(
138
                array_key_exists('last_edit_date', $data)
139
                    ? new \DateTimeImmutable('@' . $data['last_edit_date'])
140
                    : null
141
            )
142
            ->setLastEditor(array_key_exists('last_editor', $data) ? ShallowUser::fromJson($data['last_editor']) : null)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('last_e...['last_editor']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...estion::setLastEditor() does only seem to accept null|object<BenatEspina\...ient\Model\ShallowUser>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
143
            ->setLink(array_key_exists('link', $data) ? $data['link'] : null)
144
            ->setLockedDate(
145
                array_key_exists('locked_date', $data)
146
                    ? new \DateTimeImmutable('@' . $data['locked_date'])
147
                    : null
148
            )
149
            ->setMigratedFrom(
150
                array_key_exists('migrate_from', $data)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('migrat...'migrate_from']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...tion::setMigratedFrom() does only seem to accept null|object<BenatEspina\...nt\Model\MigrationInfo>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
151
                    ? MigrationInfo::fromJson($data['migrate_from'])
152
                    : null
153
            )
154
            ->setMigratedTo(
155
                array_key_exists('migrate_to', $data)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('migrat...a['migrate_to']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...estion::setMigratedTo() does only seem to accept null|object<BenatEspina\...nt\Model\MigrationInfo>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
156
                    ? MigrationInfo::fromJson($data['migrate_to'])
157
                    : null
158
            )
159
            ->setNotice(array_key_exists('notice', $data) ? Notice::fromJson($data['notice']) : null)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('notice...$data['notice']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...l\Question::setNotice() does only seem to accept null|object<BenatEspina\...ApiClient\Model\Notice>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
160
            ->setOwner(array_key_exists('owner', $data) ? ShallowUser::fromJson($data['owner']) : null)
0 ignored issues
show
Bug introduced by
It seems like array_key_exists('owner'...($data['owner']) : null can also be of type object<BenatEspina\Stack...eApiClient\Model\Model>; however, BenatEspina\StackExchang...el\Question::setOwner() does only seem to accept null|object<BenatEspina\...ient\Model\ShallowUser>, maybe add an additional type check?

If a method or function can return multiple different values and unless you are sure that you only can receive a single value in this context, we recommend to add an additional type check:

/**
 * @return array|string
 */
function returnsDifferentValues($x) {
    if ($x) {
        return 'foo';
    }

    return array();
}

$x = returnsDifferentValues($y);
if (is_array($x)) {
    // $x is an array.
}

If this a common case that PHP Analyzer should handle natively, please let us know by opening an issue.

Loading history...
161
            ->setProtectedDate(
162
                array_key_exists('protected_date', $data)
163
                    ? new \DateTimeImmutable('@' . $data['protected_date'])
164
                    : null
165
            )
166
            ->setQuestionId(array_key_exists('question_id', $data) ? $data['question_id'] : null)
167
            ->setReopenVoteCount(array_key_exists('reopen_vote_count', $data) ? $data['reopen_vote_count'] : null)
168
            ->setScore(array_key_exists('score', $data) ? $data['score'] : null)
169
            ->setShareLink(array_key_exists('share_link', $data) ? $data['share_link'] : null)
170
            ->setTags($tags)
171
            ->setTitle(array_key_exists('title', $data) ? $data['title'] : null)
172
            ->setUpVoteCount(array_key_exists('up_vote_count', $data) ? $data['up_vote_count'] : null)
173
            ->setUpvoted(array_key_exists('upvoted', $data) ? $data['upvoted'] : null)
174
            ->setViewCount(array_key_exists('view_count', $data) ? $data['view_count'] : null);
175
176
        return $instance;
177
    }
178
179
    public static function fromProperties(
180
        $questionId,
181
        $acceptedAnswerId,
182
        $answerCount,
183
        $bountyAmount,
184
        \DateTimeInterface $bountyClosesDate,
185
        \DateTimeInterface $closedDate,
186
        $closedReason,
187
        \DateTimeInterface $communityOwnedDate,
188
        \DateTimeInterface $creationDate,
189
        $isAnswered,
190
        \DateTimeInterface $lastActivityDate,
191
        \DateTimeInterface $lastEditDate,
192
        ShallowUser $owner,
193
        $link,
194
        $score,
195
196
        $body = null,
197
        $bodyMarkdown = null,
198
        array $answers = [],
199
        $canFlag = null,
200
        $deleteVoteCount = null,
201
        Notice $notice = null,
202
        \DateTimeInterface $protectedDate = null,
203
        array $reopenVoteCount = null,
204
        array $viewCount = null,
205
        ShallowUser $bountyUser = null,
206
        $canClose = null,
207
        $closeVoteCount = null,
208
        ClosedDetails $closedDetails = null,
209
        $favoriteCount = null,
210
        $favorited = null,
211
        MigrationInfo $migratedFrom = null,
212
        MigrationInfo $migratedTo = null,
213
        \DateTimeInterface $lockedDate = null,
214
        array $tags = [],
215
        $downvoted = null,
216
        $shareLink = null,
217
        $title = null,
218
        $commentCount = null,
219
        array $comments = [],
220
        ShallowUser $lastEditor = null,
221
        $upvoted = null,
222
        $downVoteCount = null,
223
        $upVoteCount = null
224
    ) {
225
        $instance = new self();
226
        $instance
227
            ->setAcceptedAnswerId($acceptedAnswerId)
228
            ->setAnswerCount($answerCount)
229
            ->setAnswers($answers)
230
            ->setBody($body)
231
            ->setBodyMarkdown($bodyMarkdown)
232
            ->setBountyAmount($bountyAmount)
233
            ->setBountyClosesDate($bountyClosesDate)
234
            ->setBountyUser($bountyUser)
235
            ->setCanClose($canClose)
236
            ->setCanFlag($canFlag)
237
            ->setCloseVoteCount($closeVoteCount)
238
            ->setClosedDate($closedDate)
239
            ->setClosedDetails($closedDetails)
240
            ->setClosedReason($closedReason)
241
            ->setCommentCount($commentCount)
242
            ->setComments($comments)
243
            ->setCommunityOwnedDate($communityOwnedDate)
244
            ->setCreationDate($creationDate)
245
            ->setDeleteVoteCount($deleteVoteCount)
246
            ->setDownVoteCount($downVoteCount)
247
            ->setDownvoted($downvoted)
248
            ->setFavoriteCount($favoriteCount)
249
            ->setFavorited($favorited)
250
            ->setIsAnswered($isAnswered)
251
            ->setLastActivityDate($lastActivityDate)
252
            ->setLastEditDate($lastEditDate)
253
            ->setLastEditor($lastEditor)
254
            ->setLink($link)
255
            ->setLockedDate($lockedDate)
256
            ->setMigratedFrom($migratedFrom)
257
            ->setMigratedTo($migratedTo)
258
            ->setNotice($notice)
259
            ->setOwner($owner)
260
            ->setProtectedDate($protectedDate)
261
            ->setQuestionId($questionId)
262
            ->setReopenVoteCount($reopenVoteCount)
263
            ->setScore($score)
264
            ->setShareLink($shareLink)
265
            ->setTags($tags)
266
            ->setTitle($title)
267
            ->setUpVoteCount($upVoteCount)
268
            ->setUpvoted($upvoted)
269
            ->setViewCount($viewCount);
270
271
        return $instance;
272
    }
273
274
    public function getUpvoted()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
275
    {
276
        return $this->upvoted;
277
    }
278
279
    public function setUpvoted($upvoted)
280
    {
281
        $this->upvoted = $upvoted;
282
283
        return $this;
284
    }
285
286
    public function getScore()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
287
    {
288
        return $this->score;
289
    }
290
291
    public function setScore($score)
292
    {
293
        $this->score = $score;
294
295
        return $this;
296
    }
297
298
    public function getQuestionId()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
299
    {
300
        return $this->questionId;
301
    }
302
303
    public function setQuestionId($questionId)
304
    {
305
        $this->questionId = $questionId;
306
307
        return $this;
308
    }
309
310
    public function getLink()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
311
    {
312
        return $this->link;
313
    }
314
315
    public function setLink($link)
316
    {
317
        $this->link = $link;
318
319
        return $this;
320
    }
321
322
    public function getBountyAmount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
323
    {
324
        return $this->bountyAmount;
325
    }
326
327
    public function setBountyAmount($bountyAmount)
328
    {
329
        $this->bountyAmount = $bountyAmount;
330
331
        return $this;
332
    }
333
334
    public function getBody()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
335
    {
336
        return $this->body;
337
    }
338
339
    public function setBody($body)
340
    {
341
        $this->body = $body;
342
343
        return $this;
344
    }
345
346
    public function getBodyMarkdown()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
347
    {
348
        return $this->bodyMarkdown;
349
    }
350
351
    public function setBodyMarkdown($bodyMarkdown)
352
    {
353
        $this->bodyMarkdown = $bodyMarkdown;
354
355
        return $this;
356
    }
357
358
    public function getIsAnswered()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
359
    {
360
        return $this->isAnswered;
361
    }
362
363
    public function setIsAnswered($isAnswered)
364
    {
365
        $this->isAnswered = $isAnswered;
366
367
        return $this;
368
    }
369
370
    public function getCanFlag()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
371
    {
372
        return $this->canFlag;
373
    }
374
375
    public function setCanFlag($canFlag)
376
    {
377
        $this->canFlag = $canFlag;
378
379
        return $this;
380
    }
381
382
    public function getCreationDate()
383
    {
384
        return $this->creationDate;
385
    }
386
387
    public function setCreationDate(\DateTimeInterface $creationDate = null)
388
    {
389
        $this->creationDate = $creationDate;
390
391
        return $this;
392
    }
393
394
    public function getOwner()
395
    {
396
        return $this->owner;
397
    }
398
399
    public function setOwner(ShallowUser $owner = null)
400
    {
401
        $this->owner = $owner;
402
403
        return $this;
404
    }
405
406
    public function setCommunityOwnedDate(\DateTimeInterface $communityOwnedDate = null)
407
    {
408
        $this->communityOwnedDate = $communityOwnedDate;
409
410
        return $this;
411
    }
412
413
    public function getCommunityOwnedDate()
414
    {
415
        return $this->communityOwnedDate;
416
    }
417
418
    public function setLockedDate(\DateTimeInterface $lockedDate = null)
419
    {
420
        $this->lockedDate = $lockedDate;
421
422
        return $this;
423
    }
424
425
    public function getLockedDate()
426
    {
427
        return $this->lockedDate;
428
    }
429
430
    public function setTags(array $tags = [])
431
    {
432
        $this->tags = $tags;
433
434
        return $this;
435
    }
436
437
    public function getTags()
438
    {
439
        return $this->tags;
440
    }
441
442
    public function setDownvoted($downvoted)
443
    {
444
        $this->downvoted = $downvoted;
445
446
        return $this;
447
    }
448
449
    public function isDownvoted()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
450
    {
451
        return $this->downvoted;
452
    }
453
454
    public function setLastActivityDate(\DateTimeInterface $lastActivityDate = null)
455
    {
456
        $this->lastActivityDate = $lastActivityDate;
457
458
        return $this;
459
    }
460
461
    public function getLastActivityDate()
462
    {
463
        return $this->lastActivityDate;
464
    }
465
466
    public function setShareLink($shareLink)
467
    {
468
        $this->shareLink = $shareLink;
469
470
        return $this;
471
    }
472
473
    public function getShareLink()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
474
    {
475
        return $this->shareLink;
476
    }
477
478
    public function setTitle($title)
479
    {
480
        $this->title = $title;
481
482
        return $this;
483
    }
484
485
    public function getTitle()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
486
    {
487
        return $this->title;
488
    }
489
490
    public function setCommentCount($commentCount)
491
    {
492
        $this->commentCount = $commentCount;
493
494
        return $this;
495
    }
496
497
    public function getCommentCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
498
    {
499
        return $this->commentCount;
500
    }
501
502
    public function setComments(array $comments = [])
503
    {
504
        $this->comments = $comments;
505
506
        return $this;
507
    }
508
509
    public function getComments()
510
    {
511
        return $this->comments;
512
    }
513
514
    public function setLastEditDate(\DateTimeInterface $lastEditDate = null)
515
    {
516
        $this->lastEditDate = $lastEditDate;
517
518
        return $this;
519
    }
520
521
    public function getLastEditDate()
522
    {
523
        return $this->lastEditDate;
524
    }
525
526
    public function setLastEditor(ShallowUser $lastEditor = null)
527
    {
528
        $this->lastEditor = $lastEditor;
529
530
        return $this;
531
    }
532
533
    public function getLastEditor()
534
    {
535
        return $this->lastEditor;
536
    }
537
538
    public function setDownVoteCount($downVoteCount)
539
    {
540
        $this->downVoteCount = $downVoteCount;
541
542
        return $this;
543
    }
544
545
    public function getDownVoteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
546
    {
547
        return $this->downVoteCount;
548
    }
549
550
    public function setUpVoteCount($upVoteCount)
551
    {
552
        $this->upVoteCount = $upVoteCount;
553
554
        return $this;
555
    }
556
557
    public function getUpVoteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
558
    {
559
        return $this->upVoteCount;
560
    }
561
562
    public function setAcceptedAnswerId($acceptedAnswerId)
563
    {
564
        $this->acceptedAnswerId = $acceptedAnswerId;
565
566
        return $this;
567
    }
568
569
    public function getAcceptedAnswerId()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
570
    {
571
        return $this->acceptedAnswerId;
572
    }
573
574
    public function setAnswerCount($answerCount)
575
    {
576
        $this->answerCount = $answerCount;
577
578
        return $this;
579
    }
580
581
    public function getAnswerCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
582
    {
583
        return $this->answerCount;
584
    }
585
586
    public function setAnswered($isAnswered)
587
    {
588
        $this->isAnswered = $isAnswered;
589
590
        return $this;
591
    }
592
593
    public function isAnswered()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
594
    {
595
        return $this->isAnswered;
596
    }
597
598
    public function setBountyClosesDate(\DateTimeInterface $bountyClosesDate = null)
599
    {
600
        $this->bountyClosesDate = $bountyClosesDate;
601
602
        return $this;
603
    }
604
605
    public function getBountyClosesDate()
606
    {
607
        return $this->bountyClosesDate;
608
    }
609
610
    public function setBountyUser(ShallowUser $bountyUser = null)
611
    {
612
        $this->bountyUser = $bountyUser;
613
614
        return $this;
615
    }
616
617
    public function getBountyUser()
618
    {
619
        return $this->bountyUser;
620
    }
621
622
    public function setCanClose($canClose)
623
    {
624
        $this->canClose = $canClose;
625
626
        return $this;
627
    }
628
629
    public function isCanClose()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
630
    {
631
        return $this->canClose;
632
    }
633
634
    public function setCloseVoteCount($closeVoteCount)
635
    {
636
        $this->closeVoteCount = $closeVoteCount;
637
638
        return $this;
639
    }
640
641
    public function getCloseVoteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
642
    {
643
        return $this->closeVoteCount;
644
    }
645
646
    public function setClosedDate(\DateTimeInterface $closedDate = null)
647
    {
648
        $this->closedDate = $closedDate;
649
650
        return $this;
651
    }
652
653
    public function getClosedDate()
654
    {
655
        return $this->closedDate;
656
    }
657
658
    public function setClosedDetails(ClosedDetails $closedDetails = null)
659
    {
660
        $this->closedDetails = $closedDetails;
661
662
        return $this;
663
    }
664
665
    public function getClosedDetails()
666
    {
667
        return $this->closedDetails;
668
    }
669
670
    public function setClosedReason($closedReason)
671
    {
672
        $this->closedReason = $closedReason;
673
674
        return $this;
675
    }
676
677
    public function getClosedReason()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
678
    {
679
        return $this->closedReason;
680
    }
681
682
    public function setFavoriteCount($favoriteCount)
683
    {
684
        $this->favoriteCount = $favoriteCount;
685
686
        return $this;
687
    }
688
689
    public function getFavoriteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
690
    {
691
        return $this->favoriteCount;
692
    }
693
694
    public function setFavorited($favorited)
695
    {
696
        $this->favorited = $favorited;
697
698
        return $this;
699
    }
700
701
    public function isFavorited()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
702
    {
703
        return $this->favorited;
704
    }
705
706
    public function setMigratedFrom(MigrationInfo $migratedFrom = null)
707
    {
708
        $this->migratedFrom = $migratedFrom;
709
710
        return $this;
711
    }
712
713
    public function getMigratedFrom()
714
    {
715
        return $this->migratedFrom;
716
    }
717
718
    public function setMigratedTo(MigrationInfo $migratedTo = null)
719
    {
720
        $this->migratedTo = $migratedTo;
721
722
        return $this;
723
    }
724
725
    public function getMigratedTo()
726
    {
727
        return $this->migratedTo;
728
    }
729
730
    public function setAnswers(array $answers = [])
731
    {
732
733
        $this->answers = $answers;
734
735
        return $this;
736
    }
737
738
    public function getAnswers()
739
    {
740
        return $this->answers;
741
    }
742
743
    public function setFlag($canFlag)
744
    {
745
        $this->canFlag = $canFlag;
746
747
        return $this;
748
    }
749
750
    public function canFlag()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
751
    {
752
        return $this->canFlag;
753
    }
754
755
    public function setDeleteVoteCount($deleteVoteCount)
756
    {
757
        $this->deleteVoteCount = $deleteVoteCount;
758
759
        return $this;
760
    }
761
762
    public function getDeleteVoteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
763
    {
764
        return $this->deleteVoteCount;
765
    }
766
767
    public function setNotice(Notice $notice = null)
768
    {
769
        $this->notice = $notice;
770
771
        return $this;
772
    }
773
774
    public function getNotice()
775
    {
776
        return $this->notice;
777
    }
778
779
    public function setProtectedDate(\DateTimeInterface $protectedDate = null)
780
    {
781
        $this->protectedDate = $protectedDate;
782
783
        return $this;
784
    }
785
786
    public function getProtectedDate()
787
    {
788
        return $this->protectedDate;
789
    }
790
791
    public function setReopenVoteCount($reopenVoteCount)
792
    {
793
        $this->reopenVoteCount = $reopenVoteCount;
794
795
        return $this;
796
    }
797
798
    public function getReopenVoteCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
799
    {
800
        return $this->reopenVoteCount;
801
    }
802
803
    public function setViewCount($viewCount)
804
    {
805
        $this->viewCount = $viewCount;
806
807
        return $this;
808
    }
809
810
    public function getViewCount()
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
811
    {
812
        return $this->viewCount;
813
    }
814
}
815