1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-28 18:49:52 +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 group extends base_group
/**
* {@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
@@ -35,15 +35,14 @@ class group extends base_group
/**
* {@inheritdoc}
*/
protected function query($keyword, $topic_id)
protected function query(string $keyword, int $topic_id): string
{
$query = $this->db->sql_build_query('SELECT', [
'SELECT' => 'g.group_id',
'FROM' => [
return $this->db->sql_build_query('SELECT', [
'SELECT' => 'g.group_id',
'FROM' => [
GROUPS_TABLE => 'g',
],
'ORDER_BY' => 'g.group_name',
]);
return $query;
}
}