mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
Fix highlight_string return type default
This commit is contained in:
parent
59bbf6f896
commit
acacde173e
@ -93,10 +93,13 @@ class FunctionChecker extends FunctionLikeChecker
|
||||
return Type::getString();
|
||||
}
|
||||
|
||||
return new Type\Union([new Type\Atomic\TString, new Type\Atomic\TNull]);
|
||||
return new Type\Union([
|
||||
new Type\Atomic\TString,
|
||||
$call_map_key === 'var_export' ? new Type\Atomic\TNull : new Type\Atomic\TBool
|
||||
]);
|
||||
}
|
||||
|
||||
return Type::getVoid();
|
||||
return $call_map_key === 'var_export' ? Type::getVoid() : Type::getBool();
|
||||
}
|
||||
|
||||
if (substr($call_map_key, 0, 6) === 'array_') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user