From b8a76b412f378c3ede0f81fe476daca78d66366b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim=20D=C3=BCsterhus?= Date: Fri, 4 Mar 2022 20:11:15 +0100 Subject: [PATCH] Add proper types to TNeedsUser --- files/lib/system/command/TNeedsUser.class.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/files/lib/system/command/TNeedsUser.class.php b/files/lib/system/command/TNeedsUser.class.php index f318677..f299fca 100644 --- a/files/lib/system/command/TNeedsUser.class.php +++ b/files/lib/system/command/TNeedsUser.class.php @@ -26,11 +26,8 @@ trait TNeedsUser { /** * Returns the user with the given username. - * - * @param string $username - * @return \wcf\data\user\User */ - protected function getUser($username) + protected function getUser(string $username): User { static $cache = [ ]; if (!isset($cache[$username])) { @@ -42,11 +39,8 @@ protected function getUser($username) /** * Checks whether the given username is valid and throws otherwise. - * - * @param string $username - * @return \wcf\data\user\User */ - protected function assertUser($username) + protected function assertUser(string $username): User { $user = $this->getUser($username);