diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 00:58:11 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-17 10:58:27 +0200 |
commit | c2c63a551f2f8d0452865ce3924b3b983f520068 (patch) | |
tree | a6f07f3cd2d2406b7ab68e570ce38aecc3fc3cb4 /apps | |
parent | 74e69767791d3af36fe27c6c2a0bf0ff3336fce9 (diff) | |
download | nextcloud-server-c2c63a551f2f8d0452865ce3924b3b983f520068.tar.gz nextcloud-server-c2c63a551f2f8d0452865ce3924b3b983f520068.zip |
Fix usage of streams
always return a bool and type the handle as a string
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTPReadStream.php | 4 | ||||
-rw-r--r-- | apps/files_external/lib/Lib/Storage/SFTPWriteStream.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php index 06ede120f5a..680a51cfa10 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPReadStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPReadStream.php @@ -36,7 +36,7 @@ class SFTPReadStream implements File { /** @var \phpseclib\Net\SFTP */ private $sftp; - /** @var resource */ + /** @var string */ private $handle; /** @var int */ @@ -61,7 +61,6 @@ class SFTPReadStream implements File { * Load the source from the stream context and return the context options * * @param string $name - * @return array * @throws \BadMethodCallException */ protected function loadContext($name) { @@ -202,5 +201,6 @@ class SFTPReadStream implements File { if (!$this->sftp->_close_handle($this->handle)) { return false; } + return true; } } diff --git a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php index b1518809f09..6682a49d8f6 100644 --- a/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php +++ b/apps/files_external/lib/Lib/Storage/SFTPWriteStream.php @@ -36,7 +36,7 @@ class SFTPWriteStream implements File { /** @var \phpseclib\Net\SFTP */ private $sftp; - /** @var resource */ + /** @var string */ private $handle; /** @var int */ @@ -61,7 +61,6 @@ class SFTPWriteStream implements File { * Load the source from the stream context and return the context options * * @param string $name - * @return array * @throws \BadMethodCallException */ protected function loadContext($name) { @@ -180,5 +179,6 @@ class SFTPWriteStream implements File { if (!$this->sftp->_close_handle($this->handle)) { return false; } + return true; } } |