From 15d3ad0cc98a4ece2bfc5e80e9d2fd02c1bce009 Mon Sep 17 00:00:00 2001 From: George Steel Date: Mon, 8 Jan 2024 09:50:16 +0000 Subject: [PATCH] Minor psalm issue fixes Signed-off-by: George Steel --- psalm-baseline.xml | 15 ++++++--------- test/ViewTest.php | 5 +---- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/psalm-baseline.xml b/psalm-baseline.xml index 48231da82..012919109 100644 --- a/psalm-baseline.xml +++ b/psalm-baseline.xml @@ -1,5 +1,5 @@ - + $closingBracket @@ -135,16 +135,13 @@ $item - $messagesToPrint + $item $classes $classes + $messagesToPrint - - $messagesToPrint[] - $messagesToPrint[] - $classes $classes @@ -722,9 +719,6 @@ null - - $found[0] - (int) $renderFlag @@ -1802,6 +1796,9 @@ $name $name + + $params[$param] + diff --git a/test/ViewTest.php b/test/ViewTest.php index 7ac7e96cd..11c0bbc77 100644 --- a/test/ViewTest.php +++ b/test/ViewTest.php @@ -18,7 +18,6 @@ use PHPUnit\Framework\TestCase; use stdClass; -use function count; use function json_encode; use function sprintf; use function var_export; @@ -215,7 +214,6 @@ public function testResponseStrategyIsNotTriggeredForChildModel(): void $result = []; $this->view->addResponseStrategy(function (ViewEvent $e) use (&$result) { - self::assertIsArray($result); /** @psalm-var mixed */ $result[] = $e->getResult(); }); @@ -232,8 +230,7 @@ public function testResponseStrategyIsNotTriggeredForChildModel(): void $this->view->render($this->model); - self::assertIsArray($result); - self::assertEquals(1, count($result)); + self::assertCount(1, $result); } public function testUsesTreeRendererInterfaceToDetermineWhetherOrNotToPassOnlyRootViewModelToPhpRenderer(): void