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

fix condition when bool is allowed

This commit is contained in:
orklah 2021-07-13 00:19:13 +02:00
parent 688367de38
commit 1fc8982ca9

View File

@ -1115,7 +1115,11 @@ class ArgumentAnalyzer
}
}
if (!$param_type->isFalsable() && $cased_method_id !== 'echo' && $cased_method_id !== 'print') {
if (!$param_type->isFalsable() &&
!$param_type->hasBool() &&
$cased_method_id !== 'echo' &&
$cased_method_id !== 'print'
) {
if ($input_type->isFalse()) {
if (IssueBuffer::accepts(
new InvalidArgument(