Skip to content

Commit 9b1993a

Browse files
authored
Merge pull request #104 from Eleirbag89/analysis-8moDJE
Apply fixes from StyleCI
2 parents a4a10d2 + 757bc10 commit 9b1993a

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

Telegram.php

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@ public function sendPhoto(array $content)
266266

267267
/**
268268
* Use this method to send audio files, if you want Telegram clients to display them in the music player. Your audio must be in the .mp3 format. On success, the sent Message is returned. Bots can currently send audio files of up to 50 MB in size, this limit may be changed in the future.
269-
269+
*
270270
* For backward compatibility, when the fields title and performer are both empty and the mime-type of the file to be sent is not audio/mpeg, the file will be sent as a playable voice message. For this to work, the audio must be in an .ogg file encoded with OPUS. This behavior will be phased out in the future. For sending voice messages, use the sendVoice method instead.<br/>Values inside $content:<br/>
271271
* <table>
272272
* <tr>
@@ -708,9 +708,9 @@ public function sendContact(array $content)
708708

709709
/**
710710
* Use this method when you need to tell the user that something is happening on the bot's side. The status is set for 5 seconds or less (when a message arrives from your bot, Telegram clients clear its typing status).
711-
711+
*
712712
* Example: The ImageBot needs some time to process a request and upload the image. Instead of sending a text message along the lines of “Retrieving image, please wait…”, the bot may use sendChatAction with action = upload_photo. The user will see a “sending photo” status for the bot.
713-
713+
*
714714
* We only recommend using this method when a response from the bot will take a noticeable amount of time to arrive.<br/>Values inside $content:<br/>
715715
* <table>
716716
* <tr>
@@ -1322,7 +1322,7 @@ public function downloadFile($telegram_file_path, $local_file_path)
13221322

13231323
/**
13241324
* Use this method to specify a url and receive incoming updates via an outgoing webhook. Whenever there is an update for the bot, we will send an HTTPS POST request to the specified url, containing a JSON-serialized Update. In case of an unsuccessful request, we will give up after a reasonable amount of attempts.
1325-
1325+
*
13261326
* If you'd like to make sure that the Webhook request comes from Telegram, we recommend using a secret path in the URL, e.g. https://www.example.com/<token>. Since nobody else knows your bot‘s token, you can be pretty sure it’s us.
13271327
* \param $url String HTTPS url to send updates to. Use an empty string to remove webhook integration
13281328
* \param $certificate InputFile Upload your public key certificate so that the root certificate in use can be checked
@@ -1529,7 +1529,7 @@ public function LastName()
15291529
return @$this->data['message']['from']['last_name'];
15301530
}
15311531

1532-
/// Get the username of the user
1532+
/// Get the username of the user
15331533
public function Username()
15341534
{
15351535
if ($this->getUpdateType() == self::CALLBACK_QUERY) {
@@ -1539,19 +1539,19 @@ public function Username()
15391539
return @$this->data['message']['from']['username'];
15401540
}
15411541

1542-
/// Get the location in the message
1542+
/// Get the location in the message
15431543
public function Location()
15441544
{
15451545
return $this->data['message']['location'];
15461546
}
15471547

1548-
/// Get the update_id of the message
1548+
/// Get the update_id of the message
15491549
public function UpdateID()
15501550
{
15511551
return $this->data['update_id'];
15521552
}
15531553

1554-
/// Get the number of updates
1554+
/// Get the number of updates
15551555
public function UpdateCount()
15561556
{
15571557
return count($this->updates['result']);

bot examples/webhook/update.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
//Test Inline
3636
$data = $telegram->getData();
3737
if ($data['inline_query'] !== null && $data['inline_query'] != '') {
38-
$query = $data["inline_query"]["query"];
38+
$query = $data['inline_query']['query'];
3939
// GIF Examples
4040
if (strpos('testText', $query) !== false) {
4141
$results = json_encode([['type' => 'gif', 'id'=> '1', 'gif_url' => 'http://i1260.photobucket.com/albums/ii571/LMFAOSPEAKS/LMFAO/113481459.gif', 'thumb_url'=>'http://i1260.photobucket.com/albums/ii571/LMFAOSPEAKS/LMFAO/113481459.gif']]);
@@ -58,9 +58,9 @@
5858
} else {
5959
$reply = 'Private Chat';
6060
}
61-
// Create option for the custom keyboard. Array of array string
62-
$option = [['A', 'B'], ['C', 'D']];
63-
// Get the keyboard
61+
// Create option for the custom keyboard. Array of array string
62+
$option = [['A', 'B'], ['C', 'D']];
63+
// Get the keyboard
6464
$keyb = $telegram->buildKeyBoard($option);
6565
$content = ['chat_id' => $chat_id, 'reply_markup' => $keyb, 'text' => $reply];
6666
$telegram->sendMessage($content);
@@ -84,7 +84,7 @@
8484
$telegram->sendLocation($content);
8585
} elseif ($text == '/inlinekeyboard') {
8686
// Shows the Inline Keyboard and Trigger a callback on a button press
87-
$option = [
87+
$option = [
8888
[
8989
$telegram->buildInlineKeyBoardButton('Callback 1', $url = '', $callback_data = '1'),
9090
$telegram->buildInlineKeyBoardButton('Callback 2', $url = '', $callback_data = '2'),

0 commit comments

Comments
 (0)