From f4d94ce666243e509dcefbeaadd17a2f5aef4c24 Mon Sep 17 00:00:00 2001 From: Adrian Suter Date: Tue, 2 Nov 2021 11:41:40 +0100 Subject: [PATCH] Fix phpstan. --- phpstan.neon.dist | 5 ++++- src/FileStreamWrapper.php | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 78bd81e..c60a50d 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -1,6 +1,9 @@ parameters: level: max ignoreErrors: - - message: '/Parameter \#3 \$microseconds of function stream_set_timeout expects int, int\|null given./' + - message: '/Parameter \#3 \$microseconds of function stream_set_timeout expects int, int\|null given/' + path: src/FileStreamWrapper.php + count: 1 + - message: '/Parameter \#2 \$size of function ftruncate expects int\<0, max\>, int given/' path: src/FileStreamWrapper.php count: 1 diff --git a/src/FileStreamWrapper.php b/src/FileStreamWrapper.php index f3e4bda..def98ee 100644 --- a/src/FileStreamWrapper.php +++ b/src/FileStreamWrapper.php @@ -416,7 +416,8 @@ public function stream_open(string $path, string $mode, int $options, ?string &$ /** * Read from stream. * - * @param int $count + * @param int $count + * @psalm-param positive-int $count * * @return string * @noinspection PhpUnused