mirror of
https://github.com/danog/psalm.git
synced 2024-11-26 20:34:47 +01:00
Void-returning functions are going to be impure
This commit is contained in:
parent
a658566429
commit
d0a9bf24f8
@ -381,7 +381,10 @@ class Functions
|
||||
$args ?: []
|
||||
);
|
||||
|
||||
if (!$function_callable->params || ($args !== null && \count($args) === 0)) {
|
||||
if (!$function_callable->params
|
||||
|| ($args !== null && \count($args) === 0)
|
||||
|| ($function_callable->return_type && $function_callable->return_type->isVoid())
|
||||
) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user