1
0
mirror of https://github.com/danog/psalm.git synced 2025-01-21 13:21:22 +01:00
This commit is contained in:
Daniil Gentili 2023-12-01 17:57:50 +01:00
parent 9119ce0541
commit 0aeb87c21c

View File

@ -1027,9 +1027,7 @@ class ForeachTest extends TestCase
$arr = [];
foreach ([1, 2, 3] as $i) {
if (!isset($arr[$i]["a"])) {
$arr[$i]["a"] = 0;
}
$arr[$i]["a"] ??= 0;
$arr[$i]["a"] += 5;
}