summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-12-19 14:03:09 +0100
committerCôme Chilliet <come.chilliet@nextcloud.com>2023-01-02 12:24:18 +0100
commit39cb3549be4499066acad1e46ccb227b85faefdd (patch)
tree204d62cae4a905e27387daa321fb195cdd64bd3c /lib/private
parent5421510b1218ca6eb1a9075b1ddd2fa0b3782454 (diff)
downloadnextcloud-server-39cb3549be4499066acad1e46ccb227b85faefdd.tar.gz
nextcloud-server-39cb3549be4499066acad1e46ccb227b85faefdd.zip
Adapt types of subclasses
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/Files/Storage/Common.php3
-rw-r--r--lib/private/Files/Storage/DAV.php2
-rw-r--r--lib/private/Files/Storage/Wrapper/Encoding.php7
-rw-r--r--lib/private/Files/Storage/Wrapper/Jail.php6
-rwxr-xr-xlib/private/LargeFileHelper.php2
5 files changed, 9 insertions, 11 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index 8e7e56e6ca2..722333ec6bf 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -472,7 +472,7 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
* get the free space in the storage
*
* @param string $path
- * @return int|false
+ * @return int|float|false
*/
public function free_space($path) {
return \OCP\Files\FileInfo::SPACE_UNKNOWN;
@@ -518,7 +518,6 @@ abstract class Common implements Storage, ILockingStorage, IWriteStreamStorage {
* @throws InvalidPathException
*/
public function verifyPath($path, $fileName) {
-
// verify empty and dot files
$trimmed = trim($fileName);
if ($trimmed === '') {
diff --git a/lib/private/Files/Storage/DAV.php b/lib/private/Files/Storage/DAV.php
index b7d1c4bbc10..7c66303be6d 100644
--- a/lib/private/Files/Storage/DAV.php
+++ b/lib/private/Files/Storage/DAV.php
@@ -487,7 +487,7 @@ class DAV extends Common {
/**
* @param string $path
* @param mixed $data
- * @return int|false
+ * @return int|float|false
*/
public function file_put_contents($path, $data) {
$path = $this->cleanPath($path);
diff --git a/lib/private/Files/Storage/Wrapper/Encoding.php b/lib/private/Files/Storage/Wrapper/Encoding.php
index d6201dc8877..fbf8ac050af 100644
--- a/lib/private/Files/Storage/Wrapper/Encoding.php
+++ b/lib/private/Files/Storage/Wrapper/Encoding.php
@@ -40,7 +40,6 @@ use OCP\ICache;
* the actual given name and then try its NFD form.
*/
class Encoding extends Wrapper {
-
/**
* @var ICache
*/
@@ -213,7 +212,7 @@ class Encoding extends Wrapper {
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int|bool
+ * @return int|float|bool
*/
public function filesize($path) {
return $this->storage->filesize($this->findPathToUse($path));
@@ -315,7 +314,7 @@ class Encoding extends Wrapper {
*
* @param string $path
* @param mixed $data
- * @return int|false
+ * @return int|float|false
*/
public function file_put_contents($path, $data) {
return $this->storage->file_put_contents($this->findPathToUse($path), $data);
@@ -400,7 +399,7 @@ class Encoding extends Wrapper {
* see https://www.php.net/manual/en/function.free_space.php
*
* @param string $path
- * @return int|bool
+ * @return int|float|bool
*/
public function free_space($path) {
return $this->storage->free_space($this->findPathToUse($path));
diff --git a/lib/private/Files/Storage/Wrapper/Jail.php b/lib/private/Files/Storage/Wrapper/Jail.php
index 65ee6f1181a..b817073d2e0 100644
--- a/lib/private/Files/Storage/Wrapper/Jail.php
+++ b/lib/private/Files/Storage/Wrapper/Jail.php
@@ -160,7 +160,7 @@ class Jail extends Wrapper {
* The result for filesize when called on a folder is required to be 0
*
* @param string $path
- * @return int|bool
+ * @return int|float|bool
*/
public function filesize($path) {
return $this->getWrapperStorage()->filesize($this->getUnjailedPath($path));
@@ -262,7 +262,7 @@ class Jail extends Wrapper {
*
* @param string $path
* @param mixed $data
- * @return int|false
+ * @return int|float|false
*/
public function file_put_contents($path, $data) {
return $this->getWrapperStorage()->file_put_contents($this->getUnjailedPath($path), $data);
@@ -338,7 +338,7 @@ class Jail extends Wrapper {
* see https://www.php.net/manual/en/function.free_space.php
*
* @param string $path
- * @return int|bool
+ * @return int|float|bool
*/
public function free_space($path) {
return $this->getWrapperStorage()->free_space($this->getUnjailedPath($path));
diff --git a/lib/private/LargeFileHelper.php b/lib/private/LargeFileHelper.php
index e2984b4bacf..c7910f648c6 100755
--- a/lib/private/LargeFileHelper.php
+++ b/lib/private/LargeFileHelper.php
@@ -95,7 +95,7 @@ class LargeFileHelper {
*
* @param string $filename Path to the file.
*
- * @return null|int|float Number of bytes as number (float or int) or
+ * @return int|float Number of bytes as number (float or int) or
* null on failure.
*/
public function getFileSize($filename) {