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/PreviewController.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/PreviewController.php')
-rw-r--r-- | core/Controller/PreviewController.php | 15 |
1 files changed, 3 insertions, 12 deletions
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; } /** |