From 4bf610ebaf52447a678e83d40a98463969e6fd51 Mon Sep 17 00:00:00 2001 From: Faraz Samapoor Date: Sun, 4 Jun 2023 23:46:27 +0330 Subject: Refactors controllers by using PHP8's constructor property promotion. Signed-off-by: Faraz Samapoor --- core/Controller/ProfileApiController.php | 21 +++++---------------- 1 file changed, 5 insertions(+), 16 deletions(-) (limited to 'core/Controller/ProfileApiController.php') diff --git a/core/Controller/ProfileApiController.php b/core/Controller/ProfileApiController.php index 6d1b856929a..8fde293d5c9 100644 --- a/core/Controller/ProfileApiController.php +++ b/core/Controller/ProfileApiController.php @@ -38,23 +38,12 @@ use OCP\IUserSession; use OC\Profile\ProfileManager; class ProfileApiController extends OCSController { - private ProfileConfigMapper $configMapper; - private ProfileManager $profileManager; - private IUserManager $userManager; - private IUserSession $userSession; - - public function __construct( - IRequest $request, - ProfileConfigMapper $configMapper, - ProfileManager $profileManager, - IUserManager $userManager, - IUserSession $userSession - ) { + public function __construct(IRequest $request, + private ProfileConfigMapper $configMapper, + private ProfileManager $profileManager, + private IUserManager $userManager, + private IUserSession $userSession) { parent::__construct('core', $request); - $this->configMapper = $configMapper; - $this->profileManager = $profileManager; - $this->userManager = $userManager; - $this->userSession = $userSession; } /** -- cgit v1.2.3