diff --git a/apps/files_external/lib/Lib/Storage/SFTP.php b/apps/files_external/lib/Lib/Storage/SFTP.php index bc25477bcf674..e792cef75a99b 100644 --- a/apps/files_external/lib/Lib/Storage/SFTP.php +++ b/apps/files_external/lib/Lib/Storage/SFTP.php @@ -488,6 +488,7 @@ public function constructUrl($path) { } public function file_put_contents($path, $data) { + /** @psalm-suppress InternalMethod */ $result = $this->getConnection()->put($this->absPath($path), $data); if ($result) { return strlen($data); @@ -502,6 +503,7 @@ public function writeStream(string $path, $stream, int $size = null): int { $size = $writtenSize; }); } + /** @psalm-suppress InternalMethod */ $result = $this->getConnection()->put($this->absPath($path), $stream); fclose($stream); if ($result) { @@ -524,10 +526,12 @@ public function copy($source, $target) { return false; } for ($i = 0; $i < $size; $i += self::COPY_CHUNK_SIZE) { + /** @psalm-suppress InvalidArgument */ $chunk = $connection->get($absSource, false, $i, self::COPY_CHUNK_SIZE); if ($chunk === false) { return false; } + /** @psalm-suppress InternalMethod */ if (!$connection->put($absTarget, $chunk, \phpseclib\Net\SFTP::SOURCE_STRING, $i)) { return false; }