diff --git a/src/Hooks/TestCaseHandler.php b/src/Hooks/TestCaseHandler.php index caf1315..e0c877b 100644 --- a/src/Hooks/TestCaseHandler.php +++ b/src/Hooks/TestCaseHandler.php @@ -292,7 +292,7 @@ public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event || $provider_return_type->type_params[0]->hasArrayKey(); if ($provider_key_type_is_uncertain) { - IssueBuffer::accepts(new Issue\MixedInferredReturnType( + IssueBuffer::accepts(new Issue\MixedReturnStatement( 'Providers must return ' . $expected_provider_return_type->getId() . ', possibly different ' . $provider_return_type_string . ' provided', $provider_return_type_location @@ -314,7 +314,7 @@ public static function afterStatementAnalysis(AfterClassLikeAnalysisEvent $event if (!$provider_value_type_is_compatible) { if ($provider_return_type->type_params[1]->hasMixed()) { - IssueBuffer::accepts(new Issue\MixedInferredReturnType( + IssueBuffer::accepts(new Issue\MixedReturnStatement( 'Providers must return ' . $expected_provider_return_type->getId() . ', possibly different ' . $provider_return_type_string . ' provided', $provider_return_type_location diff --git a/tests/acceptance/TestCase.feature b/tests/acceptance/TestCase.feature index 744ff6f..438bdf7 100644 --- a/tests/acceptance/TestCase.feature +++ b/tests/acceptance/TestCase.feature @@ -310,7 +310,7 @@ Feature: TestCase When I run Psalm Then I see these errors | Type | Message | - | MixedInferredReturnType | Providers must return iterable>, possibly different array provided | + | MixedReturnStatement | Providers must return iterable>, possibly different array provided | And I see no other errors Scenario: Underspecified iterable data provider is reported @@ -334,7 +334,7 @@ Feature: TestCase When I run Psalm Then I see these errors | Type | Message | - | MixedInferredReturnType | Providers must return iterable>, possibly different iterable provided | + | MixedReturnStatement | Providers must return iterable>, possibly different iterable provided | And I see no other errors Scenario: Underspecified generator data provider is reported @@ -358,7 +358,7 @@ Feature: TestCase When I run Psalm Then I see these errors | Type | Message | - | MixedInferredReturnType | Providers must return iterable>, possibly different Generator provided | + | MixedReturnStatement | Providers must return iterable>, possibly different Generator provided | And I see no other errors Scenario: Valid array data provider is allowed