diff --git a/src/DTO/InlineQueryResultArticle.php b/src/DTO/InlineQueryResultArticle.php index 8fe65902..535b7d82 100644 --- a/src/DTO/InlineQueryResultArticle.php +++ b/src/DTO/InlineQueryResultArticle.php @@ -20,7 +20,7 @@ class InlineQueryResultArticle extends InlineQueryResult protected bool|null $hideUrl = null; protected string|null $parseMode = null; - public static function make(string $id, string $title, string $message = null): InlineQueryResultArticle + public static function make(string $id, string $title, ?string $message = null): InlineQueryResultArticle { $result = new InlineQueryResultArticle(); $result->id = $id; diff --git a/src/Handlers/WebhookHandler.php b/src/Handlers/WebhookHandler.php index 299ae346..fda42db1 100644 --- a/src/Handlers/WebhookHandler.php +++ b/src/Handlers/WebhookHandler.php @@ -14,6 +14,7 @@ use DefStudio\Telegraph\DTO\InlineQuery; use DefStudio\Telegraph\DTO\Message; use DefStudio\Telegraph\DTO\Reaction; +use DefStudio\Telegraph\DTO\ReactionType; use DefStudio\Telegraph\DTO\User; use DefStudio\Telegraph\Exceptions\TelegramWebhookException; use DefStudio\Telegraph\Keyboard\Keyboard; @@ -44,7 +45,7 @@ abstract class WebhookHandler protected ChatJoinRequest|null $chatJoinRequest = null; /** - * @var Collection|Collection> + * @var Collection|Collection>|Collection */ protected Collection $data; diff --git a/src/Keyboard/Keyboard.php b/src/Keyboard/Keyboard.php index 2fa6f80d..11859d7d 100644 --- a/src/Keyboard/Keyboard.php +++ b/src/Keyboard/Keyboard.php @@ -85,11 +85,11 @@ public static function fromArray(array $arrayKeyboard): Keyboard } if (array_key_exists('switch_inline_query', $button)) { - $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query'] ?? ''); + $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query']); } if (array_key_exists('switch_inline_query_current_chat', $button)) { - $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query_current_chat'] ?? '')->currentChat(); + $rowButton = $rowButton->switchInlineQuery($button['switch_inline_query_current_chat'])->currentChat(); } $rowButtons[] = $rowButton; diff --git a/src/Telegraph.php b/src/Telegraph.php index c959d9be..a4078e82 100755 --- a/src/Telegraph.php +++ b/src/Telegraph.php @@ -134,7 +134,7 @@ public function send(): TelegraphResponse return TelegraphResponse::fromResponse($response); } - public function dispatch(string $queue = null): PendingDispatch + public function dispatch(?string $queue = null): PendingDispatch { return $this->dispatchRequestToTelegram($queue); }