Skip to content

Commit

Permalink
Ignore invalid scalar argument issue in echo
Browse files Browse the repository at this point in the history
  • Loading branch information
muglug committed Dec 9, 2016
1 parent b3106c6 commit 30159d8
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/Psalm/Checker/Statements/Expression/CallChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -1172,15 +1172,17 @@ public static function checkFunctionArgumentType(

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(
Expand Down

0 comments on commit 30159d8

Please sign in to comment.