mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-21 16:01:40 +02:00
[ticket/13713] Add type hints and clean up code
PHPBB3-13713
This commit is contained in:
@@ -18,7 +18,7 @@ class user extends base_user
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function get_priority($row)
|
||||
public function get_priority(array $row): int
|
||||
{
|
||||
/*
|
||||
* Presence in array with all names for this type should not increase the priority
|
||||
@@ -32,17 +32,16 @@ class user extends base_user
|
||||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
protected function query($keyword, $topic_id)
|
||||
protected function query(string $keyword, int $topic_id): string
|
||||
{
|
||||
$query = $this->db->sql_build_query('SELECT', [
|
||||
'SELECT' => 'u.username_clean, u.user_id',
|
||||
'FROM' => [
|
||||
return $this->db->sql_build_query('SELECT', [
|
||||
'SELECT' => 'u.username_clean, u.user_id',
|
||||
'FROM' => [
|
||||
USERS_TABLE => 'u',
|
||||
],
|
||||
'WHERE' => $this->db->sql_in_set('u.user_type', [USER_NORMAL, USER_FOUNDER]) . '
|
||||
'WHERE' => $this->db->sql_in_set('u.user_type', [USER_NORMAL, USER_FOUNDER]) . '
|
||||
AND u.username_clean ' . $this->db->sql_like_expression($keyword . $this->db->get_any_char()),
|
||||
'ORDER_BY' => 'u.user_lastvisit DESC'
|
||||
'ORDER_BY' => 'u.user_lastvisit DESC'
|
||||
]);
|
||||
return $query;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user