Test Failed
Pull Request — master (#324)
by
unknown
03:27
created

Message::isSupergroupChatCreated()   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
        'via_bot' => User::class,
38
        'edit_date' => true,
39
        'media_group_id' => true,
40
        'author_signature' => true,
41
        'text' => true,
42
        'entities' => ArrayOfMessageEntity::class,
43
        'caption_entities' => ArrayOfMessageEntity::class,
44
        'audio' => Audio::class,
45
        'document' => Document::class,
46
        'animation' => Animation::class,
47
        'photo' => ArrayOfPhotoSize::class,
48
        'sticker' => Sticker::class,
49
        'video' => Video::class,
50
        'voice' => Voice::class,
51
        'caption' => true,
52
        'contact' => Contact::class,
53
        'location' => Location::class,
54
        'venue' => Venue::class,
55
        'poll' => Poll::class,
56
        'dice' => Dice::class,
57
        'new_chat_members' => ArrayOfUser::class,
58
        'left_chat_member' => User::class,
59
        'new_chat_title' => true,
60
        'new_chat_photo' => ArrayOfPhotoSize::class,
61
        'delete_chat_photo' => true,
62
        'group_chat_created' => true,
63
        'supergroup_chat_created' => true,
64
        'channel_chat_created' => true,
65
        'migrate_to_chat_id' => true,
66
        'migrate_from_chat_id' => true,
67
        'pinned_message' => Message::class,
68
        'invoice' => Invoice::class,
69
        'successful_payment' => SuccessfulPayment::class,
70
        'connected_website' => true,
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. Bot through which the message was sent.
156
     *
157
     * @var \TelegramBot\Api\Types\User
158
     */
159
    protected $via_bot;
160
161
    /**
162
     * Optional. Date the message was last edited in Unix time
163
     *
164
     * @var int
165
     */
166
    protected $editDate;
167
168
    /**
169
     * Optional. The unique identifier of a media message group
170
     * this message belongs to
171
     *
172
     * @var int
173
     */
174
    protected $mediaGroupId;
175
176
    /**
177
     * Optional. Signature of the post author for messages in channels
178
     *
179
     * @var string
180
     */
181
    protected $authorSignature;
182
183
    /**
184
     * Optional. For text messages, the actual UTF-8 text of the message
185
     *
186
     * @var string
187
     */
188
    protected $text;
189
190
    /**
191
     * Optional. For text messages, special entities like usernames, URLs, bot commands, etc. that appear in the text.
192
     * array of \TelegramBot\Api\Types\MessageEntity
193
     *
194
     * @var array
195
     */
196
    protected $entities;
197
198
    /**
199
     * Optional. For messages with a caption, special entities like usernames,
200
     * URLs, bot commands, etc. that appear in the caption
201
     *
202
     * @var ArrayOfMessageEntity
203
     */
204
    protected $captionEntities;
205
206
    /**
207
     * Optional. Message is an audio file, information about the file
208
     *
209
     * @var \TelegramBot\Api\Types\Audio
210
     */
211
    protected $audio;
212
213
    /**
214
     * Optional. Message is a general file, information about the file
215
     *
216
     * @var \TelegramBot\Api\Types\Document
217
     */
218
    protected $document;
219
220
    /**
221
     * Optional. Message is a animation, information about the animation
222
     *
223
     * @var \TelegramBot\Api\Types\Animation
224
     */
225
    protected $animation;
226
227
    /**
228
     * Optional. Message is a photo, available sizes of the photo
229
     * array of \TelegramBot\Api\Types\Photo
230
     *
231
     * @var array
232
     */
233
    protected $photo;
234
235
    /**
236
     * Optional. Message is a sticker, information about the sticker
237
     *
238
     * @var \TelegramBot\Api\Types\Sticker
239
     */
240
    protected $sticker;
241
242
    /**
243
     * Optional. Message is a video, information about the video
244
     *
245
     * @var \TelegramBot\Api\Types\Video
246
     */
247
    protected $video;
248
249
    /**
250
     * Optional. Message is a voice message, information about the file
251
     *
252
     * @var \TelegramBot\Api\Types\Voice
253
     */
254
    protected $voice;
255
256
    /**
257
     * Optional. Text description of the video (usually empty)
258
     *
259
     * @var string
260
     */
261
    protected $caption;
262
263
    /**
264
     * Optional. Message is a shared contact, information about the contact
265
     *
266
     * @var \TelegramBot\Api\Types\Contact
267
     */
268
    protected $contact;
269
270
    /**
271
     * Optional. Message is a shared location, information about the location
272
     *
273
     * @var \TelegramBot\Api\Types\Location
274
     */
275
    protected $location;
276
277
    /**
278
     * Optional. Message is a venue, information about the venue
279
     *
280
     * @var \TelegramBot\Api\Types\Venue
281
     */
282
    protected $venue;
283
284
    /**
285
     * Optional. Message is a native poll, information about the poll
286
     *
287
     * @var \TelegramBot\Api\Types\Poll
288
     */
289
    protected $poll;
290
291
    /**
292
     * Optional. Message is a dice with random value from 1 to 6
293
     *
294
     * @var \TelegramBot\Api\Types\Dice
295
     */
296
    protected $dice;
297
298
    /**
299
     * Optional. New members that were added to the group or supergroup and information about them
300
     * (the bot itself may be one of these members)
301
     * array of \TelegramBot\Api\Types\User
302
     *
303
     * @var array
304
     */
305
    protected $newChatMembers;
306
307
    /**
308
     * Optional. A member was removed from the group, information about them (this member may be bot itself)
309
     *
310
     * @var \TelegramBot\Api\Types\User
311
     */
312
    protected $leftChatMember;
313
314
    /**
315
     * Optional. A group title was changed to this value
316
     *
317
     * @var string
318
     */
319
    protected $newChatTitle;
320
321
    /**
322
     * Optional. A group photo was change to this value
323
     *
324
     * @var mixed
325
     */
326
    protected $newChatPhoto;
327
328
    /**
329
     * Optional. Informs that the group photo was deleted
330
     *
331
     * @var bool
332
     */
333
    protected $deleteChatPhoto;
334
335
    /**
336
     * Optional. Informs that the group has been created
337
     *
338
     * @var bool
339
     */
340
    protected $groupChatCreated;
341
342
    /**
343
     * Optional. Service message: the supergroup has been created
344
     *
345
     * @var bool
346
     */
347
    protected $supergroupChatCreated;
348
349
    /**
350
     * Optional. Service message: the channel has been created
351
     *
352
     * @var bool
353
     */
354
    protected $channelChatCreated;
355
356
    /**
357
     * Optional. The group has been migrated to a supergroup with the specified identifier,
358
     * not exceeding 1e13 by absolute value
359
     *
360
     * @var int
361
     */
362
    protected $migrateToChatId;
363
364
    /**
365
     * Optional. The supergroup has been migrated from a group with the specified identifier,
366
     * not exceeding 1e13 by absolute value
367
     *
368
     * @var int
369
     */
370
    protected $migrateFromChatId;
371
372
    /**
373
     * Optional. Specified message was pinned.Note that the Message object in this field
374
     * will not contain further reply_to_message fields even if it is itself a reply.
375
     *
376
     * @var Message
377
     */
378
    protected $pinnedMessage;
379
380
    /**
381
     * Optional. Message is an invoice for a payment, information about the invoice.
382
     *
383
     * @var Invoice
384
     */
385
    protected $invoice;
386
387
    /**
388
     * Optional. Message is a service message about a successful payment, information about the payment.
389
     *
390
     * @var SuccessfulPayment
391
     */
392
    protected $successfulPayment;
393
394
    /**
395
     * Optional. The domain name of the website on which the user has logged in.
396
     *
397
     * @var string
398
     */
399
    protected $connectedWebsite;
400
401
    /**
402
     * Optional. Inline keyboard attached to the message. login_url buttons are represented as ordinary url buttons.
403
     *
404
     * @var InlineKeyboardMarkup
405
     */
406
    protected $replyMarkup;
407
408
    /**
409
     * @return int
410
     */
411 1
    public function getMessageId()
412
    {
413 1
        return $this->messageId;
414
    }
415
416
    /**
417
     * @param int $messageId
418
     *
419
     * @throws InvalidArgumentException
420
     */
421 15
    public function setMessageId($messageId)
422
    {
423 15
        if (is_integer($messageId) || is_float($messageId)) {
424 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...
425 14
        } else {
426 1
            throw new InvalidArgumentException();
427
        }
428 14
    }
429
430
    /**
431
     * @return User
432
     */
433 1
    public function getFrom()
434
    {
435 1
        return $this->from;
436
    }
437
438
    /**
439
     * @param User $from
440
     */
441 13
    public function setFrom(User $from)
442
    {
443 13
        $this->from = $from;
444 13
    }
445
446
    /**
447
     * @return Chat
448
     */
449 2
    public function getChat()
450
    {
451 2
        return $this->chat;
452
    }
453
454
    /**
455
     * @param Chat $chat
456
     */
457 15
    public function setChat(Chat $chat)
458
    {
459 15
        $this->chat = $chat;
460 15
    }
461
462
    /**
463
     * @return int
464
     */
465 1
    public function getDate()
466
    {
467 1
        return $this->date;
468
    }
469
470
    /**
471
     * @param int $date
472
     *
473
     * @throws InvalidArgumentException
474
     */
475 14
    public function setDate($date)
476
    {
477 14
        if (is_int($date)) {
478 13
            $this->date = $date;
479 13
        } else {
480 1
            throw new InvalidArgumentException();
481
        }
482 13
    }
483
484
    /**
485
     * @return User
486
     */
487 1
    public function getForwardFrom()
488
    {
489 1
        return $this->forwardFrom;
490
    }
491
492
    /**
493
     * @param User $forwardFrom
494
     */
495 2
    public function setForwardFrom(User $forwardFrom)
496
    {
497 2
        $this->forwardFrom = $forwardFrom;
498 2
    }
499
500
    /**
501
     * @return Chat
502
     */
503
    public function getForwardFromChat()
504
    {
505
        return $this->forwardFromChat;
506
    }
507
508
    /**
509
     * @param Chat $forwardFromChat
510
     */
511
    public function setForwardFromChat(Chat $forwardFromChat)
512
    {
513
        $this->forwardFromChat = $forwardFromChat;
514
    }
515
516
    /**
517
     * @return int
518
     */
519
    public function getForwardFromMessageId()
520
    {
521
        return $this->forwardFromMessageId;
522
    }
523
524
    /**
525
     * @param int $forwardFromMessageId
526
     */
527
    public function setForwardFromMessageId($forwardFromMessageId)
528
    {
529
        $this->forwardFromMessageId = $forwardFromMessageId;
530
    }
531
532
    /**
533
     * @return string
534
     */
535
    public function getForwardSignature()
536
    {
537
        return $this->forwardSignature;
538
    }
539
540
    /**
541
     * @param string $forwardSignature
542
     */
543
    public function setForwardSignature($forwardSignature)
544
    {
545
        $this->forwardSignature = $forwardSignature;
546
    }
547
548
    /**
549
     * @return string
550
     */
551
    public function getForwardSenderName()
552
    {
553
        return $this->forwardSenderName;
554
    }
555
556
    /**
557
     * @param string $forwardSenderName
558
     */
559
    public function setForwardSenderName($forwardSenderName)
560
    {
561
        $this->forwardSenderName = $forwardSenderName;
562
    }
563
564
    /**
565
     * @return int
566
     */
567 1
    public function getForwardDate()
568
    {
569 1
        return $this->forwardDate;
570
    }
571
572
    /**
573
     * @param int $forwardDate
574
     *
575
     * @throws InvalidArgumentException
576
     */
577 3
    public function setForwardDate($forwardDate)
578
    {
579 3
        if (is_int($forwardDate)) {
580 2
            $this->forwardDate = $forwardDate;
581 2
        } else {
582 1
            throw new InvalidArgumentException();
583
        }
584 2
    }
585
586
    /**
587
     * @return Message
588
     */
589 1
    public function getReplyToMessage()
590
    {
591 1
        return $this->replyToMessage;
592
    }
593
594
    /**
595
     * @param Message $replyToMessage
596
     */
597 2
    public function setReplyToMessage(Message $replyToMessage)
598
    {
599 2
        $this->replyToMessage = $replyToMessage;
600 2
    }
601
602
    /**
603
     * @return User
604
     */
605
    public function getViaBot()
606
    {
607
        return $this->via_bot;
608
    }
609
610
    /**
611
     * @param User $via_bot
612
     */
613
    public function setViaBot(User $via_bot)
614
    {
615
        $this->via_bot = $via_bot;
616
    }
617
618
    /**
619
     * @return int
620
     */
621
    public function getEditDate()
622
    {
623
        return $this->editDate;
624
    }
625
626
    /**
627
     * @param int $editDate
628
     *
629
     * @throws InvalidArgumentException
630
     */
631
    public function setEditDate($editDate)
632
    {
633
        if (is_int($editDate)) {
634
            $this->editDate = $editDate;
635
        } else {
636
            throw new InvalidArgumentException();
637
        }
638
    }
639
640
    /**
641
     * @return int
642
     */
643
    public function getMediaGroupId()
644
    {
645
        return $this->mediaGroupId;
646
    }
647
648
    /**
649
     * @param int $mediaGroupId
650
     */
651
    public function setMediaGroupId($mediaGroupId)
652
    {
653
        $this->mediaGroupId = $mediaGroupId;
654
    }
655
656
    /**
657
     * @return string
658
     */
659
    public function getAuthorSignature()
660
    {
661
        return $this->authorSignature;
662
    }
663
664
    /**
665
     * @param string $authorSignature
666
     */
667
    public function setAuthorSignature($authorSignature)
668
    {
669
        $this->authorSignature = $authorSignature;
670
    }
671
672
    /**
673
     * @return string
674
     */
675 7
    public function getText()
676
    {
677 7
        return $this->text;
678
    }
679
680
    /**
681
     * @param string $text
682
     */
683 5
    public function setText($text)
684
    {
685 5
        $this->text = $text;
686 5
    }
687
688
    /**
689
     * @return array
690
     */
691
    public function getEntities()
692
    {
693
        return $this->entities;
694
    }
695
696
    /**
697
     * @param array $entities
698
     */
699 1
    public function setEntities($entities)
700
    {
701 1
        $this->entities = $entities;
702 1
    }
703
704
    /**
705
     * @return ArrayOfMessageEntity
706
     */
707
    public function getCaptionEntities()
708
    {
709
        return $this->captionEntities;
710
    }
711
712
    /**
713
     * @param ArrayOfMessageEntity $captionEntities
714
     */
715
    public function setCaptionEntities($captionEntities)
716
    {
717
        $this->captionEntities = $captionEntities;
718
    }
719
720
    /**
721
     * @return Audio
722
     */
723 1
    public function getAudio()
724
    {
725 1
        return $this->audio;
726
    }
727
728
    /**
729
     * @param Audio $audio
730
     */
731 2
    public function setAudio(Audio $audio)
732
    {
733 2
        $this->audio = $audio;
734 2
    }
735
736
    /**
737
     * @return Document
738
     */
739 1
    public function getDocument()
740
    {
741 1
        return $this->document;
742
    }
743
744
    /**
745
     * @param Document $document
746
     */
747 2
    public function setDocument($document)
748
    {
749 2
        $this->document = $document;
750 2
    }
751
752
    /**
753
     * @return Animation
754
     */
755
    public function getAnimation()
756
    {
757
        return $this->animation;
758
    }
759
760
    /**
761
     * @param Animation $animation
762
     */
763
    public function setAnimation(Animation $animation)
764
    {
765
        $this->animation = $animation;
766
    }
767
768
    /**
769
     * @return array
770
     */
771 1
    public function getPhoto()
772
    {
773 1
        return $this->photo;
774
    }
775
776
    /**
777
     * @param array $photo
778
     */
779 2
    public function setPhoto(array $photo)
780
    {
781 2
        $this->photo = $photo;
782 2
    }
783
784
    /**
785
     * @return Sticker
786
     */
787 1
    public function getSticker()
788
    {
789 1
        return $this->sticker;
790
    }
791
792
    /**
793
     * @param Sticker $sticker
794
     */
795 2
    public function setSticker(Sticker $sticker)
796
    {
797 2
        $this->sticker = $sticker;
798 2
    }
799
800
    /**
801
     * @return Video
802
     */
803 1
    public function getVideo()
804
    {
805 1
        return $this->video;
806
    }
807
808
    /**
809
     * @param Video $video
810
     */
811 2
    public function setVideo(Video $video)
812
    {
813 2
        $this->video = $video;
814 2
    }
815
816
    /**
817
     * @return Voice
818
     */
819 1
    public function getVoice()
820
    {
821 1
        return $this->voice;
822
    }
823
824
    /**
825
     * @param Voice $voice
826
     */
827 2
    public function setVoice($voice)
828
    {
829 2
        $this->voice = $voice;
830 2
    }
831
832
    /**
833
     * @return string
834
     */
835 1
    public function getCaption()
836
    {
837 1
        return $this->caption;
838
    }
839
840
    /**
841
     * @param string $caption
842
     */
843 2
    public function setCaption($caption)
844
    {
845 2
        $this->caption = $caption;
846 2
    }
847
848
    /**
849
     * @return Contact
850
     */
851 1
    public function getContact()
852
    {
853 1
        return $this->contact;
854
    }
855
856
    /**
857
     * @param Contact $contact
858
     */
859 2
    public function setContact(Contact $contact)
860
    {
861 2
        $this->contact = $contact;
862 2
    }
863
864
    /**
865
     * @return Location
866
     */
867 1
    public function getLocation()
868
    {
869 1
        return $this->location;
870
    }
871
872
    /**
873
     * @param Location $location
874
     */
875 2
    public function setLocation(Location $location)
876
    {
877 2
        $this->location = $location;
878 2
    }
879
880
    /**
881
     * @return Venue
882
     */
883
    public function getVenue()
884
    {
885
        return $this->venue;
886
    }
887
888
    /**
889
     * @param Venue $venue
890
     */
891
    public function setVenue($venue)
892
    {
893
        $this->venue = $venue;
894
    }
895
896
    /**
897
     * @return Poll
898
     */
899
    public function getPoll()
900
    {
901
        return $this->poll;
902
    }
903
904
    /**
905
     * @param Poll $poll
906
     */
907
    public function setPoll($poll)
908
    {
909
        $this->poll = $poll;
910
    }
911
912
    /**
913
     * @return Dice
914
     */
915 1
    public function getDice()
916
    {
917 1
        return $this->dice;
918
    }
919
920
    /**
921
     * @param Dice $dice
922
     */
923 2
    public function setDice(Dice $dice)
924
    {
925 2
        $this->dice = $dice;
926 2
    }
927
928
    /**
929
     * @return array
930
     */
931 1
    public function getNewChatMembers()
932
    {
933 1
        return $this->newChatMembers;
934
    }
935
936
    /**
937
     * @param array $newChatMembers
938
     */
939 2
    public function setNewChatMembers($newChatMembers)
940
    {
941 2
        $this->newChatMembers = $newChatMembers;
942 2
    }
943
944
    /**
945
     * @return User
946
     */
947 1
    public function getLeftChatMember()
948
    {
949 1
        return $this->leftChatMember;
950
    }
951
952
    /**
953
     * @param User $leftChatMember
954
     */
955 2
    public function setLeftChatMember($leftChatMember)
956
    {
957 2
        $this->leftChatMember = $leftChatMember;
958 2
    }
959
960
    /**
961
     * @return string
962
     */
963 1
    public function getNewChatTitle()
964
    {
965 1
        return $this->newChatTitle;
966
    }
967
968
    /**
969
     * @param string $newChatTitle
970
     */
971 2
    public function setNewChatTitle($newChatTitle)
972
    {
973 2
        $this->newChatTitle = $newChatTitle;
974 2
    }
975
976
    /**
977
     * @return array
978
     */
979 1
    public function getNewChatPhoto()
980
    {
981 1
        return $this->newChatPhoto;
982
    }
983
984
    /**
985
     * @param array $newChatPhoto
986
     */
987 2
    public function setNewChatPhoto($newChatPhoto)
988
    {
989 2
        $this->newChatPhoto = $newChatPhoto;
990 2
    }
991
992
    /**
993
     * @return boolean
994
     */
995 1
    public function isDeleteChatPhoto()
996
    {
997 1
        return $this->deleteChatPhoto;
998
    }
999
1000
    /**
1001
     * @param boolean $deleteChatPhoto
1002
     */
1003 2
    public function setDeleteChatPhoto($deleteChatPhoto)
1004
    {
1005 2
        $this->deleteChatPhoto = (bool)$deleteChatPhoto;
1006 2
    }
1007
1008
    /**
1009
     * @return boolean
1010
     */
1011 1
    public function isGroupChatCreated()
1012
    {
1013 1
        return $this->groupChatCreated;
1014
    }
1015
1016
    /**
1017
     * @param boolean $groupChatCreated
1018
     */
1019 2
    public function setGroupChatCreated($groupChatCreated)
1020
    {
1021 2
        $this->groupChatCreated = (bool)$groupChatCreated;
1022 2
    }
1023
1024
    /**
1025
     * @return boolean
1026
     */
1027 1
    public function isSupergroupChatCreated()
1028
    {
1029 1
        return $this->supergroupChatCreated;
1030
    }
1031
1032
    /**
1033
     * @param boolean $supergroupChatCreated
1034
     */
1035 2
    public function setSupergroupChatCreated($supergroupChatCreated)
1036
    {
1037 2
        $this->supergroupChatCreated = $supergroupChatCreated;
1038 2
    }
1039
1040
    /**
1041
     * @return boolean
1042
     */
1043 1
    public function isChannelChatCreated()
1044
    {
1045 1
        return $this->channelChatCreated;
1046
    }
1047
1048
    /**
1049
     * @param boolean $channelChatCreated
1050
     */
1051 2
    public function setChannelChatCreated($channelChatCreated)
1052
    {
1053 2
        $this->channelChatCreated = $channelChatCreated;
1054 2
    }
1055
1056
    /**
1057
     * @return int
1058
     */
1059 1
    public function getMigrateToChatId()
1060
    {
1061 1
        return $this->migrateToChatId;
1062
    }
1063
1064
    /**
1065
     * @param int $migrateToChatId
1066
     */
1067 2
    public function setMigrateToChatId($migrateToChatId)
1068
    {
1069 2
        $this->migrateToChatId = $migrateToChatId;
1070 2
    }
1071
1072
    /**
1073
     * @return int
1074
     */
1075 1
    public function getMigrateFromChatId()
1076
    {
1077 1
        return $this->migrateFromChatId;
1078
    }
1079
1080
    /**
1081
     * @param int $migrateFromChatId
1082
     */
1083 4
    public function setMigrateFromChatId($migrateFromChatId)
1084
    {
1085 4
        $this->migrateFromChatId = $migrateFromChatId;
1086 4
    }
1087
1088
    /**
1089
     * @return Message
1090
     */
1091
    public function getPinnedMessage()
1092
    {
1093
        return $this->pinnedMessage;
1094
    }
1095
1096
    /**
1097
     * @param Message $pinnedMessage
1098
     */
1099
    public function setPinnedMessage($pinnedMessage)
1100
    {
1101
        $this->pinnedMessage = $pinnedMessage;
1102
    }
1103
1104
    /**
1105
     * @author MY
1106
     * @return Invoice
1107
     */
1108
    public function getInvoice()
1109
    {
1110
        return $this->invoice;
1111
    }
1112
1113
    /**
1114
     * @author MY
1115
     * @param Invoice $invoice
1116
     */
1117
    public function setInvoice($invoice)
1118
    {
1119
        $this->invoice = $invoice;
1120
    }
1121
1122
    /**
1123
     * @author MY
1124
     * @return SuccessfulPayment
1125
     */
1126
    public function getSuccessfulPayment()
1127
    {
1128
        return $this->successfulPayment;
1129
    }
1130
1131
    /**
1132
     * @author MY
1133
     * @param SuccessfulPayment $successfulPayment
1134
     */
1135
    public function setSuccessfulPayment($successfulPayment)
1136
    {
1137
        $this->successfulPayment = $successfulPayment;
1138
    }
1139
1140
    /**
1141
     * @return string
1142
     */
1143
    public function getConnectedWebsite()
1144
    {
1145
        return $this->connectedWebsite;
1146
    }
1147
1148
    /**
1149
     * @param string $connectedWebsite
1150
     */
1151
    public function setConnectedWebsite($connectedWebsite)
1152
    {
1153
        $this->connectedWebsite = $connectedWebsite;
1154
    }
1155
1156
    /**
1157
     * @return InlineKeyboardMarkup
1158
     */
1159
    public function getReplyMarkup()
1160
    {
1161
        return $this->replyMarkup;
1162
    }
1163
1164
    /**
1165
     * @param InlineKeyboardMarkup $replyMarkup
1166
     */
1167
    public function setReplyMarkup($replyMarkup)
1168
    {
1169
        $this->replyMarkup = $replyMarkup;
1170
    }
1171
}
1172