Silence a warning from psalm with explanation

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2022-12-19 14:13:11 +01:00
parent ad999e5521
commit 77f2f9776f
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -609,6 +609,7 @@ class Local extends \OC\Files\Storage\Common {
}
public function writeStream(string $path, $stream, int $size = null): int {
/** @var int|false $result We consider here that returned size will never be a float because we write less than 4GB */
$result = $this->file_put_contents($path, $stream);
if (is_resource($stream)) {
fclose($stream);