From c454a181cc017871479b8f0bfe9c0aa86bae7455 Mon Sep 17 00:00:00 2001 From: Daniil Gentili Date: Sun, 18 Dec 2022 15:00:15 +0100 Subject: [PATCH] Fixes --- psalm-baseline.xml | 10 +++++----- .../Analyzer/Statements/Block/LoopAnalyzer.php | 4 ++-- tests/ArrayFunctionCallTest.php | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index b8dacf52d..c8dee0180 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -56,17 +56,17 @@ $source_parts[1] + + + $stmt->cond + + if (AtomicTypeComparator::isContainedBy( if (AtomicTypeComparator::isContainedBy( - - - $pre_conditions[0] - - $context->assigned_var_ids += $switch_scope->new_assigned_var_ids diff --git a/src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php b/src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php index 79ac5bda9..985d73c3c 100644 --- a/src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php +++ b/src/Psalm/Internal/Analyzer/Statements/Block/LoopAnalyzer.php @@ -33,8 +33,8 @@ class LoopAnalyzer /** * Checks an array of statements in a loop * - * @param array $stmts - * @param PhpParser\Node\Expr[] $pre_conditions + * @param list $stmts + * @param list $pre_conditions * @param PhpParser\Node\Expr[] $post_expressions * @return false|null */ diff --git a/tests/ArrayFunctionCallTest.php b/tests/ArrayFunctionCallTest.php index 768d8d4dd..f82b4bf97 100644 --- a/tests/ArrayFunctionCallTest.php +++ b/tests/ArrayFunctionCallTest.php @@ -2133,7 +2133,7 @@ class ArrayFunctionCallTest extends TestCase 'arrayMapWithEmptyArrayReturn' => [ 'code' => '> $elements + * @param array> $elements * @return list */ function resolvePossibleFilePaths($elements) : array