mirror of
https://github.com/danog/psalm.git
synced 2024-11-27 04:45:20 +01:00
Fix error messages for $boolVar !== null
Seen for this example: $b = rand() % 2 > 0; if ($b !== null) { ... }
This commit is contained in:
parent
0e4c8ce482
commit
dbcedd300b
@ -1028,7 +1028,7 @@ class AssertionFinder
|
||||
if ($var_type->from_docblock) {
|
||||
if (IssueBuffer::accepts(
|
||||
new RedundantConditionGivenDocblockType(
|
||||
'Docblock-asserted type ' . $var_type . ' can never contain an empty array',
|
||||
'Docblock-asserted type ' . $var_type . ' can never contain null',
|
||||
new CodeLocation($source, $conditional)
|
||||
),
|
||||
$source->getSuppressedIssues()
|
||||
@ -1038,7 +1038,7 @@ class AssertionFinder
|
||||
} else {
|
||||
if (IssueBuffer::accepts(
|
||||
new RedundantCondition(
|
||||
$var_type . ' can never contain an empty array',
|
||||
$var_type . ' can never contain null',
|
||||
new CodeLocation($source, $conditional)
|
||||
),
|
||||
$source->getSuppressedIssues()
|
||||
|
Loading…
Reference in New Issue
Block a user