From 53a8d985afbc8574f6d22c48b1f64f4267b88dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=B4me=20Chilliet?= Date: Thu, 22 Feb 2024 12:01:05 +0100 Subject: [PATCH] fixup! fix: Update children classes of Common to respect copy signature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Côme Chilliet --- apps/files_trashbin/tests/StorageTest.php | 2 +- lib/private/Files/Storage/DAV.php | 2 +- tests/lib/Files/ViewTest.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/files_trashbin/tests/StorageTest.php b/apps/files_trashbin/tests/StorageTest.php index 59bd7e0f5ef53..953e78375cedb 100644 --- a/apps/files_trashbin/tests/StorageTest.php +++ b/apps/files_trashbin/tests/StorageTest.php @@ -54,7 +54,7 @@ use Test\Traits\MountProviderTrait; class TemporaryNoCross extends Temporary { - public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = null) { + public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, bool $preserveMtime = false): bool { return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime); } diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php index e5bbbb560da72..ffaa70b9fc0d9 100644 --- a/lib/private/Files/Storage/DAV.php +++ b/lib/private/Files/Storage/DAV.php @@ -565,7 +565,7 @@ public function rename($source, $target) { } /** {@inheritdoc} */ - public function copy($source, $target) { + public function copy($source, $target, bool $preserveMtime = false): bool { $this->init(); $source = $this->cleanPath($source); $target = $this->cleanPath($target); diff --git a/tests/lib/Files/ViewTest.php b/tests/lib/Files/ViewTest.php index b9dd49d71fe28..3050a8f14b036 100644 --- a/tests/lib/Files/ViewTest.php +++ b/tests/lib/Files/ViewTest.php @@ -39,7 +39,7 @@ public function touch($path, $mtime = null) { } class TemporaryNoCross extends Temporary { - public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = null) { + public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, bool $preserveMtime = false): bool { return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime); }