@@ -38,10 +38,10 @@ discard block |
||
| 38 | 38 | * Optional. Chat invite link, which was used by the user to join the chat; for joining by invite link events |
| 39 | 39 | * only. |
| 40 | 40 | */ |
| 41 | - public null|chatInviteLink $invite_link = null; |
|
| 41 | + public null | chatInviteLink $invite_link = null; |
|
| 42 | 42 | |
| 43 | 43 | |
| 44 | - public function __construct(stdClass|null $object = null) { |
|
| 44 | + public function __construct(stdClass | null $object = null) { |
|
| 45 | 45 | if ($object != null) { |
| 46 | 46 | parent::__construct($object, self::subs); |
| 47 | 47 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | return $this->chat->isPrivate() && $this->isMe() && $this->isKicked(); |
| 56 | 56 | } |
| 57 | 57 | |
| 58 | - public function isMe (): bool { |
|
| 58 | + public function isMe(): bool { |
|
| 59 | 59 | return $this->new_chat_member->user->id == settings::$bot_id; |
| 60 | 60 | } |
| 61 | 61 | |
@@ -71,19 +71,19 @@ discard block |
||
| 71 | 71 | return $this->isJoined() && !empty($this->invite_link); |
| 72 | 72 | } |
| 73 | 73 | |
| 74 | - public function isLeaved (): bool { |
|
| 74 | + public function isLeaved(): bool { |
|
| 75 | 75 | return $this->new_chat_member->status === chatMemberStatus::LEFT; |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | - public function isKicked (): bool { |
|
| 78 | + public function isKicked(): bool { |
|
| 79 | 79 | return $this->new_chat_member->status === chatMemberStatus::KICKED; |
| 80 | 80 | } |
| 81 | 81 | |
| 82 | - public function isOldAdmin (): bool { |
|
| 82 | + public function isOldAdmin(): bool { |
|
| 83 | 83 | return $this->old_chat_member->status === chatMemberStatus::ADMINISTRATOR && $this->isJoined(); |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - public function isNewAdmin (): bool { |
|
| 86 | + public function isNewAdmin(): bool { |
|
| 87 | 87 | return $this->new_chat_member->status === chatMemberStatus::ADMINISTRATOR; |
| 88 | 88 | } |
| 89 | 89 | } |
@@ -32,19 +32,19 @@ |
||
| 32 | 32 | public string $invoice_payload; |
| 33 | 33 | |
| 34 | 34 | /** Optional. Identifier of the shipping option chosen by the user */ |
| 35 | - public null|string $shipping_option_id = null; |
|
| 35 | + public null | string $shipping_option_id = null; |
|
| 36 | 36 | |
| 37 | 37 | /** Optional. Order information provided by the user */ |
| 38 | - public null|orderInfo $order_info = null; |
|
| 38 | + public null | orderInfo $order_info = null; |
|
| 39 | 39 | |
| 40 | 40 | |
| 41 | - public function __construct(stdClass|null $object = null) { |
|
| 41 | + public function __construct(stdClass | null $object = null) { |
|
| 42 | 42 | if ($object != null) { |
| 43 | 43 | parent::__construct($object, self::subs); |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | |
| 47 | - public function answer (bool $ok, string|null $error_message = null): responseError|bool { |
|
| 47 | + public function answer(bool $ok, string | null $error_message = null): responseError | bool { |
|
| 48 | 48 | return telegram::answerPreCheckoutQuery($ok, $this->id, $error_message); |
| 49 | 49 | } |
| 50 | 50 | } |
@@ -25,50 +25,50 @@ |
||
| 25 | 25 | * Optional. Message with the callback button that originated the query. Note that message content and message |
| 26 | 26 | * date will not be available if the message is too old |
| 27 | 27 | */ |
| 28 | - public null|message $message = null; |
|
| 28 | + public null | message $message = null; |
|
| 29 | 29 | |
| 30 | 30 | /** Optional. Identifier of the message sent via the bot in inline mode, that originated the query. */ |
| 31 | - public null|string $inline_message_id = null; |
|
| 31 | + public null | string $inline_message_id = null; |
|
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | 34 | * Global identifier, uniquely corresponding to the chat to which the message with the callback button was sent. |
| 35 | 35 | * Useful for high scores in games. |
| 36 | 36 | */ |
| 37 | - public null|string $chat_instance = null; |
|
| 37 | + public null | string $chat_instance = null; |
|
| 38 | 38 | |
| 39 | 39 | /** |
| 40 | 40 | * Optional. Data associated with the callback button. Be aware that the message originated the query can contain |
| 41 | 41 | * no callback buttons with this data. |
| 42 | 42 | */ |
| 43 | - public null|string $data = null; |
|
| 43 | + public null | string $data = null; |
|
| 44 | 44 | |
| 45 | 45 | /** Optional. Short name of a Game to be returned, serves as the unique identifier for the game */ |
| 46 | - public null|string $game_short_name = null; |
|
| 46 | + public null | string $game_short_name = null; |
|
| 47 | 47 | |
| 48 | 48 | |
| 49 | - public function __construct(stdClass|null $object = null) { |
|
| 49 | + public function __construct(stdClass | null $object = null) { |
|
| 50 | 50 | if ($object != null) { |
| 51 | 51 | parent::__construct($object, self::subs); |
| 52 | 52 | } |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - public function answer (string|null $text = null, bool|null $show_alert = null, string|null $url = null, int|null $cache_time = null): responseError|bool { |
|
| 55 | + public function answer(string | null $text = null, bool | null $show_alert = null, string | null $url = null, int | null $cache_time = null): responseError | bool { |
|
| 56 | 56 | return telegram::answerCallbackQuery($this->id, $text, $show_alert, $url, $cache_time); |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | - public function editText (string $text): message|responseError|bool { |
|
| 59 | + public function editText(string $text): message | responseError | bool { |
|
| 60 | 60 | return telegram::editMessageText($text); |
| 61 | 61 | } |
| 62 | 62 | |
| 63 | - public function editCaption (string $text = ''): message|responseError|bool { |
|
| 63 | + public function editCaption(string $text = ''): message | responseError | bool { |
|
| 64 | 64 | return telegram::editMessageCaption(caption: $text); |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - public function editKeyboard (inlineKeyboardMarkup|stdClass|array $reply_markup = null): message|responseError|bool { |
|
| 67 | + public function editKeyboard(inlineKeyboardMarkup | stdClass | array $reply_markup = null): message | responseError | bool { |
|
| 68 | 68 | return telegram::editMessageReplyMarkup(reply_markup: $reply_markup); |
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function editMedia (inputMedia|array|stdClass $media): message|responseError|bool { |
|
| 71 | + public function editMedia(inputMedia | array | stdClass $media): message | responseError | bool { |
|
| 72 | 72 | return telegram::editMessageMedia($media); |
| 73 | 73 | } |
| 74 | 74 | } |