diff options
author | Faraz Samapoor <f.samapoor@gmail.com> | 2023-06-04 23:46:27 +0330 |
---|---|---|
committer | Louis <6653109+artonge@users.noreply.github.com> | 2023-06-16 19:29:40 +0200 |
commit | 4bf610ebaf52447a678e83d40a98463969e6fd51 (patch) | |
tree | 93f2cab7e491ac9f2071e69aa8754b4ab9243ca1 /core/Controller/ProfileApiController.php | |
parent | d820ab2ca8342d756ec8e0554e180e7f00cc3860 (diff) | |
download | nextcloud-server-4bf610ebaf52447a678e83d40a98463969e6fd51.tar.gz nextcloud-server-4bf610ebaf52447a678e83d40a98463969e6fd51.zip |
Refactors controllers by using PHP8's constructor property promotion.
Signed-off-by: Faraz Samapoor <f.samapoor@gmail.com>
Diffstat (limited to 'core/Controller/ProfileApiController.php')
-rw-r--r-- | core/Controller/ProfileApiController.php | 21 |
1 files changed, 5 insertions, 16 deletions
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; } /** |