Skip to content

Commit 184504b

Browse files
committed
fix phpcs syntax
1 parent 64860c5 commit 184504b

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

src/Entities/ServerResponse.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ public function __construct(array $data, $bot_name)
3232
$this->result = new Message($data['result'], $bot_name);
3333
$this->error_code = null;
3434
$this->description = null;
35-
} elseif($data['ok'] & $data['result'] == 1) {
35+
} elseif ($data['ok'] & $data['result'] == 1) {
3636
//Response from setWebhook set
3737
$this->ok = $data['ok'];
3838
$this->result = $data['result'];

src/Request.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ public static function send($action, array $data = null)
7676
$fake_response['ok'] = 1; // :)
7777

7878
//some fake data just to let iniatilize the class method SendMessage
79-
if (isset( $data['chat_id'])) {
79+
if (isset($data['chat_id'])) {
8080
$data['message_id'] = '123';
8181
$data['date'] = '123';
8282
$data['chat'] = array('id'=> $data['chat_id'] );
@@ -135,7 +135,6 @@ public static function getMe()
135135

136136
public static function setWebhook($url)
137137
{
138-
139138
$result = self::send('setWebhook', array('url' => $url));
140139
return $result;
141140
}

src/Telegram.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,9 @@ public function setWebHook($url)
792792
$result = Request::setWebhook($url);
793793

794794
if (!$result->isOk()) {
795-
throw new TelegramException('Webhook was not set! Error: '.$result->getErrorCode().' '. $result->getDescription());
795+
throw new TelegramException(
796+
'Webhook was not set! Error: '.$result->getErrorCode().' '. $result->getDescription()
797+
);
796798
}
797799

798800
return $result;

0 commit comments

Comments
 (0)