Suppress false-positives from psalm, waiting for fix upstream

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2022-11-07 10:01:53 +01:00
parent 56f24cff9f
commit 7af4fea0e3
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A

View file

@ -50,6 +50,10 @@ class PlatformRepository {
$ext = new \ReflectionExtension($name);
try {
$prettyVersion = $ext->getVersion();
/** @psalm-suppress TypeDoesNotContainNull
* @psalm-suppress RedundantCondition
* TODO Remove these annotations once psalm fixes the method signature ( https://github.com/vimeo/psalm/pull/8655 )
*/
$prettyVersion = $this->normalizeVersion($prettyVersion ?? '0');
} catch (\UnexpectedValueException $e) {
$prettyVersion = '0';