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

Fix #236 - incorrect operand issue text

This commit is contained in:
Matthew Brown 2017-10-12 08:51:57 -04:00
parent f080e32ef0
commit 1b7a5c2944

View File

@ -1239,7 +1239,7 @@ class ExpressionChecker
if ($right_type->isNullable()) {
if (IssueBuffer::accepts(
new PossiblyNullOperand(
'Left operand cannot be nullable, got ' . $right_type,
'Right operand cannot be nullable, got ' . $right_type,
new CodeLocation($statements_source, $right)
),
$statements_source->getSuppressedIssues()
@ -1249,7 +1249,7 @@ class ExpressionChecker
} elseif ($right_type->isNull()) {
if (IssueBuffer::accepts(
new NullOperand(
'Left operand cannot be null',
'Right operand cannot be null',
new CodeLocation($statements_source, $right)
),
$statements_source->getSuppressedIssues()