From b70c6a128fe5d0053b7971881696eafce4cb7c26 Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Tue, 12 Apr 2022 17:55:01 +0200 Subject: Update core to PHP 7.4 standard - Typed properties - Port to LoggerInterface Signed-off-by: Carl Schwan --- core/Controller/GuestAvatarController.php | 25 ++++++------------------- 1 file changed, 6 insertions(+), 19 deletions(-) (limited to 'core/Controller/GuestAvatarController.php') diff --git a/core/Controller/GuestAvatarController.php b/core/Controller/GuestAvatarController.php index 6d14474ed44..9c0606f368f 100644 --- a/core/Controller/GuestAvatarController.php +++ b/core/Controller/GuestAvatarController.php @@ -26,37 +26,24 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http; use OCP\AppFramework\Http\FileDisplayResponse; use OCP\IAvatarManager; -use OCP\ILogger; use OCP\IRequest; +use Psr\Log\LoggerInterface; /** * This controller handles guest avatar requests. */ class GuestAvatarController extends Controller { - - /** - * @var ILogger - */ - private $logger; - - /** - * @var IAvatarManager - */ - private $avatarManager; + private LoggerInterface $logger; + private IAvatarManager $avatarManager; /** * GuestAvatarController constructor. - * - * @param $appName - * @param IRequest $request - * @param IAvatarManager $avatarManager - * @param ILogger $logger */ public function __construct( - $appName, + string $appName, IRequest $request, IAvatarManager $avatarManager, - ILogger $logger + LoggerInterface $logger ) { parent::__construct($appName, $request); $this->avatarManager = $avatarManager; @@ -73,7 +60,7 @@ class GuestAvatarController extends Controller { * @param string $size The desired avatar size, e.g. 64 for 64x64px * @return FileDisplayResponse|Http\Response */ - public function getAvatar($guestName, $size) { + public function getAvatar(string $guestName, string $size) { $size = (int) $size; if ($size <= 64) { -- cgit v1.2.3