Skip to content

Commit

Permalink
fixup! fix: Update children classes of Common to respect copy signature
Browse files Browse the repository at this point in the history
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
  • Loading branch information
come-nc committed Feb 22, 2024
1 parent 4e44aaa commit 53a8d98
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion apps/files_trashbin/tests/StorageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down
2 changes: 1 addition & 1 deletion lib/private/Files/Storage/DAV.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion tests/lib/Files/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 53a8d98

Please sign in to comment.