1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-29 20:28:59 +01:00

func_num_args is pure

fixes #4215
This commit is contained in:
Brown 2020-09-19 13:58:29 -04:00 committed by Daniil Gentili
parent e22491537b
commit 93d66117d0
Signed by: danog
GPG Key ID: 8C1BE3B34B230CA7

View File

@ -393,6 +393,10 @@ class Functions
return true;
}
if ($function_id === 'func_num_args' || $function_id === 'func_get_args') {
return true;
}
if ($function_id === 'count' && isset($args[0]) && $type_provider) {
$count_type = $type_provider->getType($args[0]->value);