@@ -4,12 +4,12 @@ |
||
| 4 | 4 | |
| 5 | 5 | class ForceReply implements TypeInterface |
| 6 | 6 | { |
| 7 | - /** @var bool */ |
|
| 8 | - public bool $forceReply; |
|
| 7 | + /** @var bool */ |
|
| 8 | + public bool $forceReply; |
|
| 9 | 9 | |
| 10 | 10 | /** @var string|null */ |
| 11 | 11 | public ?string $inputFieldPlaceholder = null; |
| 12 | 12 | |
| 13 | - /** @var bool|null */ |
|
| 14 | - public ?bool $selective = null; |
|
| 13 | + /** @var bool|null */ |
|
| 14 | + public ?bool $selective = null; |
|
| 15 | 15 | } |
@@ -17,8 +17,8 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | public function add(?BotCommandScope $scope = null, ?string $languageCode = null): ?PromiseInterface |
| 19 | 19 | { |
| 20 | - return $this->api?->getMyCommands(scope: $scope, languageCode: $languageCode)->then( |
|
| 21 | - function (array $commands) use ($scope, $languageCode) { |
|
| 20 | + return $this->api ? ->getMyCommands(scope : $scope, languageCode : $languageCode)->then( |
|
| 21 | + function(array $commands) use ($scope, $languageCode) { |
|
| 22 | 22 | $commands = array_merge($commands, [$this]); |
| 23 | 23 | return $this->api->setMyCommands(commands: $commands, scope: $scope, languageCode: $languageCode); |
| 24 | 24 | } |
@@ -27,8 +27,8 @@ discard block |
||
| 27 | 27 | |
| 28 | 28 | public function remove(?BotCommandScope $scope = null, ?string $languageCode = null): ?PromiseInterface |
| 29 | 29 | { |
| 30 | - return $this->api?->getMyCommands(scope: $scope, languageCode: $languageCode)->then( |
|
| 31 | - function (array $commands) use ($scope, $languageCode) { |
|
| 30 | + return $this->api ? ->getMyCommands(scope : $scope, languageCode : $languageCode)->then( |
|
| 31 | + function(array $commands) use ($scope, $languageCode) { |
|
| 32 | 32 | $commands = array_udiff( |
| 33 | 33 | $commands, |
| 34 | 34 | [$this], |
@@ -14,19 +14,19 @@ discard block |
||
| 14 | 14 | public function ban(int|string $chatId, ?int $untilDate = null, ?bool $revokeMessages = null): PromiseInterface |
| 15 | 15 | { |
| 16 | 16 | return $this->api->banChatMember( |
| 17 | - chatId: $chatId, |
|
| 18 | - userId: $this->id, |
|
| 19 | - untilDate: $untilDate, |
|
| 20 | - revokeMessages: $revokeMessages |
|
| 17 | + chatId : $chatId, |
|
| 18 | + userId : $this->id, |
|
| 19 | + untilDate : $untilDate, |
|
| 20 | + revokeMessages : $revokeMessages |
|
| 21 | 21 | ); |
| 22 | 22 | } |
| 23 | 23 | |
| 24 | 24 | public function unban(int|string $chatId, ?bool $onlyIfBanned = null): PromiseInterface |
| 25 | 25 | { |
| 26 | 26 | return $this->api->unbanChatMember( |
| 27 | - chatId: $chatId, |
|
| 28 | - userId: $this->id, |
|
| 29 | - onlyIfBanned: $onlyIfBanned |
|
| 27 | + chatId : $chatId, |
|
| 28 | + userId : $this->id, |
|
| 29 | + onlyIfBanned : $onlyIfBanned |
|
| 30 | 30 | ); |
| 31 | 31 | } |
| 32 | 32 | |
@@ -45,19 +45,19 @@ discard block |
||
| 45 | 45 | ?bool $canPinMessages = null |
| 46 | 46 | ): PromiseInterface { |
| 47 | 47 | return $this->api->promoteChatMember( |
| 48 | - chatId: $chatId, |
|
| 49 | - userId: $this->id, |
|
| 50 | - isAnonymous: $isAnonymous, |
|
| 51 | - canManageChat: $canManageChat, |
|
| 52 | - canPostMessages: $canPostMessages, |
|
| 53 | - canEditMessages: $canEditMessages, |
|
| 54 | - canDeleteMessages: $canDeleteMessages, |
|
| 55 | - canManageVoiceChats: $canManageVoiceChats, |
|
| 56 | - canRestrictMembers: $canRestrictMembers, |
|
| 57 | - canPromoteMembers: $canPromoteMembers, |
|
| 58 | - canChangeInfo: $canChangeInfo, |
|
| 59 | - canInviteUsers: $canInviteUsers, |
|
| 60 | - canPinMessages: $canPinMessages |
|
| 48 | + chatId : $chatId, |
|
| 49 | + userId : $this->id, |
|
| 50 | + isAnonymous : $isAnonymous, |
|
| 51 | + canManageChat : $canManageChat, |
|
| 52 | + canPostMessages : $canPostMessages, |
|
| 53 | + canEditMessages : $canEditMessages, |
|
| 54 | + canDeleteMessages : $canDeleteMessages, |
|
| 55 | + canManageVoiceChats : $canManageVoiceChats, |
|
| 56 | + canRestrictMembers : $canRestrictMembers, |
|
| 57 | + canPromoteMembers : $canPromoteMembers, |
|
| 58 | + canChangeInfo : $canChangeInfo, |
|
| 59 | + canInviteUsers : $canInviteUsers, |
|
| 60 | + canPinMessages : $canPinMessages |
|
| 61 | 61 | ); |
| 62 | 62 | } |
| 63 | 63 | |
@@ -72,10 +72,10 @@ discard block |
||
| 72 | 72 | ?int $untilDate = null |
| 73 | 73 | ): PromiseInterface { |
| 74 | 74 | return $this->api->restrictChatMember( |
| 75 | - chatId: $chatId, |
|
| 76 | - userId: $this->id, |
|
| 77 | - permissions: $permissions, |
|
| 78 | - untilDate: $untilDate |
|
| 75 | + chatId : $chatId, |
|
| 76 | + userId : $this->id, |
|
| 77 | + permissions : $permissions, |
|
| 78 | + untilDate : $untilDate |
|
| 79 | 79 | ); |
| 80 | 80 | } |
| 81 | 81 | |
@@ -18,16 +18,16 @@ discard block |
||
| 18 | 18 | public function kickMember(int $userId, ?int $untilDate = null, ?bool $revokeMessages = null): PromiseInterface |
| 19 | 19 | { |
| 20 | 20 | return $this->api->banChatMember( |
| 21 | - chatId: $this->id, |
|
| 22 | - userId: $userId, |
|
| 23 | - untilDate: $untilDate, |
|
| 24 | - revokeMessages: $revokeMessages |
|
| 21 | + chatId : $this->id, |
|
| 22 | + userId : $userId, |
|
| 23 | + untilDate : $untilDate, |
|
| 24 | + revokeMessages : $revokeMessages |
|
| 25 | 25 | ); |
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | public function unbanMember(int $userId, ?bool $onlyIfBanned = null): PromiseInterface |
| 29 | 29 | { |
| 30 | - return $this->api->unbanChatMember(chatId: $this->id, userId: $userId, onlyIfBanned: $onlyIfBanned); |
|
| 30 | + return $this->api->unbanChatMember(chatId : $this->id, userId : $userId, onlyIfBanned : $onlyIfBanned); |
|
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | public function restrictMember( |
@@ -36,10 +36,10 @@ discard block |
||
| 36 | 36 | ?int $untilDate = null |
| 37 | 37 | ): PromiseInterface { |
| 38 | 38 | return $this->api->restrictChatMember( |
| 39 | - chatId: $this->id, |
|
| 40 | - userId: $userId, |
|
| 41 | - permissions: $permissions, |
|
| 42 | - untilDate: $untilDate |
|
| 39 | + chatId : $this->id, |
|
| 40 | + userId : $userId, |
|
| 41 | + permissions : $permissions, |
|
| 42 | + untilDate : $untilDate |
|
| 43 | 43 | ); |
| 44 | 44 | } |
| 45 | 45 | } |
| 46 | 46 | \ No newline at end of file |
@@ -13,19 +13,19 @@ discard block |
||
| 13 | 13 | public function ban(?int $untilDate = null, ?bool $revokeMessages = null): PromiseInterface |
| 14 | 14 | { |
| 15 | 15 | return $this->api->banChatMember( |
| 16 | - chatId: $this->chat->id, |
|
| 17 | - userId: $this->newChatMember->user->id, |
|
| 18 | - untilDate: $untilDate, |
|
| 19 | - revokeMessages: $revokeMessages |
|
| 16 | + chatId : $this->chat->id, |
|
| 17 | + userId : $this->newChatMember->user->id, |
|
| 18 | + untilDate : $untilDate, |
|
| 19 | + revokeMessages : $revokeMessages |
|
| 20 | 20 | ); |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | 23 | public function unban(?bool $onlyIfBanned = null): PromiseInterface |
| 24 | 24 | { |
| 25 | 25 | return $this->api->unbanChatMember( |
| 26 | - chatId: $this->chat->id, |
|
| 27 | - userId: $this->newChatMember->user->id, |
|
| 28 | - onlyIfBanned: $onlyIfBanned |
|
| 26 | + chatId : $this->chat->id, |
|
| 27 | + userId : $this->newChatMember->user->id, |
|
| 28 | + onlyIfBanned : $onlyIfBanned |
|
| 29 | 29 | ); |
| 30 | 30 | } |
| 31 | 31 | |
@@ -43,19 +43,19 @@ discard block |
||
| 43 | 43 | ?bool $canPinMessages = null |
| 44 | 44 | ): PromiseInterface { |
| 45 | 45 | return $this->api->promoteChatMember( |
| 46 | - chatId: $this->chat->id, |
|
| 47 | - userId: $this->newChatMember->user->id, |
|
| 48 | - isAnonymous: $isAnonymous, |
|
| 49 | - canManageChat: $canManageChat, |
|
| 50 | - canPostMessages: $canPostMessages, |
|
| 51 | - canEditMessages: $canEditMessages, |
|
| 52 | - canDeleteMessages: $canDeleteMessages, |
|
| 53 | - canManageVoiceChats: $canManageVoiceChats, |
|
| 54 | - canRestrictMembers: $canRestrictMembers, |
|
| 55 | - canPromoteMembers: $canPromoteMembers, |
|
| 56 | - canChangeInfo: $canChangeInfo, |
|
| 57 | - canInviteUsers: $canInviteUsers, |
|
| 58 | - canPinMessages: $canPinMessages |
|
| 46 | + chatId : $this->chat->id, |
|
| 47 | + userId : $this->newChatMember->user->id, |
|
| 48 | + isAnonymous : $isAnonymous, |
|
| 49 | + canManageChat : $canManageChat, |
|
| 50 | + canPostMessages : $canPostMessages, |
|
| 51 | + canEditMessages : $canEditMessages, |
|
| 52 | + canDeleteMessages : $canDeleteMessages, |
|
| 53 | + canManageVoiceChats : $canManageVoiceChats, |
|
| 54 | + canRestrictMembers : $canRestrictMembers, |
|
| 55 | + canPromoteMembers : $canPromoteMembers, |
|
| 56 | + canChangeInfo : $canChangeInfo, |
|
| 57 | + canInviteUsers : $canInviteUsers, |
|
| 58 | + canPinMessages : $canPinMessages |
|
| 59 | 59 | ); |
| 60 | 60 | } |
| 61 | 61 | |
@@ -69,10 +69,10 @@ discard block |
||
| 69 | 69 | ?int $untilDate = null |
| 70 | 70 | ): PromiseInterface { |
| 71 | 71 | return $this->api->restrictChatMember( |
| 72 | - chatId: $this->chat->id, |
|
| 73 | - userId: $this->newChatMember->user->id, |
|
| 74 | - permissions: $permissions, |
|
| 75 | - untilDate: $untilDate |
|
| 72 | + chatId : $this->chat->id, |
|
| 73 | + userId : $this->newChatMember->user->id, |
|
| 74 | + permissions : $permissions, |
|
| 75 | + untilDate : $untilDate |
|
| 76 | 76 | ); |
| 77 | 77 | } |
| 78 | 78 | |
@@ -18,13 +18,13 @@ |
||
| 18 | 18 | { |
| 19 | 19 | /** @var \Sysbot\Telegram\Types\ChatPermissions $this */ |
| 20 | 20 | if (empty($userId)) { |
| 21 | - return $this->api?->setChatPermissions(chatId: $chatId, permissions: $this); |
|
| 21 | + return $this->api ? ->setChatPermissions(chatId : $chatId, permissions : $this); |
|
| 22 | 22 | } |
| 23 | - return $this->api?->restrictChatMember( |
|
| 24 | - chatId: $chatId, |
|
| 25 | - userId: $userId, |
|
| 26 | - permissions: $this, |
|
| 27 | - untilDate: $untilDate |
|
| 23 | + return $this->api ? ->restrictChatMember( |
|
| 24 | + chatId : $chatId, |
|
| 25 | + userId : $userId, |
|
| 26 | + permissions : $this, |
|
| 27 | + untilDate : $untilDate |
|
| 28 | 28 | ); |
| 29 | 29 | } |
| 30 | 30 | |
@@ -4,33 +4,33 @@ |
||
| 4 | 4 | |
| 5 | 5 | class InlineQueryResultCachedPhoto extends InlineQueryResult |
| 6 | 6 | { |
| 7 | - /** @var string */ |
|
| 8 | - public string $type = 'photo'; |
|
| 7 | + /** @var string */ |
|
| 8 | + public string $type = 'photo'; |
|
| 9 | 9 | |
| 10 | - /** @var string */ |
|
| 11 | - public string $id; |
|
| 10 | + /** @var string */ |
|
| 11 | + public string $id; |
|
| 12 | 12 | |
| 13 | - /** @var string */ |
|
| 14 | - public string $photoFileId; |
|
| 13 | + /** @var string */ |
|
| 14 | + public string $photoFileId; |
|
| 15 | 15 | |
| 16 | - /** @var string|null */ |
|
| 17 | - public ?string $title = null; |
|
| 16 | + /** @var string|null */ |
|
| 17 | + public ?string $title = null; |
|
| 18 | 18 | |
| 19 | - /** @var string|null */ |
|
| 20 | - public ?string $description = null; |
|
| 19 | + /** @var string|null */ |
|
| 20 | + public ?string $description = null; |
|
| 21 | 21 | |
| 22 | - /** @var string|null */ |
|
| 23 | - public ?string $caption = null; |
|
| 22 | + /** @var string|null */ |
|
| 23 | + public ?string $caption = null; |
|
| 24 | 24 | |
| 25 | - /** @var string|null */ |
|
| 26 | - public ?string $parseMode = null; |
|
| 25 | + /** @var string|null */ |
|
| 26 | + public ?string $parseMode = null; |
|
| 27 | 27 | |
| 28 | - /** @var Array<MessageEntity>|null */ |
|
| 29 | - public ?array $captionEntities = null; |
|
| 28 | + /** @var Array<MessageEntity>|null */ |
|
| 29 | + public ?array $captionEntities = null; |
|
| 30 | 30 | |
| 31 | - /** @var InlineKeyboardMarkup|null */ |
|
| 32 | - public ?InlineKeyboardMarkup $replyMarkup = null; |
|
| 31 | + /** @var InlineKeyboardMarkup|null */ |
|
| 32 | + public ?InlineKeyboardMarkup $replyMarkup = null; |
|
| 33 | 33 | |
| 34 | - /** @var InputMessageContent|null */ |
|
| 35 | - public ?InputMessageContent $inputMessageContent = null; |
|
| 34 | + /** @var InputMessageContent|null */ |
|
| 35 | + public ?InputMessageContent $inputMessageContent = null; |
|
| 36 | 36 | } |
@@ -4,15 +4,15 @@ |
||
| 4 | 4 | |
| 5 | 5 | class PassportElementErrorFile extends PassportElementError |
| 6 | 6 | { |
| 7 | - /** @var string */ |
|
| 8 | - public string $source = 'file'; |
|
| 7 | + /** @var string */ |
|
| 8 | + public string $source = 'file'; |
|
| 9 | 9 | |
| 10 | - /** @var string */ |
|
| 11 | - public string $type; |
|
| 10 | + /** @var string */ |
|
| 11 | + public string $type; |
|
| 12 | 12 | |
| 13 | - /** @var string */ |
|
| 14 | - public string $fileHash; |
|
| 13 | + /** @var string */ |
|
| 14 | + public string $fileHash; |
|
| 15 | 15 | |
| 16 | - /** @var string */ |
|
| 17 | - public string $message; |
|
| 16 | + /** @var string */ |
|
| 17 | + public string $message; |
|
| 18 | 18 | } |
@@ -4,48 +4,48 @@ |
||
| 4 | 4 | |
| 5 | 5 | class ChatMemberAdministrator extends ChatMember |
| 6 | 6 | { |
| 7 | - /** @var string */ |
|
| 8 | - public string $status = 'administrator'; |
|
| 7 | + /** @var string */ |
|
| 8 | + public string $status = 'administrator'; |
|
| 9 | 9 | |
| 10 | - /** @var User */ |
|
| 11 | - public User $user; |
|
| 10 | + /** @var User */ |
|
| 11 | + public User $user; |
|
| 12 | 12 | |
| 13 | - /** @var bool */ |
|
| 14 | - public bool $canBeEdited; |
|
| 13 | + /** @var bool */ |
|
| 14 | + public bool $canBeEdited; |
|
| 15 | 15 | |
| 16 | - /** @var bool */ |
|
| 17 | - public bool $isAnonymous; |
|
| 16 | + /** @var bool */ |
|
| 17 | + public bool $isAnonymous; |
|
| 18 | 18 | |
| 19 | - /** @var bool */ |
|
| 20 | - public bool $canManageChat; |
|
| 19 | + /** @var bool */ |
|
| 20 | + public bool $canManageChat; |
|
| 21 | 21 | |
| 22 | - /** @var bool */ |
|
| 23 | - public bool $canDeleteMessages; |
|
| 22 | + /** @var bool */ |
|
| 23 | + public bool $canDeleteMessages; |
|
| 24 | 24 | |
| 25 | - /** @var bool */ |
|
| 26 | - public bool $canManageVoiceChats; |
|
| 25 | + /** @var bool */ |
|
| 26 | + public bool $canManageVoiceChats; |
|
| 27 | 27 | |
| 28 | - /** @var bool */ |
|
| 29 | - public bool $canRestrictMembers; |
|
| 28 | + /** @var bool */ |
|
| 29 | + public bool $canRestrictMembers; |
|
| 30 | 30 | |
| 31 | - /** @var bool */ |
|
| 32 | - public bool $canPromoteMembers; |
|
| 31 | + /** @var bool */ |
|
| 32 | + public bool $canPromoteMembers; |
|
| 33 | 33 | |
| 34 | - /** @var bool */ |
|
| 35 | - public bool $canChangeInfo; |
|
| 34 | + /** @var bool */ |
|
| 35 | + public bool $canChangeInfo; |
|
| 36 | 36 | |
| 37 | - /** @var bool */ |
|
| 38 | - public bool $canInviteUsers; |
|
| 37 | + /** @var bool */ |
|
| 38 | + public bool $canInviteUsers; |
|
| 39 | 39 | |
| 40 | - /** @var bool|null */ |
|
| 41 | - public ?bool $canPostMessages = null; |
|
| 40 | + /** @var bool|null */ |
|
| 41 | + public ?bool $canPostMessages = null; |
|
| 42 | 42 | |
| 43 | - /** @var bool|null */ |
|
| 44 | - public ?bool $canEditMessages = null; |
|
| 43 | + /** @var bool|null */ |
|
| 44 | + public ?bool $canEditMessages = null; |
|
| 45 | 45 | |
| 46 | - /** @var bool|null */ |
|
| 47 | - public ?bool $canPinMessages = null; |
|
| 46 | + /** @var bool|null */ |
|
| 47 | + public ?bool $canPinMessages = null; |
|
| 48 | 48 | |
| 49 | - /** @var string|null */ |
|
| 50 | - public ?string $customTitle = null; |
|
| 49 | + /** @var string|null */ |
|
| 50 | + public ?string $customTitle = null; |
|
| 51 | 51 | } |