Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorCôme Chilliet <come.chilliet@nextcloud.com>2022-02-24 14:25:04 +0300
committerCôme Chilliet <come.chilliet@nextcloud.com>2022-02-24 14:25:04 +0300
commitc9100e3d442a136b2e4888a5a1fcf62fdc04189b (patch)
tree89849be950784a5b8da96e5e5813dc6ed024a683 /lib
parent7b1a0441312124784b9d6efab72c8c496f8f7c69 (diff)
Fix more typing in OC\Archive classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Archive/Archive.php4
-rw-r--r--lib/private/Archive/TAR.php8
-rw-r--r--lib/private/Archive/ZIP.php6
3 files changed, 9 insertions, 9 deletions
diff --git a/lib/private/Archive/Archive.php b/lib/private/Archive/Archive.php
index 4f8100530ac..31db51d59a1 100644
--- a/lib/private/Archive/Archive.php
+++ b/lib/private/Archive/Archive.php
@@ -57,13 +57,13 @@ abstract class Archive {
/**
* get the uncompressed size of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
abstract public function filesize($path);
/**
* get the last modified time of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
abstract public function mtime($path);
/**
diff --git a/lib/private/Archive/TAR.php b/lib/private/Archive/TAR.php
index 1b8f72fd6ce..a3c2abb41bb 100644
--- a/lib/private/Archive/TAR.php
+++ b/lib/private/Archive/TAR.php
@@ -186,22 +186,22 @@ class TAR extends Archive {
* get the uncompressed size of a file in the archive
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path) {
$stat = $this->getHeader($path);
- return $stat['size'];
+ return $stat['size'] ?? false;
}
/**
* get the last modified time of a file in the archive
*
* @param string $path
- * @return int
+ * @return int|false
*/
public function mtime($path) {
$stat = $this->getHeader($path);
- return $stat['mtime'];
+ return $stat['mtime'] ?? false;
}
/**
diff --git a/lib/private/Archive/ZIP.php b/lib/private/Archive/ZIP.php
index 8c1b162206d..5dad747edf0 100644
--- a/lib/private/Archive/ZIP.php
+++ b/lib/private/Archive/ZIP.php
@@ -97,16 +97,16 @@ class ZIP extends Archive {
/**
* get the uncompressed size of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
public function filesize($path) {
$stat = $this->zip->statName($path);
- return $stat['size'];
+ return $stat['size'] ?? false;
}
/**
* get the last modified time of a file in the archive
* @param string $path
- * @return int
+ * @return int|false
*/
public function mtime($path) {
return filemtime($this->path);