mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 16:26:59 -04:00
Fix more typing in OC\Archive classes
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
7b1a044131
commit
c9100e3d44
3 changed files with 9 additions and 9 deletions
|
|
@ -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);
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue