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/PreviewController.php | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'core/Controller/PreviewController.php') diff --git a/core/Controller/PreviewController.php b/core/Controller/PreviewController.php index 118f1b47752..d742af20e1d 100644 --- a/core/Controller/PreviewController.php +++ b/core/Controller/PreviewController.php @@ -40,21 +40,12 @@ use OCP\IPreview; use OCP\IRequest; class PreviewController extends Controller { - private ?string $userId; - private IRootFolder $root; - private IPreview $preview; - public function __construct(string $appName, IRequest $request, - IPreview $preview, - IRootFolder $root, - ?string $userId - ) { + private IPreview $preview, + private IRootFolder $root, + private ?string $userId) { parent::__construct($appName, $request); - - $this->preview = $preview; - $this->root = $root; - $this->userId = $userId; } /** -- cgit v1.2.3