From 82b40ffddfaa0970479e4bd89d6e1536eace321e Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 26 Jan 2025 11:39:27 +0100 Subject: [PATCH] Fix --- Plugin.php | 2 +- tests/acceptance/MockReturn.feature | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Plugin.php b/Plugin.php index a429c32..aebf68b 100755 --- a/Plugin.php +++ b/Plugin.php @@ -8,7 +8,7 @@ class Plugin implements PluginEntryPointInterface { - public function __invoke(RegistrationInterface $registration, SimpleXMLElement $config = null): void + public function __invoke(RegistrationInterface $registration, ?SimpleXMLElement $config = null): void { $registration->addStubFile(__DIR__ . '/stubs/Mockery.php'); diff --git a/tests/acceptance/MockReturn.feature b/tests/acceptance/MockReturn.feature index f609f72..49cacc5 100644 --- a/tests/acceptance/MockReturn.feature +++ b/tests/acceptance/MockReturn.feature @@ -44,8 +44,8 @@ Feature: MockReturn """ When I run Psalm Then I see these errors - | Type | Message | - | DocblockTypeContradiction | / type Mockery\\MockInterface&NS\\User (does not contain array<[^,]+, mixed>\|for \$user is never array)/ | + | Type | Message | + | DocblockTypeContradiction | Docblock-defined type Mockery\MockInterface&NS\User for $user is never array | And I see no other errors Scenario: Alias class mocking is recognized