@@ -1704,98 +1704,45 @@ public function getUpdateType()
1704
1704
}
1705
1705
1706
1706
$ update = $ this ->data ;
1707
- if (isset ($ update ['inline_query ' ])) {
1707
+ $ this ->update_type = false ;
1708
+ if (isset ($ update ['inline_query ' ]))
1708
1709
$ this ->update_type = self ::INLINE_QUERY ;
1709
-
1710
- return $ this ->update_type ;
1711
- }
1712
- if (isset ($ update ['callback_query ' ])) {
1710
+ if (isset ($ update ['callback_query ' ]))
1713
1711
$ this ->update_type = self ::CALLBACK_QUERY ;
1714
-
1715
- return $ this ->update_type ;
1716
- }
1717
- if (isset ($ update ['edited_message ' ])) {
1712
+ if (isset ($ update ['edited_message ' ]))
1718
1713
$ this ->update_type = self ::EDITED_MESSAGE ;
1719
-
1720
- return $ this ->update_type ;
1721
- }
1722
- if (isset ($ update ['message ' ]['text ' ])) {
1714
+ if (isset ($ update ['message ' ]['text ' ]))
1723
1715
$ this ->update_type = self ::MESSAGE ;
1724
-
1725
- return $ this ->update_type ;
1726
- }
1727
- if (isset ($ update ['message ' ]['photo ' ])) {
1716
+ if (isset ($ update ['message ' ]['photo ' ]))
1728
1717
$ this ->update_type = self ::PHOTO ;
1729
-
1730
- return $ this ->update_type ;
1731
- }
1732
- if (isset ($ update ['message ' ]['video ' ])) {
1718
+ if (isset ($ update ['message ' ]['video ' ]))
1733
1719
$ this ->update_type = self ::VIDEO ;
1734
-
1735
- return $ this ->update_type ;
1736
- }
1737
- if (isset ($ update ['message ' ]['audio ' ])) {
1720
+ if (isset ($ update ['message ' ]['audio ' ]))
1738
1721
$ this ->update_type = self ::AUDIO ;
1739
-
1740
- return $ this ->update_type ;
1741
- }
1742
- if (isset ($ update ['message ' ]['voice ' ])) {
1722
+ if (isset ($ update ['message ' ]['voice ' ]))
1743
1723
$ this ->update_type = self ::VOICE ;
1744
-
1745
- return $ this ->update_type ;
1746
- }
1747
- if (isset ($ update ['message ' ]['contact ' ])) {
1724
+ if (isset ($ update ['message ' ]['contact ' ]))
1748
1725
$ this ->update_type = self ::CONTACT ;
1749
-
1750
- return $ this ->update_type ;
1751
- }
1752
- if (isset ($ update ['message ' ]['location ' ])) {
1726
+ if (isset ($ update ['message ' ]['location ' ]))
1753
1727
$ this ->update_type = self ::LOCATION ;
1754
-
1755
- return $ this ->update_type ;
1756
- }
1757
- if (isset ($ update ['message ' ]['reply_to_message ' ])) {
1728
+ if (isset ($ update ['message ' ]['reply_to_message ' ]))
1758
1729
$ this ->update_type = self ::REPLY ;
1759
-
1760
- return $ this ->update_type ;
1761
- }
1762
- if (isset ($ update ['message ' ]['animation ' ])) {
1730
+ if (isset ($ update ['message ' ]['animation ' ]))
1763
1731
$ this ->update_type = self ::ANIMATION ;
1764
-
1765
- return $ this ->update_type ;
1766
- }
1767
- if (isset ($ update ['message ' ]['sticker ' ])) {
1732
+ if (isset ($ update ['message ' ]['sticker ' ]))
1768
1733
$ this ->update_type = self ::STICKER ;
1769
-
1770
- return $ this ->update_type ;
1771
- }
1772
- if (isset ($ update ['message ' ]['document ' ])) {
1734
+ if (isset ($ update ['message ' ]['document ' ]))
1773
1735
$ this ->update_type = self ::DOCUMENT ;
1774
-
1775
- return $ this ->update_type ;
1776
- }
1777
- if (isset ($ update ['message ' ]['new_chat_member ' ])) {
1736
+ if (isset ($ update ['message ' ]['new_chat_member ' ]))
1778
1737
$ this ->update_type = self ::NEW_CHAT_MEMBER ;
1779
-
1780
- return $ this ->update_type ;
1781
- }
1782
- if (isset ($ update ['message ' ]['left_chat_member ' ])) {
1738
+ if (isset ($ update ['message ' ]['left_chat_member ' ]))
1783
1739
$ this ->update_type = self ::LEFT_CHAT_MEMBER ;
1784
-
1785
- return $ this ->update_type ;
1786
- }
1787
- if (isset ($ update ['my_chat_member ' ])) {
1740
+ if (isset ($ update ['my_chat_member ' ]))
1788
1741
$ this ->update_type = self ::MY_CHAT_MEMBER ;
1789
-
1790
- return $ this ->update_type ;
1791
- }
1792
- if (isset ($ update ['channel_post ' ])) {
1742
+ if (isset ($ update ['channel_post ' ]))
1793
1743
$ this ->update_type = self ::CHANNEL_POST ;
1794
1744
1795
- return $ this ->update_type ;
1796
- }
1797
-
1798
- return false ;
1745
+ return $ this ->update_type ;
1799
1746
}
1800
1747
1801
1748
private function sendAPIRequest ($ url , array $ content , $ post = true )
0 commit comments