1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-27 04:45:20 +01:00

Ignore invalid scalar argument issue in echo

This commit is contained in:
Matt Brown 2016-12-09 12:53:22 -05:00
parent b3106c68bb
commit 30159d8f70

View File

@ -1172,15 +1172,17 @@ class CallChecker
if (!$type_match_found) {
if ($scalar_type_match_found) {
if (IssueBuffer::accepts(
new InvalidScalarArgument(
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id . ' expects ' . $param_type .
', ' . $input_type . ' provided',
$code_location
),
$statements_checker->getSuppressedIssues()
)) {
return false;
if ($cased_method_id !== 'echo') {
if (IssueBuffer::accepts(
new InvalidScalarArgument(
'Argument ' . ($argument_offset + 1) . ' of ' . $cased_method_id . ' expects ' . $param_type .
', ' . $input_type . ' provided',
$code_location
),
$statements_checker->getSuppressedIssues()
)) {
return false;
}
}
} elseif (IssueBuffer::accepts(
new InvalidArgument(