Skip to content

Commit 2a30bf1

Browse files
Feedback
1 parent faf726d commit 2a30bf1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/Type/Constant/ConstantArrayType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -823,7 +823,7 @@ public function unsetOffset(Type $offsetType): Type
823823
* So the nextAutoIndexes won't change, and the array might still be a list even with PHPStan definition.
824824
*
825825
* @param list<ConstantIntegerType|ConstantStringType> $newKeyTypes
826-
* @param int[] $newOptionalKeys
826+
* @param int[] $newOptionalKeys
827827
*/
828828
private static function isListAfterUnset(array $newKeyTypes, array $newOptionalKeys, TrinaryLogic $arrayIsList, bool $unsetOptionalKey): TrinaryLogic
829829
{

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public function testUnset1OnList(array $b): void
9191
{
9292
assertType('true', array_is_list($b));
9393
unset($b[1]);
94-
assertType('false', array_is_list($b)); // Could be true
94+
assertType('false', array_is_list($b));
9595
$b[] = 'foo';
9696
assertType('false', array_is_list($b));
9797
}
@@ -105,7 +105,7 @@ public function testUnset2OnList(array $b): void
105105
unset($b[2]);
106106
assertType('bool', array_is_list($b));
107107
$b[] = 'foo';
108-
assertType('bool', array_is_list($b)); // Could be false
108+
assertType('bool', array_is_list($b));
109109
}
110110

111111
/**
@@ -115,9 +115,9 @@ public function testUnset3OnList(array $b): void
115115
{
116116
assertType('true', array_is_list($b));
117117
unset($b[3]);
118-
assertType('bool', array_is_list($b)); // Could be true
118+
assertType('bool', array_is_list($b));
119119
$b[] = 'foo';
120-
assertType('bool', array_is_list($b)); // Could be false
120+
assertType('bool', array_is_list($b));
121121
}
122122

123123
/**
@@ -165,7 +165,7 @@ public function testUnset3OnArray(array $b): void
165165
unset($b[3]);
166166
assertType('bool', array_is_list($b));
167167
$b[] = 'foo';
168-
assertType('bool', array_is_list($b)); // Could be false
168+
assertType('bool', array_is_list($b));
169169
}
170170

171171
/**

0 commit comments

Comments
 (0)