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:
parent
52d2692497
commit
fc88f4f0ee
@ -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;
|
||||
}
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user