From b3e4140729fd9f842f1b8b3ec9832fa97b03e8bb Mon Sep 17 00:00:00 2001 From: mgp25 Date: Wed, 15 Feb 2017 20:43:01 +0100 Subject: [PATCH] typo fix --- src/Telegram.php | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/Telegram.php b/src/Telegram.php index 53e6653..d4742c4 100644 --- a/src/Telegram.php +++ b/src/Telegram.php @@ -7,7 +7,7 @@ class telegramBot const BASE_URL = 'https://api.telegram.org'; const BOT_URL = '/bot'; const FILE_URL = '/file'; - + protected $token; public function __construct($token) @@ -224,7 +224,7 @@ public function sendVoice($chat_id, $audio, $duration = null, $reply_to_message_ { $data = compact('chat_id', 'audio', 'duration', 'reply_to_message_id', 'reply_markup'); - if (((!is_dir($video)) && (filter_var($video, FILTER_VALIDATE_URL) === FALSE))) + if (((!is_dir($audio)) && (filter_var($audio, FILTER_VALIDATE_URL) === FALSE))) return $this->sendRequest('sendVoice', $data); return $this->uploadFile('sendVoice', $data); @@ -272,7 +272,7 @@ public function sendVenue($chat_id, $latitude, $longitude, $title, $address, $fo return $this->sendRequest('sendVenue', $params); } - + /** * Send Contact. * @@ -294,7 +294,7 @@ public function sendContact($chat_id, $phone_number, $first_name, $last_name = n return $this->sendRequest('sendContact', $params); } - + /** * Send Chat Action. * @@ -357,23 +357,23 @@ public function getFile($file_id) { return $this->sendRequest('getFile', compact('file_id')); } - + /** * Use this method to get file Data. * * @link https://core.telegram.org/bots/api#getfile - * + * * @see getFile * * @param string $file_id - * @param string $file_path Is taken from the getFile response + * @param string $file_path Is taken from the getFile response * * @return On success, a File Data is returned */ public function getFileData($file_id, $file_path) { - return file_get_contents($this->baseFileURL . $file_path . '?' . http_build_query(compact('file_id'))); - } + return file_get_contents($this->baseFileURL . $file_path . '?' . http_build_query(compact('file_id'))); + } /** * Set a Webhook to receive incoming updates via an outgoing webhook.