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 committed Mar 4, 2024
1 parent a46a07c commit 3234170
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 3234170

Please sign in to comment.