From fce3f0e896ad8371835b091fec9379486ba43a50 Mon Sep 17 00:00:00 2001 From: Demmie Date: Fri, 14 Jul 2023 21:35:39 -0400 Subject: [PATCH] Fix failing tests --- src/Plugin.php | 6 ++---- tests/acceptance/Collections.feature | 2 +- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/Plugin.php b/src/Plugin.php index 0c5cc06..9b932c2 100644 --- a/src/Plugin.php +++ b/src/Plugin.php @@ -51,14 +51,12 @@ private function hasPackage(string $packageName): bool /** * @throws OutOfBoundsException + * + * @psalm-suppress UnusedParam */ private function getPackageVersion(string $packageName): string { if (class_exists(Versions::class)) { - /** - * @psalm-suppress RedundantCondition - * @psalm-suppress RedundantCast - */ return (string) Versions::getVersion($packageName); } diff --git a/tests/acceptance/Collections.feature b/tests/acceptance/Collections.feature index e95526b..24dd9b4 100644 --- a/tests/acceptance/Collections.feature +++ b/tests/acceptance/Collections.feature @@ -817,7 +817,7 @@ Feature: Collections When I run Psalm Then I see these errors | Type | Message | - | InvalidScalarArgument | /Argument 1 of Doctrine\\Common\\Collections\\Collection::map expects Closure\(string=\):mixed, but (impure-)?Closure\(int\):bool provided\|Type (int\|string) should be a subtype of (int\|string)/ | + | InvalidScalarArgument | /Argument 1 of Doctrine\\Common\\Collections\\Collection::map expects Closure\(string=\):bool, but (impure-)?Closure\(int\):bool provided\|Type (int\|string) should be a subtype of (int\|string)/ | And I see no other errors @Collection::map