Commit b1c17cae authored by Avtandil Kikabidze's avatar Avtandil Kikabidze

Fixed code style by phpcbf

parent 7ddb9386
......@@ -60,7 +60,7 @@ class WeatherCommand extends UserCommand
throw new TelegramException($e->getMessage());
}
return (string)$response->getBody();
return (string) $response->getBody();
}
/**
......
......@@ -296,8 +296,11 @@ class DB
$sth_insert_telegram_update->bindParam(':chat_id', $chat_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':message_id', $message_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':inline_query_id', $inline_query_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':chosen_inline_result_id', $chosen_inline_result_id,
PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(
':chosen_inline_result_id',
$chosen_inline_result_id,
PDO::PARAM_INT
);
$sth_insert_telegram_update->bindParam(':callback_query_id', $callback_query_id, PDO::PARAM_INT);
$sth_insert_telegram_update->bindParam(':edited_message_id', $edited_message_id, PDO::PARAM_INT);
......@@ -458,8 +461,15 @@ class DB
if (self::insertChosenInlineResultRequest($chosen_inline_result)) {
$chosen_inline_result_local_id = self::$pdo->lastInsertId();
return self::insertTelegramUpdate($update_id, null, null, null, $chosen_inline_result_local_id, null,
null);
return self::insertTelegramUpdate(
$update_id,
null,
null,
null,
$chosen_inline_result_local_id,
null,
null
);
}
} elseif ($update->getUpdateType() == 'callback_query') {
$callback_query = $update->getCallbackQuery();
......@@ -474,8 +484,15 @@ class DB
if (self::insertEditedMessageRequest($edited_message)) {
$chat_id = $edited_message->getChat()->getId();
$edited_message_local_id = self::$pdo->lastInsertId();
return self::insertTelegramUpdate($update_id, $chat_id, null, null, null, null,
$edited_message_local_id);
return self::insertTelegramUpdate(
$update_id,
$chat_id,
null,
null,
null,
null,
$edited_message_local_id
);
}
}
......
......@@ -176,7 +176,7 @@ class Request
//Fix so that the keyboard markup is a string, not an object
if (isset($data['reply_markup']) && !is_string($data['reply_markup'])) {
$data['reply_markup'] = (string)$data['reply_markup'];
$data['reply_markup'] = (string) $data['reply_markup'];
}
$request_params = ['debug' => $debug_handle];
......
......@@ -307,7 +307,7 @@ class Telegram
if ($response->isOk()) {
//Process all updates
foreach ((array)$response->getResult() as $result) {
foreach ((array) $response->getResult() as $result) {
$this->processUpdate($result);
}
}
......
......@@ -160,10 +160,12 @@ class TelegramLog
{
if (self::$debug_log_temp_stream_handle !== null) {
rewind(self::$debug_log_temp_stream_handle);
self::debug(sprintf(
$message,
stream_get_contents(self::$debug_log_temp_stream_handle)
));
self::debug(
sprintf(
$message,
stream_get_contents(self::$debug_log_temp_stream_handle)
)
);
fclose(self::$debug_log_temp_stream_handle);
self::$debug_log_temp_stream_handle = null;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment