1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-26 20:34:47 +01:00

Fix tests

This commit is contained in:
Brown 2020-04-04 11:51:24 -04:00
parent 4b36c4e4bf
commit 1b01d7b356
2 changed files with 2 additions and 2 deletions

View File

@ -122,7 +122,7 @@ class FunctionCallTest extends TestCase
'noRedundantConditionAfterMixedOrEmptyArrayCountCheck' => [
'<?php
function foo(string $s) : void {
$a = json_decode($s) ?: [];
$a = $_GET["s"] ?: [];
if (count($a)) {}
if (!count($a)) {}
}',

View File

@ -1891,13 +1891,13 @@ class ClassTemplateTest extends TestCase
public function __construct() {
$this->FooArray = new Foo(function(string $s): array {
/** @psalm-suppress MixedAssignment */
$json = \json_decode($s, true);
if (! \is_array($json)) {
return [];
}
/** @var array */
return $json;
});