Passed
Pull Request — master (#250)
by Eldar
02:26
created

Message::getNewChatMember()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
ccs 2
cts 2
cp 1
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 1
1
<?php
2
namespace TelegramBot\Api\Types;
3
4
use TelegramBot\Api\BaseType;
5
use TelegramBot\Api\InvalidArgumentException;
6
use TelegramBot\Api\TypeInterface;
7
use TelegramBot\Api\Types\Inline\InlineKeyboardMarkup;
8
use TelegramBot\Api\Types\Payments\Invoice;
9
use TelegramBot\Api\Types\Payments\SuccessfulPayment;
10
11
class Message extends BaseType implements TypeInterface
12
{
13
    /**
14
     * {@inheritdoc}
15
     *
16
     * @var array
17
     */
18
    static protected $requiredParams = ['message_id', 'date', 'chat'];
19
20
    /**
21
     * {@inheritdoc}
22
     *
23
     * @var array
24
     */
25
    static protected $map = [
26
        'message_id' => true,
27
        'from' => User::class,
28
        'date' => true,
29
        'chat' => Chat::class,
30
        'forward_from' => User::class,
31
        'forward_from_chat' => Chat::class,
32
        'forward_from_message_id' => true,
33
        'forward_date' => true,
34
        'forward_signature' => true,
35
        'forward_sender_name' => true,
36
        'reply_to_message' => Message::class,
37
        'edit_date' => true,
38
        'media_group_id' => true,
39
        'author_signature' => true,
40
        'text' => true,
41
        'entities' => ArrayOfMessageEntity::class,
42
        'caption_entities' => ArrayOfMessageEntity::class,
43
        'audio' => Audio::class,
44
        'document' => Document::class,
45
        'animation' => Animation::class,
46
        'photo' => ArrayOfPhotoSize::class,
47
        'sticker' => Sticker::class,
48
        'video' => Video::class,
49
        'voice' => Voice::class,
50
        'caption' => true,
51
        'contact' => Contact::class,
52
        'location' => Location::class,
53
        'venue' => Venue::class,
54
        'poll' => Poll::class,
55
        'dice' => Dice::class,
56
        'new_chat_members' => ArrayOfUser::class,
57
        'left_chat_member' => User::class,
58
        'new_chat_title' => true,
59
        'new_chat_photo' => ArrayOfPhotoSize::class,
60
        'delete_chat_photo' => true,
61
        'group_chat_created' => true,
62
        'supergroup_chat_created' => true,
63
        'channel_chat_created' => true,
64
        'migrate_to_chat_id' => true,
65
        'migrate_from_chat_id' => true,
66
        'pinned_message' => Message::class,
67
        'invoice' => Invoice::class,
68
        'successful_payment' => SuccessfulPayment::class,
69
        'connected_website' => true,
70
        'reply_markup' => InlineKeyboardMarkup::class,
71
    ];
72
73
    /**
74
     * Unique message identifier
75
     *
76
     * @var int
77
     */
78
    protected $messageId;
79
80
    /**
81
     * Optional. Sender name. Can be empty for messages sent to channels
82
     *
83
     * @var \TelegramBot\Api\Types\User
84
     */
85
    protected $from;
86
87
    /**
88
     * Date the message was sent in Unix time
89
     *
90
     * @var int
91
     */
92
    protected $date;
93
94
    /**
95
     * Conversation the message belongs to — user in case of a private message, GroupChat in case of a group
96
     *
97
     * @var \TelegramBot\Api\Types\Chat
98
     */
99
    protected $chat;
100
101
    /**
102
     * Optional. For forwarded messages, sender of the original message
103
     *
104
     * @var \TelegramBot\Api\Types\User
105
     */
106
    protected $forwardFrom;
107
108
    /**
109
     * Optional. For messages forwarded from channels, information about
110
     * the original channel
111
     *
112
     * @var \TelegramBot\Api\Types\Chat
113
     */
114
    protected $forwardFromChat;
115
116
    /**
117
     * Optional. For messages forwarded from channels, identifier of
118
     * the original message in the channel
119
     *
120
     * @var int
121
     */
122
    protected $forwardFromMessageId;
123
124
    /**
125
     * Optional. For messages forwarded from channels, signature of the post author if present
126
     *
127
     * @var string
128
     */
129
    protected $forwardSignature;
130
131
    /**
132
     * Optional. Sender's name for messages forwarded from users who disallow adding a link to their account
133
     * in forwarded messages
134
     *
135
     * @var string
136
     */
137
    protected $forwardSenderName;
138
139
    /**
140
     * Optional. For forwarded messages, date the original message was sent in Unix time
141
     *
142
     * @var int
143
     */
144
    protected $forwardDate;
145
146
    /**
147
     * Optional. For replies, the original message. Note that the Message object in this field will not contain further
148
     * reply_to_message fields even if it itself is a reply.
149
     *
150
     * @var \TelegramBot\Api\Types\Message
151
     */
152
    protected $replyToMessage;
153
154
    /**
155
     * Optional. Date the message was last edited in Unix time
156
     *
157
     * @var int
158
     */
159
    protected $editDate;
160
161
    /**
162
     * Optional. The unique identifier of a media message group
163
     * this message belongs to
164
     *
165
     * @var int
166
     */
167
    protected $mediaGroupId;
168
169
    /**
170
     * Optional. Signature of the post author for messages in channels
171
     *
172
     * @var string
173
     */
174
    protected $authorSignature;
175
176
    /**
177
     * Optional. For text messages, the actual UTF-8 text of the message
178
     *
179
     * @var string
180
     */
181
    protected $text;
182
183
    /**
184
     * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.
185
     * array of \TelegramBot\Api\Types\MessageEntity
186
     *
187
     * @var array
188
     */
189
    protected $entities;
190
191
    /**
192
     * Optional. For messages with a caption, special entities like usernames,
193
     * URLs, bot commands, etc. that appear in the caption
194
     *
195
     * @var ArrayOfMessageEntity
196
     */
197
    protected $captionEntities;
198
199
    /**
200
     * Optional. Message is an audio file, information about the file
201
     *
202
     * @var \TelegramBot\Api\Types\Audio
203
     */
204
    protected $audio;
205
206
    /**
207
     * Optional. Message is a general file, information about the file
208
     *
209
     * @var \TelegramBot\Api\Types\Document
210
     */
211
    protected $document;
212
213
    /**
214
     * Optional. Message is a animation, information about the animation
215
     *
216
     * @var \TelegramBot\Api\Types\Animation
217
     */
218
    protected $animation;
219
220
    /**
221
     * Optional. Message is a photo, available sizes of the photo
222
     * array of \TelegramBot\Api\Types\Photo
223
     *
224
     * @var array
225
     */
226
    protected $photo;
227
228
    /**
229
     * Optional. Message is a sticker, information about the sticker
230
     *
231
     * @var \TelegramBot\Api\Types\Sticker
232
     */
233
    protected $sticker;
234
235
    /**
236
     * Optional. Message is a video, information about the video
237
     *
238
     * @var \TelegramBot\Api\Types\Video
239
     */
240
    protected $video;
241
242
    /**
243
     * Optional. Message is a voice message, information about the file
244
     *
245
     * @var \TelegramBot\Api\Types\Voice
246
     */
247
    protected $voice;
248
249
    /**
250
     * Optional. Text description of the video (usually empty)
251
     *
252
     * @var string
253
     */
254
    protected $caption;
255
256
    /**
257
     * Optional. Message is a shared contact, information about the contact
258
     *
259
     * @var \TelegramBot\Api\Types\Contact
260
     */
261
    protected $contact;
262
263
    /**
264
     * Optional. Message is a shared location, information about the location
265
     *
266
     * @var \TelegramBot\Api\Types\Location
267
     */
268
    protected $location;
269
270
    /**
271
     * Optional. Message is a venue, information about the venue
272
     *
273
     * @var \TelegramBot\Api\Types\Venue
274
     */
275
    protected $venue;
276
277
    /**
278
     * Optional. Message is a native poll, information about the poll
279
     *
280
     * @var \TelegramBot\Api\Types\Poll
281
     */
282
    protected $poll;
283
284
    /**
285
     * Optional. Message is a dice with random value from 1 to 6
286
     *
287
     * @var \TelegramBot\Api\Types\Dice
288
     */
289
    protected $dice;
290
291
    /**
292
     * Optional. New members that were added to the group or supergroup and information about them
293
     * (the bot itself may be one of these members)
294
     * array of \TelegramBot\Api\Types\User
295
     *
296
     * @var array
297
     */
298
    protected $newChatMembers;
299
300
    /**
301
     * Optional. A member was removed from the group, information about them (this member may be bot itself)
302
     *
303
     * @var \TelegramBot\Api\Types\User
304
     */
305
    protected $leftChatMember;
306
307
    /**
308
     * Optional. A group title was changed to this value
309
     *
310
     * @var string
311
     */
312
    protected $newChatTitle;
313
314
    /**
315
     * Optional. A group photo was change to this value
316
     *
317
     * @var mixed
318
     */
319
    protected $newChatPhoto;
320
321
    /**
322
     * Optional. Informs that the group photo was deleted
323
     *
324
     * @var bool
325
     */
326
    protected $deleteChatPhoto;
327
328
    /**
329
     * Optional. Informs that the group has been created
330
     *
331
     * @var bool
332
     */
333
    protected $groupChatCreated;
334
335
    /**
336
     * Optional. Service message: the supergroup has been created
337
     *
338
     * @var bool
339
     */
340
    protected $supergroupChatCreated;
341
342
    /**
343
     * Optional. Service message: the channel has been created
344
     *
345
     * @var bool
346
     */
347
    protected $channelChatCreated;
348
349
    /**
350
     * Optional. The group has been migrated to a supergroup with the specified identifier,
351
     * not exceeding 1e13 by absolute value
352
     *
353
     * @var int
354
     */
355
    protected $migrateToChatId;
356
357
    /**
358
     * Optional. The supergroup has been migrated from a group with the specified identifier,
359
     * not exceeding 1e13 by absolute value
360
     *
361
     * @var int
362
     */
363
    protected $migrateFromChatId;
364
365
    /**
366
     * Optional. Specified message was pinned.Note that the Message object in this field
367
     * will not contain further reply_to_message fields even if it is itself a reply.
368
     *
369
     * @var Message
370
     */
371
    protected $pinnedMessage;
372
373
    /**
374
     * Optional. Message is an invoice for a payment, information about the invoice.
375
     *
376
     * @var Invoice
377
     */
378
    protected $invoice;
379
380
    /**
381
     * Optional. Message is a service message about a successful payment, information about the payment.
382
     *
383
     * @var SuccessfulPayment
384
     */
385
    protected $successfulPayment;
386
387
    /**
388
     * Optional. The domain name of the website on which the user has logged in.
389
     *
390
     * @var string
391
     */
392
    protected $connectedWebsite;
393
394
    /**
395
     * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
396
     *
397
     * @var InlineKeyboardMarkup
398
     */
399
    protected $replyMarkup;
400
401
    /**
402
     * @return int
403
     */
404 1
    public function getMessageId()
405
    {
406 1
        return $this->messageId;
407
    }
408
409
    /**
410
     * @param int $messageId
411
     *
412
     * @throws InvalidArgumentException
413
     */
414 15
    public function setMessageId($messageId)
415
    {
416 15
        if (is_integer($messageId) || is_float($messageId)) {
417 14
            $this->messageId = $messageId;
0 ignored issues
show
Documentation Bug introduced by
It seems like $messageId can also be of type double. However, the property $messageId is declared as type integer. Maybe add an additional type check?

Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a mixed type is assigned to a property that is type hinted more strictly.

For example, imagine you have a variable $accountId that can either hold an Id object or false (if there is no account id yet). Your code now assigns that value to the id property of an instance of the Account class. This class holds a proper account, so the id value must no longer be false.

Either this assignment is in error or a type check should be added for that assignment.

class Id
{
    public $id;

    public function __construct($id)
    {
        $this->id = $id;
    }

}

class Account
{
    /** @var  Id $id */
    public $id;
}

$account_id = false;

if (starsAreRight()) {
    $account_id = new Id(42);
}

$account = new Account();
if ($account instanceof Id)
{
    $account->id = $account_id;
}
Loading history...
418 14
        } else {
419 1
            throw new InvalidArgumentException();
420
        }
421 14
    }
422
423
    /**
424
     * @return User
425
     */
426 1
    public function getFrom()
427
    {
428 1
        return $this->from;
429
    }
430
431
    /**
432
     * @param User $from
433
     */
434 13
    public function setFrom(User $from)
435
    {
436 13
        $this->from = $from;
437 13
    }
438
439
    /**
440
     * @return Chat
441
     */
442 2
    public function getChat()
443
    {
444 2
        return $this->chat;
445
    }
446
447
    /**
448
     * @param Chat $chat
449
     */
450 15
    public function setChat(Chat $chat)
451
    {
452 15
        $this->chat = $chat;
453 15
    }
454
455
    /**
456
     * @return int
457
     */
458 1
    public function getDate()
459
    {
460 1
        return $this->date;
461
    }
462
463
    /**
464
     * @param int $date
465
     *
466
     * @throws InvalidArgumentException
467
     */
468 14
    public function setDate($date)
469
    {
470 14
        if (is_int($date)) {
471 13
            $this->date = $date;
472 13
        } else {
473 1
            throw new InvalidArgumentException();
474
        }
475 13
    }
476
477
    /**
478
     * @return User
479
     */
480 1
    public function getForwardFrom()
481
    {
482 1
        return $this->forwardFrom;
483
    }
484
485
    /**
486
     * @param User $forwardFrom
487
     */
488 2
    public function setForwardFrom(User $forwardFrom)
489
    {
490 2
        $this->forwardFrom = $forwardFrom;
491 2
    }
492
493
    /**
494
     * @return Chat
495
     */
496
    public function getForwardFromChat()
497
    {
498
        return $this->forwardFromChat;
499
    }
500
501
    /**
502
     * @param Chat $forwardFromChat
503
     */
504
    public function setForwardFromChat(Chat $forwardFromChat)
505
    {
506
        $this->forwardFromChat = $forwardFromChat;
507
    }
508
509
    /**
510
     * @return int
511
     */
512
    public function getForwardFromMessageId()
513
    {
514
        return $this->forwardFromMessageId;
515
    }
516
517
    /**
518
     * @param int $forwardFromMessageId
519
     */
520
    public function setForwardFromMessageId($forwardFromMessageId)
521
    {
522
        $this->forwardFromMessageId = $forwardFromMessageId;
523
    }
524
525
    /**
526
     * @return string
527
     */
528
    public function getForwardSignature()
529
    {
530
        return $this->forwardSignature;
531
    }
532
533
    /**
534
     * @param string $forwardSignature
535
     */
536
    public function setForwardSignature($forwardSignature)
537
    {
538
        $this->forwardSignature = $forwardSignature;
539
    }
540
541
    /**
542
     * @return string
543
     */
544
    public function getForwardSenderName()
545
    {
546
        return $this->forwardSenderName;
547
    }
548
549
    /**
550
     * @param string $forwardSenderName
551
     */
552
    public function setForwardSenderName($forwardSenderName)
553
    {
554
        $this->forwardSenderName = $forwardSenderName;
555
    }
556
557
    /**
558
     * @return int
559
     */
560 1
    public function getForwardDate()
561
    {
562 1
        return $this->forwardDate;
563
    }
564
565
    /**
566
     * @param int $forwardDate
567
     *
568
     * @throws InvalidArgumentException
569
     */
570 3
    public function setForwardDate($forwardDate)
571
    {
572 3
        if (is_int($forwardDate)) {
573 2
            $this->forwardDate = $forwardDate;
574 2
        } else {
575 1
            throw new InvalidArgumentException();
576
        }
577 2
    }
578
579
    /**
580
     * @return Message
581
     */
582 1
    public function getReplyToMessage()
583
    {
584 1
        return $this->replyToMessage;
585
    }
586
587
    /**
588
     * @param Message $replyToMessage
589
     */
590 2
    public function setReplyToMessage(Message $replyToMessage)
591
    {
592 2
        $this->replyToMessage = $replyToMessage;
593 2
    }
594
595
    /**
596
     * @return int
597
     */
598
    public function getEditDate()
599
    {
600
        return $this->editDate;
601
    }
602
603
    /**
604
     * @param int $editDate
605
     *
606
     * @throws InvalidArgumentException
607
     */
608
    public function setEditDate($editDate)
609
    {
610
        if (is_int($editDate)) {
611
            $this->editDate = $editDate;
612
        } else {
613
            throw new InvalidArgumentException();
614
        }
615
    }
616
617
    /**
618
     * @return int
619
     */
620
    public function getMediaGroupId()
621
    {
622
        return $this->mediaGroupId;
623
    }
624
625
    /**
626
     * @param int $mediaGroupId
627
     */
628
    public function setMediaGroupId($mediaGroupId)
629
    {
630
        $this->mediaGroupId = $mediaGroupId;
631
    }
632
633
    /**
634
     * @return string
635
     */
636
    public function getAuthorSignature()
637
    {
638
        return $this->authorSignature;
639
    }
640
641
    /**
642
     * @param string $authorSignature
643
     */
644
    public function setAuthorSignature($authorSignature)
645
    {
646
        $this->authorSignature = $authorSignature;
647
    }
648
649
    /**
650
     * @return string
651
     */
652 7
    public function getText()
653
    {
654 7
        return $this->text;
655
    }
656
657
    /**
658
     * @param string $text
659
     */
660 5
    public function setText($text)
661
    {
662 5
        $this->text = $text;
663 5
    }
664
665
    /**
666
     * @return array
667
     */
668
    public function getEntities()
669
    {
670
        return $this->entities;
671
    }
672
673
    /**
674
     * @param array $entities
675
     */
676 1
    public function setEntities($entities)
677
    {
678 1
        $this->entities = $entities;
679 1
    }
680
681
    /**
682
     * @return ArrayOfMessageEntity
683
     */
684
    public function getCaptionEntities()
685
    {
686
        return $this->captionEntities;
687
    }
688
689
    /**
690
     * @param ArrayOfMessageEntity $captionEntities
691
     */
692
    public function setCaptionEntities($captionEntities)
693
    {
694
        $this->captionEntities = $captionEntities;
695
    }
696
697
    /**
698
     * @return Audio
699
     */
700 1
    public function getAudio()
701
    {
702 1
        return $this->audio;
703
    }
704
705
    /**
706
     * @param Audio $audio
707
     */
708 2
    public function setAudio(Audio $audio)
709
    {
710 2
        $this->audio = $audio;
711 2
    }
712
713
    /**
714
     * @return Document
715
     */
716 1
    public function getDocument()
717
    {
718 1
        return $this->document;
719
    }
720
721
    /**
722
     * @param Document $document
723
     */
724 2
    public function setDocument($document)
725
    {
726 2
        $this->document = $document;
727 2
    }
728
729
    /**
730
     * @return Animation
731
     */
732
    public function getAnimation()
733
    {
734
        return $this->animation;
735
    }
736
737
    /**
738
     * @param Animation $animation
739
     */
740
    public function setAnimation(Animation $animation)
741
    {
742
        $this->animation = $animation;
743
    }
744
745
    /**
746
     * @return array
747
     */
748 1
    public function getPhoto()
749
    {
750 1
        return $this->photo;
751
    }
752
753
    /**
754
     * @param array $photo
755
     */
756 2
    public function setPhoto(array $photo)
757
    {
758 2
        $this->photo = $photo;
759 2
    }
760
761
    /**
762
     * @return Sticker
763
     */
764 1
    public function getSticker()
765
    {
766 1
        return $this->sticker;
767
    }
768
769
    /**
770
     * @param Sticker $sticker
771
     */
772 2
    public function setSticker(Sticker $sticker)
773
    {
774 2
        $this->sticker = $sticker;
775 2
    }
776
777
    /**
778
     * @return Video
779
     */
780 1
    public function getVideo()
781
    {
782 1
        return $this->video;
783
    }
784
785
    /**
786
     * @param Video $video
787
     */
788 2
    public function setVideo(Video $video)
789
    {
790 2
        $this->video = $video;
791 2
    }
792
793
    /**
794
     * @return Voice
795
     */
796 1
    public function getVoice()
797
    {
798 1
        return $this->voice;
799
    }
800
801
    /**
802
     * @param Voice $voice
803
     */
804 2
    public function setVoice($voice)
805
    {
806 2
        $this->voice = $voice;
807 2
    }
808
809
    /**
810
     * @return string
811
     */
812 1
    public function getCaption()
813
    {
814 1
        return $this->caption;
815
    }
816
817
    /**
818
     * @param string $caption
819
     */
820 2
    public function setCaption($caption)
821
    {
822 2
        $this->caption = $caption;
823 2
    }
824
825
    /**
826
     * @return Contact
827
     */
828 1
    public function getContact()
829
    {
830 1
        return $this->contact;
831
    }
832
833
    /**
834
     * @param Contact $contact
835
     */
836 2
    public function setContact(Contact $contact)
837
    {
838 2
        $this->contact = $contact;
839 2
    }
840
841
    /**
842
     * @return Location
843
     */
844 1
    public function getLocation()
845
    {
846 1
        return $this->location;
847
    }
848
849
    /**
850
     * @param Location $location
851
     */
852 2
    public function setLocation(Location $location)
853
    {
854 2
        $this->location = $location;
855 2
    }
856
857
    /**
858
     * @return Venue
859
     */
860
    public function getVenue()
861
    {
862
        return $this->venue;
863
    }
864
865
    /**
866
     * @param Venue $venue
867
     */
868
    public function setVenue($venue)
869
    {
870
        $this->venue = $venue;
871
    }
872
873
    /**
874
     * @return Poll
875
     */
876
    public function getPoll()
877
    {
878
        return $this->poll;
879
    }
880
881
    /**
882
     * @param Poll $poll
883
     */
884
    public function setPoll($poll)
885
    {
886
        $this->poll = $poll;
887
    }
888
889
    /**
890
     * @return Dice
891
     */
892
    public function getDice()
893
    {
894
        return $this->dice;
895
    }
896
897
    /**
898
     * @param Dice $dice
899
     */
900
    public function setDice(Dice $dice)
901
    {
902
        $this->dice = $dice;
903
    }
904
905
    /**
906
     * @return array
907
     */
908 1
    public function getNewChatMembers()
909
    {
910 1
        return $this->newChatMembers;
911
    }
912
913
    /**
914
     * @param array $newChatMembers
915
     */
916 2
    public function setNewChatMembers($newChatMembers)
917
    {
918 2
        $this->newChatMembers = $newChatMembers;
919 2
    }
920
921
    /**
922
     * @return User
923
     */
924 1
    public function getLeftChatMember()
925
    {
926 1
        return $this->leftChatMember;
927
    }
928
929
    /**
930
     * @param User $leftChatMember
931
     */
932 2
    public function setLeftChatMember($leftChatMember)
933
    {
934 2
        $this->leftChatMember = $leftChatMember;
935 2
    }
936
937
    /**
938
     * @return string
939
     */
940 1
    public function getNewChatTitle()
941
    {
942 1
        return $this->newChatTitle;
943
    }
944
945
    /**
946
     * @param string $newChatTitle
947
     */
948 2
    public function setNewChatTitle($newChatTitle)
949
    {
950 2
        $this->newChatTitle = $newChatTitle;
951 2
    }
952
953
    /**
954
     * @return array
955
     */
956 1
    public function getNewChatPhoto()
957
    {
958 1
        return $this->newChatPhoto;
959
    }
960
961
    /**
962
     * @param array $newChatPhoto
963
     */
964 2
    public function setNewChatPhoto($newChatPhoto)
965
    {
966 2
        $this->newChatPhoto = $newChatPhoto;
967 2
    }
968
969
    /**
970
     * @return boolean
971
     */
972 1
    public function isDeleteChatPhoto()
973
    {
974 1
        return $this->deleteChatPhoto;
975
    }
976
977
    /**
978
     * @param boolean $deleteChatPhoto
979
     */
980 2
    public function setDeleteChatPhoto($deleteChatPhoto)
981
    {
982 2
        $this->deleteChatPhoto = (bool)$deleteChatPhoto;
983 2
    }
984
985
    /**
986
     * @return boolean
987
     */
988 1
    public function isGroupChatCreated()
989
    {
990 1
        return $this->groupChatCreated;
991
    }
992
993
    /**
994
     * @param boolean $groupChatCreated
995
     */
996 2
    public function setGroupChatCreated($groupChatCreated)
997
    {
998 2
        $this->groupChatCreated = (bool)$groupChatCreated;
999 2
    }
1000
1001
    /**
1002
     * @return boolean
1003
     */
1004 1
    public function isSupergroupChatCreated()
1005
    {
1006 1
        return $this->supergroupChatCreated;
1007
    }
1008
1009
    /**
1010
     * @param boolean $supergroupChatCreated
1011
     */
1012 2
    public function setSupergroupChatCreated($supergroupChatCreated)
1013
    {
1014 2
        $this->supergroupChatCreated = $supergroupChatCreated;
1015 2
    }
1016
1017
    /**
1018
     * @return boolean
1019
     */
1020 1
    public function isChannelChatCreated()
1021
    {
1022 1
        return $this->channelChatCreated;
1023
    }
1024
1025
    /**
1026
     * @param boolean $channelChatCreated
1027
     */
1028 2
    public function setChannelChatCreated($channelChatCreated)
1029
    {
1030 2
        $this->channelChatCreated = $channelChatCreated;
1031 2
    }
1032
1033
    /**
1034
     * @return int
1035
     */
1036 1
    public function getMigrateToChatId()
1037
    {
1038 1
        return $this->migrateToChatId;
1039
    }
1040
1041
    /**
1042
     * @param int $migrateToChatId
1043
     */
1044 2
    public function setMigrateToChatId($migrateToChatId)
1045
    {
1046 2
        $this->migrateToChatId = $migrateToChatId;
1047 2
    }
1048
1049
    /**
1050
     * @return int
1051
     */
1052 1
    public function getMigrateFromChatId()
1053
    {
1054 1
        return $this->migrateFromChatId;
1055
    }
1056
1057
    /**
1058
     * @param int $migrateFromChatId
1059
     */
1060 4
    public function setMigrateFromChatId($migrateFromChatId)
1061
    {
1062 4
        $this->migrateFromChatId = $migrateFromChatId;
1063 4
    }
1064
1065
    /**
1066
     * @return Message
1067
     */
1068
    public function getPinnedMessage()
1069
    {
1070
        return $this->pinnedMessage;
1071
    }
1072
1073
    /**
1074
     * @param Message $pinnedMessage
1075
     */
1076
    public function setPinnedMessage($pinnedMessage)
1077
    {
1078
        $this->pinnedMessage = $pinnedMessage;
1079
    }
1080
1081
    /**
1082
     * @author MY
1083
     * @return Invoice
1084
     */
1085
    public function getInvoice()
1086
    {
1087
        return $this->invoice;
1088
    }
1089
1090
    /**
1091
     * @author MY
1092
     * @param Invoice $invoice
1093
     */
1094
    public function setInvoice($invoice)
1095
    {
1096
        $this->invoice = $invoice;
1097
    }
1098
1099
    /**
1100
     * @author MY
1101
     * @return SuccessfulPayment
1102
     */
1103
    public function getSuccessfulPayment()
1104
    {
1105
        return $this->successfulPayment;
1106
    }
1107
1108
    /**
1109
     * @author MY
1110
     * @param SuccessfulPayment $successfulPayment
1111
     */
1112
    public function setSuccessfulPayment($successfulPayment)
1113
    {
1114
        $this->successfulPayment = $successfulPayment;
1115
    }
1116
1117
    /**
1118
     * @return string
1119
     */
1120
    public function getConnectedWebsite()
1121
    {
1122
        return $this->connectedWebsite;
1123
    }
1124
1125
    /**
1126
     * @param string $connectedWebsite
1127
     */
1128
    public function setConnectedWebsite($connectedWebsite)
1129
    {
1130
        $this->connectedWebsite = $connectedWebsite;
1131
    }
1132
1133
    /**
1134
     * @return InlineKeyboardMarkup
1135
     */
1136
    public function getReplyMarkup()
1137
    {
1138
        return $this->replyMarkup;
1139
    }
1140
1141
    /**
1142
     * @param InlineKeyboardMarkup $replyMarkup
1143
     */
1144
    public function setReplyMarkup($replyMarkup)
1145
    {
1146
        $this->replyMarkup = $replyMarkup;
1147
    }
1148
}
1149