Skip to content

Commit

Permalink
Minor psalm issue fixes
Browse files Browse the repository at this point in the history
Signed-off-by: George Steel <[email protected]>
  • Loading branch information
gsteel committed Jan 8, 2024
1 parent db521c5 commit f3cb0ad
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
15 changes: 6 additions & 9 deletions psalm-baseline.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<files psalm-version="5.16.0@2897ba636551a8cb61601cc26f6ccfbba6c36591">
<files psalm-version="5.18.0@b113f3ed0259fd6e212d87c3df80eec95a6abf19">
<file src="src/Helper/AbstractHtmlElement.php">
<MissingConstructor>
<code>$closingBracket</code>
Expand Down Expand Up @@ -135,16 +135,13 @@
</MissingConstructor>
<MixedArgument>
<code>$item</code>
<code>$messagesToPrint</code>
<code>$item</code>
</MixedArgument>
<MixedArgumentTypeCoercion>
<code>$classes</code>
<code>$classes</code>
<code>$messagesToPrint</code>
</MixedArgumentTypeCoercion>
<MixedArrayAssignment>
<code>$messagesToPrint[]</code>
<code>$messagesToPrint[]</code>
</MixedArrayAssignment>
<MixedAssignment>
<code>$classes</code>
<code>$classes</code>
Expand Down Expand Up @@ -722,9 +719,6 @@
<PossiblyNullPropertyAssignmentValue>
<code>null</code>
</PossiblyNullPropertyAssignmentValue>
<PossiblyUndefinedArrayOffset>
<code>$found[0]</code>
</PossiblyUndefinedArrayOffset>
<RedundantCastGivenDocblockType>
<code>(int) $renderFlag</code>
</RedundantCastGivenDocblockType>
Expand Down Expand Up @@ -1802,6 +1796,9 @@
<code>$name</code>
<code>$name</code>
</MoreSpecificImplementedParamType>
<PossiblyUndefinedArrayOffset>
<code>$params[$param]</code>
</PossiblyUndefinedArrayOffset>
</file>
<file src="test/Helper/CycleTest.php">
<RedundantCastGivenDocblockType>
Expand Down
4 changes: 1 addition & 3 deletions test/ViewTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@ public function testResponseStrategyIsNotTriggeredForChildModel(): void

$result = [];
$this->view->addResponseStrategy(function (ViewEvent $e) use (&$result) {
self::assertIsArray($result);
/** @psalm-var mixed */
$result[] = $e->getResult();
});
Expand All @@ -232,8 +231,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
Expand Down

0 comments on commit f3cb0ad

Please sign in to comment.