mirror of
https://github.com/danog/psalm.git
synced 2025-01-21 13:21:22 +01:00
Simplify
This commit is contained in:
parent
9119ce0541
commit
0aeb87c21c
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user