Skip to content

Commit 405eecf

Browse files
Fix
1 parent 89f5a54 commit 405eecf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

tests/PHPStan/Analyser/nsrt/array-is-list-unset.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function () {
1919
assertType('true', array_is_list($a));
2020
unset($a[2]);
2121
assertType('array{1, 2}', $a);
22-
assertType('false', array_is_list($a));
22+
assertType('false', array_is_list($a)); // Could be true
2323
$a[] = 4;
2424
assertType('array{0: 1, 1: 2, 3: 4}', $a);
2525
assertType('false', array_is_list($a));

tests/PHPStan/Analyser/nsrt/bug-14177.php

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php declare(strict_types = 1);
22

3-
namespace Bug14177;
3+
namespace Bug14177Nsrt;
44

55
use function PHPStan\Testing\assertType;
66

@@ -91,9 +91,9 @@ public function testUnset1OnList(array $b): void
9191
{
9292
assertType('true', array_is_list($b));
9393
unset($b[1]);
94-
assertType('bool', array_is_list($b));
94+
assertType('false', array_is_list($b)); // Could be true
9595
$b[] = 'foo';
96-
assertType('bool', array_is_list($b)); // Could be false
96+
assertType('false', array_is_list($b));
9797
}
9898

9999
/**
@@ -151,9 +151,9 @@ public function testUnset2OnArray(array $b): void
151151
{
152152
assertType('bool', array_is_list($b));
153153
unset($b[2]);
154-
assertType('bool', array_is_list($b));
154+
assertType('false', array_is_list($b)); // Could be true
155155
$b[] = 'foo';
156-
assertType('bool', array_is_list($b)); // Could be false
156+
assertType('false', array_is_list($b));
157157
}
158158

159159
/**

0 commit comments

Comments
 (0)