mirror of
https://github.com/nextcloud/server.git
synced 2026-04-26 16:48:59 -04:00
psalm suppress
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
6406cd69c8
commit
f274eb5def
1 changed files with 4 additions and 0 deletions
|
|
@ -488,6 +488,7 @@ class SFTP extends Common {
|
|||
}
|
||||
|
||||
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 @@ class SFTP extends Common {
|
|||
$size = $writtenSize;
|
||||
});
|
||||
}
|
||||
/** @psalm-suppress InternalMethod */
|
||||
$result = $this->getConnection()->put($this->absPath($path), $stream);
|
||||
fclose($stream);
|
||||
if ($result) {
|
||||
|
|
@ -524,10 +526,12 @@ class SFTP extends Common {
|
|||
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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue