From 2387d5eef0f1692f4d506328b9e78107f2b63ad4 Mon Sep 17 00:00:00 2001 From: Arnout Boks Date: Fri, 4 Nov 2022 09:05:29 +0100 Subject: [PATCH] Mark hash_update functions as impure This prevents Psalm from marking calls to them as UnusedFunctionCall. --- src/Psalm/Internal/Codebase/Functions.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index 9ce746a5218..60a9475c417 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -524,6 +524,9 @@ public function isCallMapFunctionPure( //gettext 'bindtextdomain', + + // hash + 'hash_update', 'hash_update_file', 'hash_update_stream', ]; if (in_array(strtolower($function_id), $impure_functions, true)) {