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 committed by backportbot-nextcloud[bot]
parent 741553eb93
commit eaeb6b2c85

View file

@ -617,6 +617,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);