From 2c00c64304b8230995552b6af6d4c309b5fb0525 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Fri, 16 Dec 2022 19:18:33 +0100 Subject: [PATCH] Bypass bug --- psalm-baseline.xml | 69 ++----------------- .../ArrayMergeReturnTypeProvider.php | 3 +- 2 files changed, 5 insertions(+), 67 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 81a14de03..b8dacf52d 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $comment_block->tags['variablesfrom'][0] @@ -390,6 +390,9 @@ $class_strings ?: null + + $is_replace + @@ -593,10 +596,6 @@ $key_type->possibly_undefined - - $fallback_params - $fallback_params - $this->properties[0] $this->properties[0] @@ -705,64 +704,4 @@ $subNodes['expr'] - - - $parts - - - - - $conds - - - - - self::prepareName($name) - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - - - - $stmts - - diff --git a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php index 27b265958..e66ed4a5c 100644 --- a/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php +++ b/src/Psalm/Internal/Provider/ReturnTypeProvider/ArrayMergeReturnTypeProvider.php @@ -22,7 +22,6 @@ use function array_values; use function count; use function is_string; use function max; -use function substr; /** * @internal @@ -113,7 +112,7 @@ class ArrayMergeReturnTypeProvider implements FunctionReturnTypeProviderInterfac } if (is_string($key)) { $all_int_offsets = false; - } else if (!$is_replace) { + } elseif (!$is_replace) { if ($unpacking_indefinite_number_of_args || $type->possibly_undefined) { $added_inner_values = true; $inner_value_types = array_merge(