@@ -47,7 +47,7 @@ discard block |
||
47 | 47 | // Informational 1xx |
48 | 48 | 100 => 'Continue', |
49 | 49 | 101 => 'Switching Protocols', |
50 | - 102 => 'Processing', // RFC2518 |
|
50 | + 102 => 'Processing', // RFC2518 |
|
51 | 51 | // Success 2xx |
52 | 52 | 200 => 'OK', |
53 | 53 | 201 => 'Created', |
@@ -56,9 +56,9 @@ discard block |
||
56 | 56 | 204 => 'No Content', |
57 | 57 | 205 => 'Reset Content', |
58 | 58 | 206 => 'Partial Content', |
59 | - 207 => 'Multi-Status', // RFC4918 |
|
60 | - 208 => 'Already Reported', // RFC5842 |
|
61 | - 226 => 'IM Used', // RFC3229 |
|
59 | + 207 => 'Multi-Status', // RFC4918 |
|
60 | + 208 => 'Already Reported', // RFC5842 |
|
61 | + 226 => 'IM Used', // RFC3229 |
|
62 | 62 | // Redirection 3xx |
63 | 63 | 300 => 'Multiple Choices', |
64 | 64 | 301 => 'Moved Permanently', |
@@ -68,7 +68,7 @@ discard block |
||
68 | 68 | 305 => 'Use Proxy', |
69 | 69 | // 306 is deprecated but reserved |
70 | 70 | 307 => 'Temporary Redirect', |
71 | - 308 => 'Permanent Redirect', // RFC7238 |
|
71 | + 308 => 'Permanent Redirect', // RFC7238 |
|
72 | 72 | // Client Error 4xx |
73 | 73 | 400 => 'Bad Request', |
74 | 74 | 401 => 'Unauthorized', |
@@ -88,14 +88,14 @@ discard block |
||
88 | 88 | 415 => 'Unsupported Media Type', |
89 | 89 | 416 => 'Range Not Satisfiable', |
90 | 90 | 417 => 'Expectation Failed', |
91 | - 422 => 'Unprocessable Entity', // RFC4918 |
|
92 | - 423 => 'Locked', // RFC4918 |
|
93 | - 424 => 'Failed Dependency', // RFC4918 |
|
94 | - 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 |
|
95 | - 426 => 'Upgrade Required', // RFC2817 |
|
96 | - 428 => 'Precondition Required', // RFC6585 |
|
97 | - 429 => 'Too Many Requests', // RFC6585 |
|
98 | - 431 => 'Request Header Fields Too Large', // RFC6585 |
|
91 | + 422 => 'Unprocessable Entity', // RFC4918 |
|
92 | + 423 => 'Locked', // RFC4918 |
|
93 | + 424 => 'Failed Dependency', // RFC4918 |
|
94 | + 425 => 'Reserved for WebDAV advanced collections expired proposal', // RFC2817 |
|
95 | + 426 => 'Upgrade Required', // RFC2817 |
|
96 | + 428 => 'Precondition Required', // RFC6585 |
|
97 | + 429 => 'Too Many Requests', // RFC6585 |
|
98 | + 431 => 'Request Header Fields Too Large', // RFC6585 |
|
99 | 99 | // Server Error 5xx |
100 | 100 | 500 => 'Internal Server Error', |
101 | 101 | 501 => 'Not Implemented', |
@@ -103,14 +103,14 @@ discard block |
||
103 | 103 | 503 => 'Service Unavailable', |
104 | 104 | 504 => 'Gateway Timeout', |
105 | 105 | 505 => 'HTTP Version Not Supported', |
106 | - 506 => 'Variant Also Negotiates (Experimental)', // RFC2295 |
|
107 | - 507 => 'Insufficient Storage', // RFC4918 |
|
108 | - 508 => 'Loop Detected', // RFC5842 |
|
109 | - 510 => 'Not Extended', // RFC2774 |
|
110 | - 511 => 'Network Authentication Required', // RFC6585 |
|
106 | + 506 => 'Variant Also Negotiates (Experimental)', // RFC2295 |
|
107 | + 507 => 'Insufficient Storage', // RFC4918 |
|
108 | + 508 => 'Loop Detected', // RFC5842 |
|
109 | + 510 => 'Not Extended', // RFC2774 |
|
110 | + 511 => 'Network Authentication Required', // RFC6585 |
|
111 | 111 | ]; |
112 | 112 | |
113 | - private $proxySettings = []; |
|
113 | + private $proxySettings = [ ]; |
|
114 | 114 | |
115 | 115 | /** |
116 | 116 | * Default http status code |
@@ -149,7 +149,7 @@ discard block |
||
149 | 149 | * |
150 | 150 | * @var array |
151 | 151 | */ |
152 | - protected $customCurlOptions = []; |
|
152 | + protected $customCurlOptions = [ ]; |
|
153 | 153 | |
154 | 154 | /** |
155 | 155 | * Bot token |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | * |
171 | 171 | * @var array |
172 | 172 | */ |
173 | - protected $trackedEvents = []; |
|
173 | + protected $trackedEvents = [ ]; |
|
174 | 174 | |
175 | 175 | /** |
176 | 176 | * Check whether return associative array |
@@ -225,7 +225,7 @@ discard block |
||
225 | 225 | public function call($method, array $data = null, $timeout = 10) |
226 | 226 | { |
227 | 227 | $options = $this->proxySettings + [ |
228 | - CURLOPT_URL => $this->getUrl().'/'.$method, |
|
228 | + CURLOPT_URL => $this->getUrl() . '/' . $method, |
|
229 | 229 | CURLOPT_RETURNTRANSFER => true, |
230 | 230 | CURLOPT_POST => null, |
231 | 231 | CURLOPT_POSTFIELDS => null, |
@@ -233,8 +233,8 @@ discard block |
||
233 | 233 | ]; |
234 | 234 | |
235 | 235 | if ($data) { |
236 | - $options[CURLOPT_POST] = true; |
|
237 | - $options[CURLOPT_POSTFIELDS] = $data; |
|
236 | + $options[ CURLOPT_POST ] = true; |
|
237 | + $options[ CURLOPT_POSTFIELDS ] = $data; |
|
238 | 238 | } |
239 | 239 | |
240 | 240 | if (!empty($this->customCurlOptions) && is_array($this->customCurlOptions)) { |
@@ -244,11 +244,11 @@ discard block |
||
244 | 244 | $response = self::jsonValidate($this->executeCurl($options), $this->returnArray); |
245 | 245 | |
246 | 246 | if ($this->returnArray) { |
247 | - if (!isset($response['ok']) || !$response['ok']) { |
|
248 | - throw new Exception($response['description'], $response['error_code']); |
|
247 | + if (!isset($response[ 'ok' ]) || !$response[ 'ok' ]) { |
|
248 | + throw new Exception($response[ 'description' ], $response[ 'error_code' ]); |
|
249 | 249 | } |
250 | 250 | |
251 | - return $response['result']; |
|
251 | + return $response[ 'result' ]; |
|
252 | 252 | } |
253 | 253 | |
254 | 254 | if (!$response->ok) { |
@@ -289,12 +289,12 @@ discard block |
||
289 | 289 | */ |
290 | 290 | public static function curlValidate($curl, $response = null) |
291 | 291 | { |
292 | - $json = json_decode($response, true) ?: []; |
|
292 | + $json = json_decode($response, true) ?: [ ]; |
|
293 | 293 | if (($httpCode = curl_getinfo($curl, CURLINFO_HTTP_CODE)) |
294 | - && !in_array($httpCode, [self::DEFAULT_STATUS_CODE, self::NOT_MODIFIED_STATUS_CODE]) |
|
294 | + && !in_array($httpCode, [ self::DEFAULT_STATUS_CODE, self::NOT_MODIFIED_STATUS_CODE ]) |
|
295 | 295 | ) { |
296 | - $errorDescription = array_key_exists('description', $json) ? $json['description'] : self::$codes[$httpCode]; |
|
297 | - $errorParameters = array_key_exists('parameters', $json) ? $json['parameters'] : []; |
|
296 | + $errorDescription = array_key_exists('description', $json) ? $json[ 'description' ] : self::$codes[ $httpCode ]; |
|
297 | + $errorParameters = array_key_exists('parameters', $json) ? $json[ 'parameters' ] : [ ]; |
|
298 | 298 | throw new HttpException($errorDescription, $httpCode, null, $errorParameters); |
299 | 299 | } |
300 | 300 | } |
@@ -351,9 +351,9 @@ discard block |
||
351 | 351 | 'message_thread_id' => $messageThreadId, |
352 | 352 | 'parse_mode' => $parseMode, |
353 | 353 | 'disable_web_page_preview' => $disablePreview, |
354 | - 'reply_to_message_id' => (int)$replyToMessageId, |
|
354 | + 'reply_to_message_id' => (int) $replyToMessageId, |
|
355 | 355 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
356 | - 'disable_notification' => (bool)$disableNotification, |
|
356 | + 'disable_notification' => (bool) $disableNotification, |
|
357 | 357 | ])); |
358 | 358 | } |
359 | 359 | |
@@ -391,14 +391,14 @@ discard block |
||
391 | 391 | return MessageId::fromResponse($this->call('copyMessage', [ |
392 | 392 | 'chat_id' => $chatId, |
393 | 393 | 'from_chat_id' => $fromChatId, |
394 | - 'message_id' => (int)$messageId, |
|
394 | + 'message_id' => (int) $messageId, |
|
395 | 395 | 'caption' => $caption, |
396 | 396 | 'parse_mode' => $parseMode, |
397 | 397 | 'caption_entities' => $captionEntities, |
398 | - 'disable_notification' => (bool)$disableNotification, |
|
398 | + 'disable_notification' => (bool) $disableNotification, |
|
399 | 399 | 'message_thread_id' => $messageThreadId, |
400 | - 'reply_to_message_id' => (int)$replyToMessageId, |
|
401 | - 'allow_sending_without_reply' => (bool)$allowSendingWithoutReply, |
|
400 | + 'reply_to_message_id' => (int) $replyToMessageId, |
|
401 | + 'allow_sending_without_reply' => (bool) $allowSendingWithoutReply, |
|
402 | 402 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
403 | 403 | ])); |
404 | 404 | } |
@@ -436,7 +436,7 @@ discard block |
||
436 | 436 | 'message_thread_id' => $messageThreadId, |
437 | 437 | 'reply_to_message_id' => $replyToMessageId, |
438 | 438 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
439 | - 'disable_notification' => (bool)$disableNotification, |
|
439 | + 'disable_notification' => (bool) $disableNotification, |
|
440 | 440 | ])); |
441 | 441 | } |
442 | 442 | |
@@ -479,9 +479,9 @@ discard block |
||
479 | 479 | public function getUserProfilePhotos($userId, $offset = 0, $limit = 100) |
480 | 480 | { |
481 | 481 | return UserProfilePhotos::fromResponse($this->call('getUserProfilePhotos', [ |
482 | - 'user_id' => (int)$userId, |
|
483 | - 'offset' => (int)$offset, |
|
484 | - 'limit' => (int)$limit, |
|
482 | + 'user_id' => (int) $userId, |
|
483 | + 'offset' => (int) $offset, |
|
484 | + 'limit' => (int) $limit, |
|
485 | 485 | ])); |
486 | 486 | } |
487 | 487 | |
@@ -546,7 +546,7 @@ discard block |
||
546 | 546 | */ |
547 | 547 | public function deleteWebhook($drop_pending_updates = false) |
548 | 548 | { |
549 | - return $this->call('deleteWebhook', ['drop_pending_updates' => $drop_pending_updates]); |
|
549 | + return $this->call('deleteWebhook', [ 'drop_pending_updates' => $drop_pending_updates ]); |
|
550 | 550 | } |
551 | 551 | |
552 | 552 | /** |
@@ -644,7 +644,7 @@ discard block |
||
644 | 644 | 'message_thread_id' => $messageThreadId, |
645 | 645 | 'reply_to_message_id' => $replyToMessageId, |
646 | 646 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
647 | - 'disable_notification' => (bool)$disableNotification, |
|
647 | + 'disable_notification' => (bool) $disableNotification, |
|
648 | 648 | ])); |
649 | 649 | } |
650 | 650 | |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | 'message_thread_id' => $messageThreadId, |
747 | 747 | 'reply_to_message_id' => $replyToMessageId, |
748 | 748 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
749 | - 'disable_notification' => (bool)$disableNotification, |
|
749 | + 'disable_notification' => (bool) $disableNotification, |
|
750 | 750 | ])); |
751 | 751 | } |
752 | 752 | |
@@ -781,9 +781,9 @@ discard block |
||
781 | 781 | 'message_thread_id' => $messageThreadId, |
782 | 782 | 'reply_to_message_id' => $replyToMessageId, |
783 | 783 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
784 | - 'disable_notification' => (bool)$disableNotification, |
|
785 | - 'protect_content' => (bool)$protectContent, |
|
786 | - 'allow_sending_without_reply' => (bool)$allowSendingWithoutReply, |
|
784 | + 'disable_notification' => (bool) $disableNotification, |
|
785 | + 'protect_content' => (bool) $protectContent, |
|
786 | + 'allow_sending_without_reply' => (bool) $allowSendingWithoutReply, |
|
787 | 787 | ])); |
788 | 788 | } |
789 | 789 | |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | * |
810 | 810 | * @author bernard-ng <[email protected]> |
811 | 811 | */ |
812 | - public function getCustomEmojiStickers($customEmojiIds = []) |
|
812 | + public function getCustomEmojiStickers($customEmojiIds = [ ]) |
|
813 | 813 | { |
814 | 814 | return StickerSet::fromResponse($this->call('getCustomEmojiStickers', [ |
815 | 815 | 'custom_emoji_ids' => $customEmojiIds, |
@@ -1006,8 +1006,8 @@ discard block |
||
1006 | 1006 | 'message_thread_id' => $messageThreadId, |
1007 | 1007 | 'reply_to_message_id' => $replyToMessageId, |
1008 | 1008 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1009 | - 'disable_notification' => (bool)$disableNotification, |
|
1010 | - 'supports_streaming' => (bool)$supportsStreaming, |
|
1009 | + 'disable_notification' => (bool) $disableNotification, |
|
1010 | + 'supports_streaming' => (bool) $supportsStreaming, |
|
1011 | 1011 | 'parse_mode' => $parseMode |
1012 | 1012 | ])); |
1013 | 1013 | } |
@@ -1050,7 +1050,7 @@ discard block |
||
1050 | 1050 | 'message_thread_id' => $messageThreadId, |
1051 | 1051 | 'reply_to_message_id' => $replyToMessageId, |
1052 | 1052 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1053 | - 'disable_notification' => (bool)$disableNotification, |
|
1053 | + 'disable_notification' => (bool) $disableNotification, |
|
1054 | 1054 | 'parse_mode' => $parseMode |
1055 | 1055 | ])); |
1056 | 1056 | } |
@@ -1099,7 +1099,7 @@ discard block |
||
1099 | 1099 | 'message_thread_id' => $messageThreadId, |
1100 | 1100 | 'reply_to_message_id' => $replyToMessageId, |
1101 | 1101 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1102 | - 'disable_notification' => (bool)$disableNotification, |
|
1102 | + 'disable_notification' => (bool) $disableNotification, |
|
1103 | 1103 | 'allow_sending_without_reply' => $allowSendingWithoutReply, |
1104 | 1104 | 'parse_mode' => $parseMode |
1105 | 1105 | ])); |
@@ -1135,7 +1135,7 @@ discard block |
||
1135 | 1135 | 'message_id' => $messageId, |
1136 | 1136 | 'message_thread_id' => $messageThreadId, |
1137 | 1137 | 'protect_content' => $protectContent, |
1138 | - 'disable_notification' => (bool)$disableNotification, |
|
1138 | + 'disable_notification' => (bool) $disableNotification, |
|
1139 | 1139 | ])); |
1140 | 1140 | } |
1141 | 1141 | |
@@ -1188,7 +1188,7 @@ discard block |
||
1188 | 1188 | 'title' => $title, |
1189 | 1189 | 'reply_to_message_id' => $replyToMessageId, |
1190 | 1190 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1191 | - 'disable_notification' => (bool)$disableNotification, |
|
1191 | + 'disable_notification' => (bool) $disableNotification, |
|
1192 | 1192 | 'parse_mode' => $parseMode |
1193 | 1193 | ])); |
1194 | 1194 | } |
@@ -1226,7 +1226,7 @@ discard block |
||
1226 | 1226 | 'message_thread_id' => $messageThreadId, |
1227 | 1227 | 'reply_to_message_id' => $replyToMessageId, |
1228 | 1228 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1229 | - 'disable_notification' => (bool)$disableNotification, |
|
1229 | + 'disable_notification' => (bool) $disableNotification, |
|
1230 | 1230 | 'parse_mode' => $parseMode |
1231 | 1231 | ])); |
1232 | 1232 | } |
@@ -1265,7 +1265,7 @@ discard block |
||
1265 | 1265 | 'message_thread_id' => $messageThreadId, |
1266 | 1266 | 'reply_to_message_id' => $replyToMessageId, |
1267 | 1267 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1268 | - 'disable_notification' => (bool)$disableNotification, |
|
1268 | + 'disable_notification' => (bool) $disableNotification, |
|
1269 | 1269 | 'parse_mode' => $parseMode |
1270 | 1270 | ])); |
1271 | 1271 | } |
@@ -1287,7 +1287,7 @@ discard block |
||
1287 | 1287 | */ |
1288 | 1288 | public function getFile($fileId) |
1289 | 1289 | { |
1290 | - return File::fromResponse($this->call('getFile', ['file_id' => $fileId])); |
|
1290 | + return File::fromResponse($this->call('getFile', [ 'file_id' => $fileId ])); |
|
1291 | 1291 | } |
1292 | 1292 | |
1293 | 1293 | /** |
@@ -1307,7 +1307,7 @@ discard block |
||
1307 | 1307 | CURLOPT_HEADER => 0, |
1308 | 1308 | CURLOPT_HTTPGET => 1, |
1309 | 1309 | CURLOPT_RETURNTRANSFER => 1, |
1310 | - CURLOPT_URL => $this->getFileUrl().'/'.$file->getFilePath(), |
|
1310 | + CURLOPT_URL => $this->getFileUrl() . '/' . $file->getFilePath(), |
|
1311 | 1311 | ]; |
1312 | 1312 | |
1313 | 1313 | return $this->executeCurl($options); |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | $switchPmText = null, |
1338 | 1338 | $switchPmParameter = null |
1339 | 1339 | ) { |
1340 | - $results = array_map(function ($item) { |
|
1340 | + $results = array_map(function($item) { |
|
1341 | 1341 | /* @var AbstractInlineQueryResult $item */ |
1342 | 1342 | return json_decode($item->toJson(), true); |
1343 | 1343 | }, $results); |
@@ -1416,7 +1416,7 @@ discard block |
||
1416 | 1416 | return $this->call('answerCallbackQuery', [ |
1417 | 1417 | 'callback_query_id' => $callbackQueryId, |
1418 | 1418 | 'text' => $text, |
1419 | - 'show_alert' => (bool)$showAlert, |
|
1419 | + 'show_alert' => (bool) $showAlert, |
|
1420 | 1420 | 'url' => $url, |
1421 | 1421 | 'cache_time' => $cacheTime |
1422 | 1422 | ]); |
@@ -1618,7 +1618,7 @@ discard block |
||
1618 | 1618 | */ |
1619 | 1619 | public function getUrl() |
1620 | 1620 | { |
1621 | - return self::URL_PREFIX.$this->token; |
|
1621 | + return self::URL_PREFIX . $this->token; |
|
1622 | 1622 | } |
1623 | 1623 | |
1624 | 1624 | /** |
@@ -1626,7 +1626,7 @@ discard block |
||
1626 | 1626 | */ |
1627 | 1627 | public function getFileUrl() |
1628 | 1628 | { |
1629 | - return self::FILE_URL_PREFIX.$this->token; |
|
1629 | + return self::FILE_URL_PREFIX . $this->token; |
|
1630 | 1630 | } |
1631 | 1631 | |
1632 | 1632 | /** |
@@ -1638,7 +1638,7 @@ discard block |
||
1638 | 1638 | public function trackUpdate(Update $update, $eventName = 'Message') |
1639 | 1639 | { |
1640 | 1640 | if (!in_array($update->getUpdateId(), $this->trackedEvents)) { |
1641 | - $this->trackedEvents[] = $update->getUpdateId(); |
|
1641 | + $this->trackedEvents[ ] = $update->getUpdateId(); |
|
1642 | 1642 | |
1643 | 1643 | $this->track($update->getMessage(), $eventName); |
1644 | 1644 | |
@@ -1740,10 +1740,10 @@ discard block |
||
1740 | 1740 | 'need_shipping_address' => $needShippingAddress, |
1741 | 1741 | 'reply_to_message_id' => $replyToMessageId, |
1742 | 1742 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
1743 | - 'disable_notification' => (bool)$disableNotification, |
|
1743 | + 'disable_notification' => (bool) $disableNotification, |
|
1744 | 1744 | 'provider_data' => $providerData, |
1745 | - 'send_phone_number_to_provider' => (bool)$sendPhoneNumberToProvider, |
|
1746 | - 'send_email_to_provider' => (bool)$sendEmailToProvider |
|
1745 | + 'send_phone_number_to_provider' => (bool) $sendPhoneNumberToProvider, |
|
1746 | + 'send_email_to_provider' => (bool) $sendEmailToProvider |
|
1747 | 1747 | ])); |
1748 | 1748 | } |
1749 | 1749 | |
@@ -1760,11 +1760,11 @@ discard block |
||
1760 | 1760 | * @return bool |
1761 | 1761 | * @throws Exception |
1762 | 1762 | */ |
1763 | - public function answerShippingQuery($shippingQueryId, $ok = true, $shipping_options = [], $errorMessage = null) |
|
1763 | + public function answerShippingQuery($shippingQueryId, $ok = true, $shipping_options = [ ], $errorMessage = null) |
|
1764 | 1764 | { |
1765 | 1765 | return $this->call('answerShippingQuery', [ |
1766 | 1766 | 'shipping_query_id' => $shippingQueryId, |
1767 | - 'ok' => (bool)$ok, |
|
1767 | + 'ok' => (bool) $ok, |
|
1768 | 1768 | 'shipping_options' => json_encode($shipping_options), |
1769 | 1769 | 'error_message' => $errorMessage |
1770 | 1770 | ]); |
@@ -1785,7 +1785,7 @@ discard block |
||
1785 | 1785 | { |
1786 | 1786 | return $this->call('answerPreCheckoutQuery', [ |
1787 | 1787 | 'pre_checkout_query_id' => $preCheckoutQueryId, |
1788 | - 'ok' => (bool)$ok, |
|
1788 | + 'ok' => (bool) $ok, |
|
1789 | 1789 | 'error_message' => $errorMessage |
1790 | 1790 | ]); |
1791 | 1791 | } |
@@ -2144,7 +2144,7 @@ discard block |
||
2144 | 2144 | 'message_thread_id' => $messageThreadId, |
2145 | 2145 | 'reply_to_message_id' => $replyToMessageId, |
2146 | 2146 | 'reply_markup' => is_null($replyMarkup) ? $replyMarkup : $replyMarkup->toJson(), |
2147 | - 'disable_notification' => (bool)$disableNotification |
|
2147 | + 'disable_notification' => (bool) $disableNotification |
|
2148 | 2148 | ])); |
2149 | 2149 | } |
2150 | 2150 | |
@@ -2172,8 +2172,8 @@ discard block |
||
2172 | 2172 | 'chat_id' => $chatId, |
2173 | 2173 | 'media' => $media->toJson(), |
2174 | 2174 | 'message_thread_id' => $messageThreadId, |
2175 | - 'reply_to_message_id' => (int)$replyToMessageId, |
|
2176 | - 'disable_notification' => (bool)$disableNotification |
|
2175 | + 'reply_to_message_id' => (int) $replyToMessageId, |
|
2176 | + 'disable_notification' => (bool) $disableNotification |
|
2177 | 2177 | ])); |
2178 | 2178 | } |
2179 | 2179 | |
@@ -2187,7 +2187,7 @@ discard block |
||
2187 | 2187 | public function setProxy($proxyString = '', $socks5 = false) |
2188 | 2188 | { |
2189 | 2189 | if (empty($proxyString)) { |
2190 | - $this->proxySettings = []; |
|
2190 | + $this->proxySettings = [ ]; |
|
2191 | 2191 | return $this; |
2192 | 2192 | } |
2193 | 2193 | |
@@ -2197,7 +2197,7 @@ discard block |
||
2197 | 2197 | ]; |
2198 | 2198 | |
2199 | 2199 | if ($socks5) { |
2200 | - $this->proxySettings[CURLOPT_PROXYTYPE] = CURLPROXY_SOCKS5; |
|
2200 | + $this->proxySettings[ CURLOPT_PROXYTYPE ] = CURLPROXY_SOCKS5; |
|
2201 | 2201 | } |
2202 | 2202 | return $this; |
2203 | 2203 | } |
@@ -2494,7 +2494,7 @@ discard block |
||
2494 | 2494 | */ |
2495 | 2495 | public function setCurlOption($option, $value) |
2496 | 2496 | { |
2497 | - $this->customCurlOptions[$option] = $value; |
|
2497 | + $this->customCurlOptions[ $option ] = $value; |
|
2498 | 2498 | } |
2499 | 2499 | |
2500 | 2500 | /** |
@@ -2504,7 +2504,7 @@ discard block |
||
2504 | 2504 | */ |
2505 | 2505 | public function unsetCurlOption($option) |
2506 | 2506 | { |
2507 | - unset($this->customCurlOptions[$option]); |
|
2507 | + unset($this->customCurlOptions[ $option ]); |
|
2508 | 2508 | } |
2509 | 2509 | |
2510 | 2510 | /** |
@@ -2512,6 +2512,6 @@ discard block |
||
2512 | 2512 | */ |
2513 | 2513 | public function resetCurlOptions() |
2514 | 2514 | { |
2515 | - $this->customCurlOptions = []; |
|
2515 | + $this->customCurlOptions = [ ]; |
|
2516 | 2516 | } |
2517 | 2517 | } |
@@ -15,7 +15,7 @@ |
||
15 | 15 | * |
16 | 16 | * @var array |
17 | 17 | */ |
18 | - protected static $requiredParams = ['message_id']; |
|
18 | + protected static $requiredParams = [ 'message_id' ]; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * {@inheritdoc} |