aboutsummaryrefslogtreecommitdiffstats
path: root/apps/dav/lib/Direct/DirectFile.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/dav/lib/Direct/DirectFile.php')
-rw-r--r--apps/dav/lib/Direct/DirectFile.php19
1 files changed, 6 insertions, 13 deletions
diff --git a/apps/dav/lib/Direct/DirectFile.php b/apps/dav/lib/Direct/DirectFile.php
index 45d86fcaeae..7f41dd65f41 100644
--- a/apps/dav/lib/Direct/DirectFile.php
+++ b/apps/dav/lib/Direct/DirectFile.php
@@ -18,21 +18,14 @@ use Sabre\DAV\Exception\NotFound;
use Sabre\DAV\IFile;
class DirectFile implements IFile {
- /** @var Direct */
- private $direct;
-
- /** @var IRootFolder */
- private $rootFolder;
-
/** @var File */
private $file;
- private $eventDispatcher;
-
- public function __construct(Direct $direct, IRootFolder $rootFolder, IEventDispatcher $eventDispatcher) {
- $this->direct = $direct;
- $this->rootFolder = $rootFolder;
- $this->eventDispatcher = $eventDispatcher;
+ public function __construct(
+ private Direct $direct,
+ private IRootFolder $rootFolder,
+ private IEventDispatcher $eventDispatcher,
+ ) {
}
public function put($data) {
@@ -96,7 +89,7 @@ class DirectFile implements IFile {
throw new NotFound();
}
if (!$file instanceof File) {
- throw new Forbidden("direct download not allowed on directories");
+ throw new Forbidden('direct download not allowed on directories');
}
$this->file = $file;