From 81464d8dbf6eab5c245807ce59ea031f67bd45c1 Mon Sep 17 00:00:00 2001 From: Matthew Brown Date: Fri, 27 Sep 2019 09:50:33 -0400 Subject: [PATCH] Fix #2179 - add gz* to list of impure functions --- src/Psalm/Internal/Codebase/Functions.php | 3 +++ src/Psalm/Type/Reconciler.php | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Psalm/Internal/Codebase/Functions.php b/src/Psalm/Internal/Codebase/Functions.php index c8fad58a2..8f2f12381 100644 --- a/src/Psalm/Internal/Codebase/Functions.php +++ b/src/Psalm/Internal/Codebase/Functions.php @@ -311,6 +311,9 @@ class Functions 'apc_store', 'apc_delete', 'apc_clear_cache', 'apc_add', 'apc_inc', 'apc_dec', 'apc_cas', 'apcu_store', 'apcu_delete', 'apcu_clear_cache', 'apcu_add', 'apcu_inc', 'apcu_dec', 'apcu_cas', + // gz + 'gzwrite', 'gzrewind', 'gzseek', 'gzclose', + // newrelic 'newrelic_start_transaction', 'newrelic_name_transaction', 'newrelic_add_custom_parameter', 'newrelic_add_custom_tracer', 'newrelic_background_job', 'newrelic_end_transaction', diff --git a/src/Psalm/Type/Reconciler.php b/src/Psalm/Type/Reconciler.php index f54e5254b..cf0ee0486 100644 --- a/src/Psalm/Type/Reconciler.php +++ b/src/Psalm/Type/Reconciler.php @@ -397,7 +397,7 @@ class Reconciler */ private static function getValueForKey( Codebase $codebase, - $key, + string $key, array &$existing_keys, array $new_type_parts, CodeLocation $code_location = null