mirror of
https://github.com/danog/psalm.git
synced 2025-01-22 05:41:20 +01:00
fix tests
This commit is contained in:
parent
25b01ce3a3
commit
2c47d06968
@ -1560,13 +1560,13 @@ class FunctionTemplateTest extends TestCase
|
||||
* @template TNewKey of array-key
|
||||
* @template TNewValue
|
||||
* @psalm-param iterable<TKey, TValue> $iterable
|
||||
* @psalm-param callable(TKey, TValue): iterable<TNewKey, TNewValue> $mapper
|
||||
* @psalm-param callable(TKey): iterable<TNewKey, TNewValue> $mapper
|
||||
* @psalm-return \Generator<TNewKey, TNewValue>
|
||||
*/
|
||||
function map(iterable $iterable, callable $mapper): Generator
|
||||
{
|
||||
foreach ($iterable as $key => $value) {
|
||||
yield from $mapper($key, $value);
|
||||
foreach ($iterable as $key => $_) {
|
||||
yield from $mapper($key);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user