Skip to content

Commit 90be284

Browse files
committed
Fixes based on scrutinizer recommendations.
1 parent a0ed7eb commit 90be284

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/TelegramFile.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public function file($file, string $type, string $filename = null): self
7070
'contents' => (is_file($file) && is_readable($file)) ? fopen($file, 'rb') : $file,
7171
];
7272

73-
if ($filename) {
73+
if ($filename !== null) {
7474
$this->payload['file']['filename'] = $filename;
7575
}
7676

src/Traits/HasSharedLogic.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,9 @@ public function button($text, $url, $columns = 2): self
4040
{
4141
$this->buttons[] = compact('text', 'url');
4242

43-
$replyMarkup['inline_keyboard'] = array_chunk($this->buttons, $columns);
44-
$this->payload['reply_markup'] = json_encode($replyMarkup);
43+
$this->payload['reply_markup'] = json_encode([
44+
'inline_keyboard' => array_chunk($this->buttons, $columns),
45+
]);
4546

4647
return $this;
4748
}

0 commit comments

Comments
 (0)