1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Simplify UnusedForeachValue example

This commit is contained in:
Matthew Brown 2021-06-21 13:57:53 -04:00 committed by GitHub
parent 52d2692497
commit fc88f4f0ee
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6,12 +6,11 @@ references to the foreach value
```php
<?php
/** @param non-empty-array<string, int> $a */
/** @param array<string, int> $a */
function foo(array $a) : void {
foreach ($a as $key => $value) { // $value is unused
break;
echo $key;
}
echo $key;
}
```