mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Remove unnecessary suppression
This commit is contained in:
parent
17d208bdd5
commit
290cf396d4
@ -792,7 +792,6 @@ class FunctionChecker extends FunctionLikeChecker
|
||||
* @return array<string, array<int|string, string>>
|
||||
* @psalm-suppress MixedInferredReturnType as the use of require buggers things up
|
||||
* @psalm-suppress MixedAssignment
|
||||
* @psalm-suppress MoreSpecificReturnType
|
||||
*/
|
||||
protected static function getCallMap()
|
||||
{
|
||||
|
@ -26,7 +26,6 @@ class AssertionFinder
|
||||
* @param StatementsSource $source
|
||||
*
|
||||
* @return array<string, string>
|
||||
* @psalm-suppress MoreSpecificReturnType
|
||||
*/
|
||||
public static function getAssertions(
|
||||
PhpParser\Node\Expr $conditional,
|
||||
|
@ -608,6 +608,22 @@ class ReturnTypeTest extends TestCase
|
||||
}',
|
||||
'error_message' => 'InvalidReturnStatement',
|
||||
],
|
||||
'moreSpecificReturnType' => [
|
||||
'<?php
|
||||
class A {}
|
||||
class B extends A {}
|
||||
interface I {
|
||||
/** @return B[] */
|
||||
public function foo();
|
||||
}
|
||||
class D implements I {
|
||||
/** @return A[] */
|
||||
public function foo() {
|
||||
return [new A, new A];
|
||||
}
|
||||
}',
|
||||
'error_message' => 'MoreSpecificImplementedReturnType',
|
||||
],
|
||||
];
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user