diff --git a/src/Psalm/Checker/FunctionLikeChecker.php b/src/Psalm/Checker/FunctionLikeChecker.php index 5d077e5428d..3a91a635ac9 100644 --- a/src/Psalm/Checker/FunctionLikeChecker.php +++ b/src/Psalm/Checker/FunctionLikeChecker.php @@ -676,7 +676,7 @@ public static function getTranslatedParam( $is_nullable = $param->default !== null && $param->default instanceof \PhpParser\Node\Expr\ConstFetch && $param->default->name instanceof PhpParser\Node\Name && - $param->default->name->parts === ['null']; + strtolower($param->default->name->parts[0]) === 'null'; if ($param->type) { if (is_string($param->type)) {