Skip to content

Commit

Permalink
phpstan
Browse files Browse the repository at this point in the history
  • Loading branch information
MarioGattolla committed Nov 26, 2024
1 parent 8c515d7 commit 8327551
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/Handlers/WebhookHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,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;
Expand Down Expand Up @@ -42,7 +43,7 @@ abstract class WebhookHandler
protected CallbackQuery|null $callbackQuery = null;

/**
* @var Collection<string, string>|Collection<int, array<string, string>>
* @var Collection<string, string>|Collection<int, array<string, string>>|Collection<array-key, ReactionType>
*/
protected Collection $data;

Expand Down
4 changes: 2 additions & 2 deletions src/Keyboard/Keyboard.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 8327551

Please sign in to comment.