Skip to content

Commit

Permalink
added an additional type check
Browse files Browse the repository at this point in the history
  • Loading branch information
iGusev committed Jun 30, 2015
1 parent 7913106 commit dd3cfba
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/BotApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public function sendMessage($chatId, $text, $disablePreviw = false, $replyToMess
'text' => $text,
'disable_web_page_preview' => $disablePreviw,
'reply_to_message_id' => (int) $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand Down Expand Up @@ -249,7 +249,7 @@ public function sendLocation($chatId, $latitude, $longitude, $replyToMessageId =
'latitude' => $latitude,
'longitude' => $longitude,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand All @@ -271,7 +271,7 @@ public function sendSticker($chatId, $sticker, $replyToMessageId = null, $replyM
'chat_id' => (int) $chatId,
'sticker' => $sticker,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand All @@ -295,7 +295,7 @@ public function sendVideo($chatId, $video, $replyToMessageId = null, $replyMarku
'chat_id' => (int) $chatId,
'video' => $video,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand Down Expand Up @@ -341,7 +341,7 @@ public function sendAudio($chatId, $audio, $replyToMessageId = null, $replyMarku
'chat_id' => (int) $chatId,
'audio' => $audio,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand All @@ -365,7 +365,7 @@ public function sendPhoto($chatId, $photo, $caption = null, $replyToMessageId =
'photo' => $photo,
'caption' => $caption,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand All @@ -388,7 +388,7 @@ public function sendDocument($chatId, $document, $replyToMessageId = null, $repl
'chat_id' => (int) $chatId,
'document' => $document,
'reply_to_message_id' => $replyToMessageId,
'reply_markup' => $replyMarkup->toJson()
'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson()
)));
}

Expand Down

0 comments on commit dd3cfba

Please sign in to comment.