Skip to content

Commit

Permalink
Additional array fetch test case
Browse files Browse the repository at this point in the history
  • Loading branch information
edsrzf authored and weirdan committed Mar 20, 2024
1 parent 30e797b commit 4b707d1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tests/TypeReconciliation/EmptyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -771,6 +771,13 @@ function bar() {
}',
'error_message' => 'RedundantConditionGivenDocblockType',
],
'redundantEmptyArrayFetch' => [
'code' => '<?php
/** @var array<true> $a */;
assert(isset($a["a"]));
if (empty($a["a"])) {}',
'error_message' => 'DocblockTypeContradiction',
],
];
}
}

0 comments on commit 4b707d1

Please sign in to comment.