1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-28 10:40:28 +02:00

[ticket/13713] Add type hints and clean up code

PHPBB3-13713
This commit is contained in:
Marc Alexander
2021-05-04 21:23:21 +02:00
parent 794b77971c
commit ed291843f2
10 changed files with 102 additions and 79 deletions

View File

@@ -21,7 +21,7 @@ class team extends base_user
/**
* {@inheritdoc}
*/
protected function query($keyword, $topic_id)
protected function query(string $keyword, int $topic_id): string
{
/*
* Select unique names of team members: each name should be selected only once
@@ -31,7 +31,7 @@ class team extends base_user
* Names filtering is done on the frontend
* Results will be cached in a single file
*/
$query = $this->db->sql_build_query('SELECT_DISTINCT', [
return $this->db->sql_build_query('SELECT_DISTINCT', [
'SELECT' => 'u.username_clean, u.user_id',
'FROM' => [
USERS_TABLE => 'u',
@@ -42,6 +42,5 @@ class team extends base_user
AND ' . $this->db->sql_in_set('u.user_type', [USER_NORMAL, USER_FOUNDER]),
'ORDER_BY' => 'u.username_clean'
]);
return $query;
}
}