Skip to content

Commit

Permalink
Merge pull request #72 from aszenz/patch-1
Browse files Browse the repository at this point in the history
update psalm type for map operation
  • Loading branch information
drupol authored Mar 17, 2021
2 parents 968c6b0 + 01e09d5 commit 360f8f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Contract/Operation/Mapable.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@
use loophp\collection\Contract\Collection;

/**
* @psalm-template TKey
* @psalm-template TKey of array-key
* @psalm-template T
* @psalm-template V
*/
interface Mapable
{
/**
* Apply one or more callbacks to a collection and use the return value.
*
* @param callable ...$callbacks
* @psalm-param callable(T, TKey, Iterator<TKey, T>): T ...$callbacks
* @psalm-param callable(T, TKey, Iterator<TKey, T>): V ...$callbacks
*
* @psalm-return \loophp\collection\Collection<TKey, T>
* @psalm-return \loophp\collection\Collection<TKey, V>
*/
public function map(callable ...$callbacks): Collection;
}

0 comments on commit 360f8f6

Please sign in to comment.