Skip to content

Commit

Permalink
Merge pull request #109 from Eleirbag89/analysis-qMxjPv
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
Eleirbag89 committed Oct 2, 2017
2 parents 4a98375 + 1a3ae0d commit 7ef52dd
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Telegram.php
Expand Up @@ -256,7 +256,7 @@ public function forwardMessage(array $content)
* <td>Integer</td>
* <td>Optional</td>
* <td>If the message is a reply, ID of the original message</td>
* </tr>
* </tr>
* <tr>
* <td>disable_notification</td>
* <td>Boolean</td>
Expand Down Expand Up @@ -1454,7 +1454,7 @@ public function Text()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['text'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['text'];
}

Expand All @@ -1480,9 +1480,10 @@ public function ChatID()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['chat']['id'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['chat']['id'];
}

return $this->data['message']['chat']['id'];
}

Expand All @@ -1500,7 +1501,7 @@ public function MessageID()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['message_id'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['message_id'];
}

Expand Down Expand Up @@ -1609,7 +1610,7 @@ public function FirstName()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['from']['first_name'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['from']['first_name'];
}

Expand All @@ -1626,7 +1627,7 @@ public function LastName()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['from']['last_name'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['from']['last_name'];
}

Expand All @@ -1643,7 +1644,7 @@ public function Username()
if ($type == self::CHANNEL_POST) {
return @$this->data['channel_post']['from']['username'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['from']['username'];
}

Expand Down Expand Up @@ -1678,7 +1679,7 @@ public function UserID()
if ($type == self::CHANNEL_POST) {
return $this->data['channel_post']['from']['id'];
}
if ($type == self::EDITED_MESSAGE) {
if ($type == self::EDITED_MESSAGE) {
return @$this->data['edited_message']['from']['id'];
}

Expand Down Expand Up @@ -2844,7 +2845,7 @@ private function sendAPIRequest($url, array $content, $post = true)
}
curl_close($ch);
if (class_exists('TelegramErrorLogger')) {
$loggerArray = ($this->getData() == null) ? [$content] : [$this->getData(), $content];
$loggerArray = ($this->getData() == null) ? [$content] : [$this->getData(), $content];
TelegramErrorLogger::log(json_decode($result, true), $loggerArray);
}

Expand Down

0 comments on commit 7ef52dd

Please sign in to comment.