diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2024-03-28 16:13:19 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-04-02 14:16:21 +0200 |
commit | ec5133b739eabc76271789504b4dbb91a534f552 (patch) | |
tree | 880b81f5ebd11b289c67e4bcdd1ecaa41aedbcb4 /apps/files_trashbin/lib | |
parent | b074399a87e764f506550d64f6379738186355c6 (diff) | |
download | nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.tar.gz nextcloud-server-ec5133b739eabc76271789504b4dbb91a534f552.zip |
fix: Apply new coding standard to all files
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r-- | apps/files_trashbin/lib/Command/ExpireTrash.php | 4 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php | 2 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Storage.php | 10 | ||||
-rw-r--r-- | apps/files_trashbin/lib/Trash/LegacyTrashBackend.php | 2 |
4 files changed, 9 insertions, 9 deletions
diff --git a/apps/files_trashbin/lib/Command/ExpireTrash.php b/apps/files_trashbin/lib/Command/ExpireTrash.php index e64ef2973f7..048631db7a5 100644 --- a/apps/files_trashbin/lib/Command/ExpireTrash.php +++ b/apps/files_trashbin/lib/Command/ExpireTrash.php @@ -52,8 +52,8 @@ class ExpireTrash extends Command { * @param IUserManager|null $userManager * @param Expiration|null $expiration */ - public function __construct(IUserManager $userManager = null, - Expiration $expiration = null) { + public function __construct(?IUserManager $userManager = null, + ?Expiration $expiration = null) { parent::__construct(); $this->userManager = $userManager; diff --git a/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php b/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php index 9c1bf4e8910..29963438002 100644 --- a/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php +++ b/apps/files_trashbin/lib/Events/BeforeNodeRestoredEvent.php @@ -40,7 +40,7 @@ class BeforeNodeRestoredEvent extends AbstractNodesEvent { /** * @return never */ - public function abortOperation(\Throwable $ex = null) { + public function abortOperation(?\Throwable $ex = null) { $this->stopPropagation(); $this->run = false; if ($ex !== null) { diff --git a/apps/files_trashbin/lib/Storage.php b/apps/files_trashbin/lib/Storage.php index e1470e7634a..11ace4248d9 100644 --- a/apps/files_trashbin/lib/Storage.php +++ b/apps/files_trashbin/lib/Storage.php @@ -61,11 +61,11 @@ class Storage extends Wrapper { */ public function __construct( $parameters, - ITrashManager $trashManager = null, - IUserManager $userManager = null, - LoggerInterface $logger = null, - IEventDispatcher $eventDispatcher = null, - IRootFolder $rootFolder = null + ?ITrashManager $trashManager = null, + ?IUserManager $userManager = null, + ?LoggerInterface $logger = null, + ?IEventDispatcher $eventDispatcher = null, + ?IRootFolder $rootFolder = null ) { $this->mountPoint = $parameters['mountPoint']; $this->trashManager = $trashManager; diff --git a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php index ada42dbe857..a608dc08331 100644 --- a/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php +++ b/apps/files_trashbin/lib/Trash/LegacyTrashBackend.php @@ -51,7 +51,7 @@ class LegacyTrashBackend implements ITrashBackend { * @param ITrashItem $parent * @return ITrashItem[] */ - private function mapTrashItems(array $items, IUser $user, ITrashItem $parent = null): array { + private function mapTrashItems(array $items, IUser $user, ?ITrashItem $parent = null): array { $parentTrashPath = ($parent instanceof ITrashItem) ? $parent->getTrashPath() : ''; $isRoot = $parent === null; return array_map(function (FileInfo $file) use ($parent, $parentTrashPath, $isRoot, $user) { |