mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Fix #148 - suppress InvalidDocblock where appropriate
This commit is contained in:
parent
f9b16c9a2d
commit
f4338c38e7
@ -1293,7 +1293,8 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
'Parameter $' . $param_name . ' does not appear in the argument list for ' .
|
||||
$cased_method_id,
|
||||
$code_location
|
||||
)
|
||||
),
|
||||
$storage->suppressed_issues
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
@ -1350,7 +1351,8 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
'Parameter $' . $param_name . ' has wrong type \'' . $new_param_type . '\', should be \'' .
|
||||
$storage_param_type . '\'',
|
||||
$code_location
|
||||
)
|
||||
),
|
||||
$storage->suppressed_issues
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
@ -1386,7 +1388,8 @@ abstract class FunctionLikeChecker extends SourceChecker implements StatementsSo
|
||||
'Parameter $' . $function_signature_param->name . ' does not appear in the docbock for ' .
|
||||
$cased_method_id,
|
||||
$function_signature_param->location
|
||||
)
|
||||
),
|
||||
$storage->suppressed_issues
|
||||
)) {
|
||||
return false;
|
||||
}
|
||||
|
@ -164,6 +164,15 @@ class AnnotationTest extends TestCase
|
||||
$a->bar = 7;
|
||||
takeA($a);',
|
||||
],
|
||||
'invalidDocblockParamSuppress' => [
|
||||
'<?php
|
||||
/**
|
||||
* @param int $bar
|
||||
* @psalm-suppress InvalidDocblock
|
||||
*/
|
||||
function fooFoo(array $bar) : void {
|
||||
}',
|
||||
],
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user