From 93d66117d0f7a19aa0153b3708f98eaeec51babe Mon Sep 17 00:00:00 2001 From: Brown Date: Sat, 19 Sep 2020 13:58:29 -0400 Subject: [PATCH] func_num_args is pure fixes #4215 --- src/Psalm/Internal/Codebase/Functions.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index 1755b4970..fdaf2767a 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -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);