File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
tests/PHPStan/Analyser/nsrt Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -370,10 +370,8 @@ public function isSuperTypeOf(Type $type): TrinaryLogic
370
370
$ this ->isList ->yes ()
371
371
&& $ type ->isList ->yes ()
372
372
&& count ($ this ->keyTypes ) !== count ($ type ->keyTypes )
373
+ && count ($ type ->optionalKeys ) === 0
373
374
) {
374
- if (count ($ type ->optionalKeys ) > 0 ) {
375
- return TrinaryLogic::createMaybe ();
376
- }
377
375
return TrinaryLogic::createNo ();
378
376
}
379
377
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ protected function testOptionalKeys(array $row): void
24
24
}
25
25
26
26
if (count ($ row ) !== 3 ) {
27
- assertType ('array{0: mixed, 1?: string|null} ' , $ row );
27
+ // should be array{0: mixed, 1?: string|null}
28
+ assertType ('array{0: mixed, 1?: mixed} ' , $ row );
28
29
}
29
30
}
30
31
You can’t perform that action at this time.
0 commit comments