Fix whitespace characters in code

This commit is contained in:
Visman 2019-12-21 17:12:35 +07:00
parent 7aae6fa49d
commit f85405c48e
3 changed files with 10 additions and 10 deletions

View file

@ -171,8 +171,8 @@ class Mysql
*
* @return bool
*/
public function fieldExists($table, $field, $noPrefix = false)
{
public function fieldExists($table, $field, $noPrefix = false)
{
$table = ($noPrefix ? '' : $this->dbPrefix) . $table;
try {
$stmt = $this->db->query('SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = DATABASE() AND TABLE_NAME = ?s:table AND COLUMN_NAME = ?s:field', [':table' => $table, ':field' => $field]);
@ -182,7 +182,7 @@ class Mysql
return false;
}
return ! empty($result);
}
}
/**
* Проверяет наличие индекса в таблице
@ -301,7 +301,7 @@ class Mysql
{
$table = ($noPrefix ? '' : $this->dbPrefix) . $table;
$this->testStr($table);
return $this->db->exec("DROP TABLE IF EXISTS `{$table}`") !== false;
return $this->db->exec("DROP TABLE IF EXISTS `{$table}`") !== false;
}
/**
@ -371,8 +371,8 @@ class Mysql
*
* @return bool
*/
public function alterField($table, $field, $type, $allowNull, $default = null, $after = null, $noPrefix = false)
{
public function alterField($table, $field, $type, $allowNull, $default = null, $after = null, $noPrefix = false)
{
$table = ($noPrefix ? '' : $this->dbPrefix) . $table;
$this->testStr($table);
$this->testStr($field);
@ -388,7 +388,7 @@ class Mysql
$query .= " AFTER `{$after}`";
}
return $this->db->exec($query) !== false;
}
}
/**
* Удаляет поле из таблицы

View file

@ -90,7 +90,7 @@ class Secury
if (\strlen($key) < $len) {
throw new RuntimeException('Could not gather sufficient random data');
}
return $key;
return $key;
}
/**

View file

@ -191,9 +191,9 @@ class View extends Action
if ($arg instanceof Topic) {
foreach ($result as $post) {
if ($post->id === $arg->last_post_id) { // время последнего сообщения в теме может равняться
if ($post->id === $arg->last_post_id) { // время последнего сообщения в теме может равняться
$timeMax = $arg->last_post; // времени его редактирования, а не создания
} elseif ($post->posted > $timeMax) {
} elseif ($post->posted > $timeMax) {
$timeMax = $post->posted;
}
if ($post->id === $arg->first_post_id && $offset > 0) {