mirror of
https://github.com/nextcloud/server.git
synced 2026-03-27 04:43:20 -04:00
Respect OCP interface in private classes
Because the parameter type was moved to phpdoc it needs to be removed from implementations Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
09a97ad39c
commit
308fcf4526
10 changed files with 10 additions and 10 deletions
|
|
@ -140,7 +140,7 @@ class FTP extends Common {
|
|||
}
|
||||
}
|
||||
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
$result = $this->getConnection()->size($this->buildPath($path));
|
||||
if ($result === -1) {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
|
|||
return $this->filetype($path) === 'file';
|
||||
}
|
||||
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
if ($this->is_dir($path)) {
|
||||
return 0; //by definition
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ class FailedStorage extends Common {
|
|||
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
|
||||
}
|
||||
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
throw new StorageNotAvailableException($this->e->getMessage(), $this->e->getCode(), $this->e);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ class Local extends \OC\Files\Storage\Common {
|
|||
return $filetype;
|
||||
}
|
||||
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
if (!$this->is_file($path)) {
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ class Availability extends Wrapper {
|
|||
}
|
||||
|
||||
/** {@inheritdoc} */
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
$this->checkAvailability();
|
||||
try {
|
||||
return parent::filesize($path);
|
||||
|
|
|
|||
|
|
@ -211,7 +211,7 @@ class Encoding extends Wrapper {
|
|||
* see https://www.php.net/manual/en/function.filesize.php
|
||||
* The result for filesize when called on a folder is required to be 0
|
||||
*/
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
return $this->storage->filesize($this->findPathToUse($path));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ class Encryption extends Wrapper {
|
|||
* see https://www.php.net/manual/en/function.filesize.php
|
||||
* The result for filesize when called on a folder is required to be 0
|
||||
*/
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
$fullPath = $this->getFullPath($path);
|
||||
|
||||
/** @var CacheEntry $info */
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ class Jail extends Wrapper {
|
|||
* see https://www.php.net/manual/en/function.filesize.php
|
||||
* The result for filesize when called on a folder is required to be 0
|
||||
*/
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
return $this->getWrapperStorage()->filesize($this->getUnjailedPath($path));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ class Wrapper implements \OC\Files\Storage\Storage, ILockingStorage, IWriteStrea
|
|||
* see https://www.php.net/manual/en/function.filesize.php
|
||||
* The result for filesize when called on a folder is required to be 0
|
||||
*/
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
return $this->getWrapperStorage()->filesize($path);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ class NullStorage extends Common {
|
|||
return ($path === '') ? 'dir' : false;
|
||||
}
|
||||
|
||||
public function filesize(string $path): false|int|float {
|
||||
public function filesize($path): false|int|float {
|
||||
throw new \OC\ForbiddenException('This request is not allowed to access the filesystem');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue