@@ -169,7 +169,7 @@ discard block |
||
169 | 169 | * @param string $action Action to execute |
170 | 170 | * @param array|null $data Data to attach to the execution |
171 | 171 | * |
172 | - * @return mixed Result of the HTTP Request |
|
172 | + * @return string Result of the HTTP Request |
|
173 | 173 | * @throws \Longman\TelegramBot\Exception\TelegramException |
174 | 174 | */ |
175 | 175 | public static function execute($action, array $data = null) |
@@ -358,7 +358,7 @@ discard block |
||
358 | 358 | /** |
359 | 359 | * Get me |
360 | 360 | * |
361 | - * @return mixed |
|
361 | + * @return ServerResponse |
|
362 | 362 | * @throws \Longman\TelegramBot\Exception\TelegramException |
363 | 363 | */ |
364 | 364 | public static function getMe() |
@@ -398,7 +398,7 @@ discard block |
||
398 | 398 | * |
399 | 399 | * @param array $data |
400 | 400 | * |
401 | - * @return mixed |
|
401 | + * @return ServerResponse |
|
402 | 402 | * @throws \Longman\TelegramBot\Exception\TelegramException |
403 | 403 | */ |
404 | 404 | public static function forwardMessage(array $data) |
@@ -412,7 +412,7 @@ discard block |
||
412 | 412 | * @param array $data |
413 | 413 | * @param string $file |
414 | 414 | * |
415 | - * @return mixed |
|
415 | + * @return ServerResponse |
|
416 | 416 | * @throws \Longman\TelegramBot\Exception\TelegramException |
417 | 417 | */ |
418 | 418 | public static function sendPhoto(array $data, $file = null) |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | * @param array $data |
429 | 429 | * @param string $file |
430 | 430 | * |
431 | - * @return mixed |
|
431 | + * @return ServerResponse |
|
432 | 432 | * @throws \Longman\TelegramBot\Exception\TelegramException |
433 | 433 | */ |
434 | 434 | public static function sendAudio(array $data, $file = null) |
@@ -444,7 +444,7 @@ discard block |
||
444 | 444 | * @param array $data |
445 | 445 | * @param string $file |
446 | 446 | * |
447 | - * @return mixed |
|
447 | + * @return ServerResponse |
|
448 | 448 | * @throws \Longman\TelegramBot\Exception\TelegramException |
449 | 449 | */ |
450 | 450 | public static function sendDocument(array $data, $file = null) |
@@ -460,7 +460,7 @@ discard block |
||
460 | 460 | * @param array $data |
461 | 461 | * @param string $file |
462 | 462 | * |
463 | - * @return mixed |
|
463 | + * @return ServerResponse |
|
464 | 464 | * @throws \Longman\TelegramBot\Exception\TelegramException |
465 | 465 | */ |
466 | 466 | public static function sendSticker(array $data, $file = null) |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | * @param array $data |
477 | 477 | * @param string $file |
478 | 478 | * |
479 | - * @return mixed |
|
479 | + * @return ServerResponse |
|
480 | 480 | * @throws \Longman\TelegramBot\Exception\TelegramException |
481 | 481 | */ |
482 | 482 | public static function sendVideo(array $data, $file = null) |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | * @param array $data |
493 | 493 | * @param string $file |
494 | 494 | * |
495 | - * @return mixed |
|
495 | + * @return ServerResponse |
|
496 | 496 | * @throws \Longman\TelegramBot\Exception\TelegramException |
497 | 497 | */ |
498 | 498 | public static function sendVoice(array $data, $file = null) |
@@ -507,7 +507,7 @@ discard block |
||
507 | 507 | * |
508 | 508 | * @param array $data |
509 | 509 | * |
510 | - * @return mixed |
|
510 | + * @return ServerResponse |
|
511 | 511 | * @throws \Longman\TelegramBot\Exception\TelegramException |
512 | 512 | */ |
513 | 513 | public static function sendLocation(array $data) |
@@ -520,7 +520,7 @@ discard block |
||
520 | 520 | * |
521 | 521 | * @param array $data |
522 | 522 | * |
523 | - * @return mixed |
|
523 | + * @return ServerResponse |
|
524 | 524 | * @throws \Longman\TelegramBot\Exception\TelegramException |
525 | 525 | */ |
526 | 526 | public static function sendVenue(array $data) |
@@ -533,7 +533,7 @@ discard block |
||
533 | 533 | * |
534 | 534 | * @param array $data |
535 | 535 | * |
536 | - * @return mixed |
|
536 | + * @return ServerResponse |
|
537 | 537 | * @throws \Longman\TelegramBot\Exception\TelegramException |
538 | 538 | */ |
539 | 539 | public static function sendContact(array $data) |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | * |
547 | 547 | * @param array $data |
548 | 548 | * |
549 | - * @return mixed |
|
549 | + * @return ServerResponse |
|
550 | 550 | * @throws \Longman\TelegramBot\Exception\TelegramException |
551 | 551 | */ |
552 | 552 | public static function sendChatAction(array $data) |
@@ -559,7 +559,7 @@ discard block |
||
559 | 559 | * |
560 | 560 | * @param array $data |
561 | 561 | * |
562 | - * @return mixed |
|
562 | + * @return ServerResponse |
|
563 | 563 | * @throws \Longman\TelegramBot\Exception\TelegramException |
564 | 564 | */ |
565 | 565 | public static function getUserProfilePhotos(array $data) |
@@ -576,7 +576,7 @@ discard block |
||
576 | 576 | * |
577 | 577 | * @param array $data |
578 | 578 | * |
579 | - * @return mixed |
|
579 | + * @return ServerResponse |
|
580 | 580 | * @throws \Longman\TelegramBot\Exception\TelegramException |
581 | 581 | */ |
582 | 582 | public static function getUpdates(array $data) |
@@ -590,7 +590,7 @@ discard block |
||
590 | 590 | * @param string $url |
591 | 591 | * @param string $file |
592 | 592 | * |
593 | - * @return mixed |
|
593 | + * @return ServerResponse |
|
594 | 594 | * @throws \Longman\TelegramBot\Exception\TelegramException |
595 | 595 | */ |
596 | 596 | public static function setWebhook($url = '', $file = null) |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | * |
608 | 608 | * @param array $data |
609 | 609 | * |
610 | - * @return mixed |
|
610 | + * @return ServerResponse |
|
611 | 611 | * @throws \Longman\TelegramBot\Exception\TelegramException |
612 | 612 | */ |
613 | 613 | public static function getFile(array $data) |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | * |
621 | 621 | * @param array $data |
622 | 622 | * |
623 | - * @return mixed |
|
623 | + * @return ServerResponse |
|
624 | 624 | * @throws \Longman\TelegramBot\Exception\TelegramException |
625 | 625 | */ |
626 | 626 | public static function kickChatMember(array $data) |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | * |
634 | 634 | * @param array $data |
635 | 635 | * |
636 | - * @return mixed |
|
636 | + * @return ServerResponse |
|
637 | 637 | * @throws \Longman\TelegramBot\Exception\TelegramException |
638 | 638 | */ |
639 | 639 | public static function leaveChat(array $data) |
@@ -646,7 +646,7 @@ discard block |
||
646 | 646 | * |
647 | 647 | * @param array $data |
648 | 648 | * |
649 | - * @return mixed |
|
649 | + * @return ServerResponse |
|
650 | 650 | * @throws \Longman\TelegramBot\Exception\TelegramException |
651 | 651 | */ |
652 | 652 | public static function unbanChatMember(array $data) |
@@ -661,7 +661,7 @@ discard block |
||
661 | 661 | * |
662 | 662 | * @param array $data |
663 | 663 | * |
664 | - * @return mixed |
|
664 | + * @return ServerResponse |
|
665 | 665 | * @throws \Longman\TelegramBot\Exception\TelegramException |
666 | 666 | */ |
667 | 667 | public static function getChat(array $data) |
@@ -676,7 +676,7 @@ discard block |
||
676 | 676 | * |
677 | 677 | * @param array $data |
678 | 678 | * |
679 | - * @return mixed |
|
679 | + * @return ServerResponse |
|
680 | 680 | * @throws \Longman\TelegramBot\Exception\TelegramException |
681 | 681 | */ |
682 | 682 | public static function getChatAdministrators(array $data) |
@@ -691,7 +691,7 @@ discard block |
||
691 | 691 | * |
692 | 692 | * @param array $data |
693 | 693 | * |
694 | - * @return mixed |
|
694 | + * @return ServerResponse |
|
695 | 695 | * @throws \Longman\TelegramBot\Exception\TelegramException |
696 | 696 | */ |
697 | 697 | public static function getChatMembersCount(array $data) |
@@ -706,7 +706,7 @@ discard block |
||
706 | 706 | * |
707 | 707 | * @param array $data |
708 | 708 | * |
709 | - * @return mixed |
|
709 | + * @return ServerResponse |
|
710 | 710 | * @throws \Longman\TelegramBot\Exception\TelegramException |
711 | 711 | */ |
712 | 712 | public static function getChatMember(array $data) |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | * |
720 | 720 | * @param array $data |
721 | 721 | * |
722 | - * @return mixed |
|
722 | + * @return ServerResponse |
|
723 | 723 | * @throws \Longman\TelegramBot\Exception\TelegramException |
724 | 724 | */ |
725 | 725 | public static function answerCallbackQuery(array $data) |
@@ -732,7 +732,7 @@ discard block |
||
732 | 732 | * |
733 | 733 | * @param array $data |
734 | 734 | * |
735 | - * @return mixed |
|
735 | + * @return ServerResponse |
|
736 | 736 | * @throws \Longman\TelegramBot\Exception\TelegramException |
737 | 737 | */ |
738 | 738 | public static function answerInlineQuery(array $data) |
@@ -745,7 +745,7 @@ discard block |
||
745 | 745 | * |
746 | 746 | * @param array $data |
747 | 747 | * |
748 | - * @return mixed |
|
748 | + * @return ServerResponse |
|
749 | 749 | * @throws \Longman\TelegramBot\Exception\TelegramException |
750 | 750 | */ |
751 | 751 | public static function editMessageText(array $data) |
@@ -758,7 +758,7 @@ discard block |
||
758 | 758 | * |
759 | 759 | * @param array $data |
760 | 760 | * |
761 | - * @return mixed |
|
761 | + * @return ServerResponse |
|
762 | 762 | * @throws \Longman\TelegramBot\Exception\TelegramException |
763 | 763 | */ |
764 | 764 | public static function editMessageCaption(array $data) |
@@ -771,7 +771,7 @@ discard block |
||
771 | 771 | * |
772 | 772 | * @param array $data |
773 | 773 | * |
774 | - * @return mixed |
|
774 | + * @return ServerResponse |
|
775 | 775 | * @throws \Longman\TelegramBot\Exception\TelegramException |
776 | 776 | */ |
777 | 777 | public static function editMessageReplyMarkup(array $data) |
@@ -155,7 +155,7 @@ discard block |
||
155 | 155 | 'first_name' => 'botname', |
156 | 156 | 'username' => 'namebot', |
157 | 157 | ]; |
158 | - $data['chat'] = ['id' => $data['chat_id']]; |
|
158 | + $data['chat'] = ['id' => $data['chat_id']]; |
|
159 | 159 | |
160 | 160 | $fake_response['result'] = $data; |
161 | 161 | } |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | |
179 | 179 | //Fix so that the keyboard markup is a string, not an object |
180 | 180 | if (isset($data['reply_markup']) && !is_string($data['reply_markup'])) { |
181 | - $data['reply_markup'] = (string)$data['reply_markup']; |
|
181 | + $data['reply_markup'] = (string) $data['reply_markup']; |
|
182 | 182 | } |
183 | 183 | |
184 | 184 | $request_params = ['debug' => $debug_handle]; |
@@ -203,7 +203,7 @@ discard block |
||
203 | 203 | |
204 | 204 | $result = ''; |
205 | 205 | try { |
206 | - $result = (string)self::$client->post( |
|
206 | + $result = (string) self::$client->post( |
|
207 | 207 | '/bot' . self::$telegram->getApiKey() . '/' . $action, |
208 | 208 | $request_params |
209 | 209 | )->getBody(); |
@@ -328,7 +328,7 @@ |
||
328 | 328 | if ($response->isOk()) { |
329 | 329 | //Process all updates |
330 | 330 | /** @var Update $result */ |
331 | - foreach ((array)$response->getResult() as $result) { |
|
331 | + foreach ((array) $response->getResult() as $result) { |
|
332 | 332 | $this->processUpdate($result); |
333 | 333 | } |
334 | 334 | } |
@@ -62,7 +62,7 @@ |
||
62 | 62 | |
63 | 63 | //Set the object members from the passed data params |
64 | 64 | foreach (['resize_keyboard', 'one_time_keyboard', 'selective'] as $param) { |
65 | - $this->$param = isset($data[$param]) ? (bool)$data[$param] : false; |
|
65 | + $this->$param = isset($data[$param]) ? (bool) $data[$param] : false; |
|
66 | 66 | } |
67 | 67 | } |
68 | 68 | } |