Skip to content

Commit 53a8d98

Browse files
committed
fixup! fix: Update children classes of Common to respect copy signature
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
1 parent 4e44aaa commit 53a8d98

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

apps/files_trashbin/tests/StorageTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
use Test\Traits\MountProviderTrait;
5555

5656
class TemporaryNoCross extends Temporary {
57-
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = null) {
57+
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, bool $preserveMtime = false): bool {
5858
return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime);
5959
}
6060

lib/private/Files/Storage/DAV.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -565,7 +565,7 @@ public function rename($source, $target) {
565565
}
566566

567567
/** {@inheritdoc} */
568-
public function copy($source, $target) {
568+
public function copy($source, $target, bool $preserveMtime = false): bool {
569569
$this->init();
570570
$source = $this->cleanPath($source);
571571
$target = $this->cleanPath($target);

tests/lib/Files/ViewTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ public function touch($path, $mtime = null) {
3939
}
4040

4141
class TemporaryNoCross extends Temporary {
42-
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime = null) {
42+
public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath, bool $preserveMtime = false): bool {
4343
return Common::copyFromStorage($sourceStorage, $sourceInternalPath, $targetInternalPath, $preserveMtime);
4444
}
4545

0 commit comments

Comments
 (0)