Commit 59faa330 authored by LONGMAN's avatar LONGMAN

Code style fixes

parent af6f4df3
This diff is collapsed.
......@@ -54,7 +54,7 @@ class ChatsCommand extends AdminCommand
foreach ($results as $result) {
//Initialize a chat object
$result['id'] = $result['chat_id'];
$result['id'] = $result['chat_id'];
$chat = new Chat($result);
if ($chat->isPrivateChat()) {
......
......@@ -171,7 +171,7 @@ class ConversationDB extends DB
$where .= 'WHERE ';
}
++$tokens_counter;
$where .= '`' . $field .'`= :' . $tokens_counter ;
$where .= '`' . $field .'`= :' . $tokens_counter;
$tokens[':' . $tokens_counter] = $value;
}
......
......@@ -147,7 +147,7 @@ class DB
$query .= 'ORDER BY `id` DESC';
if (!is_null($limit)) {
$query .=' LIMIT :limit ';
$query .= ' LIMIT :limit ';
}
$sth_select_telegram_update = self::$pdo->prepare($query);
......@@ -182,7 +182,7 @@ class DB
$query .= 'ORDER BY ' . TB_MESSAGE . '.`message_id` DESC';
if (!is_null($limit)) {
$query .=' LIMIT :limit ';
$query .= ' LIMIT :limit ';
}
$sth = self::$pdo->prepare($query);
......@@ -684,7 +684,7 @@ class DB
if (! is_null($date_from)) {
$where[] = TB_CHAT . '.`updated_at` >= :date_from';
$tokens[':date_from'] = $date_from;
$tokens[':date_from'] = $date_from;
}
if (! is_null($date_to)) {
......@@ -692,7 +692,7 @@ class DB
$tokens[':date_to'] = $date_to;
}
$a=0;
$a = 0;
foreach ($where as $part) {
if ($a) {
$query .= ' AND ' . $part;
......
......@@ -49,7 +49,7 @@ class Chat extends Entity
public function isGroupChat()
{
if ($this->type == 'group' || $this->id < 0) {
if ($this->type == 'group' || $this->id < 0) {
return true;
}
return false;
......
......@@ -236,7 +236,7 @@ class Message extends Entity
public function getFullCommand()
{
if (substr($this->text, 0, 1) === '/') {
$no_EOL = strtok($this->text, PHP_EOL);
$no_EOL = strtok($this->text, PHP_EOL);
$no_space = strtok($this->text, ' ');
//try to understand which separator \n or space divide /command from text
......
......@@ -99,7 +99,7 @@ class ServerResponse extends Entity
//must be an array
protected function isAssoc(array $array)
{
return (bool)count(array_filter(array_keys($array), 'is_string'));
return (bool) count(array_filter(array_keys($array), 'is_string'));
}
public function isOk()
{
......
......@@ -208,9 +208,8 @@ class Request
//Logging getUpdates Update
//Logging curl updates
if ($action == 'getUpdates'
& self::$telegram->getLogVerbosity() >=1
| self::$telegram->getLogVerbosity() >=3) {
if ($action == 'getUpdates' & self::$telegram->getLogVerbosity() >= 1 | self::$telegram->getLogVerbosity() >= 3
) {
self::setInputRaw($result);
self::log($result);
}
......
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