diff --git a/src/Psl/Arr/at.php b/src/Psl/Arr/at.php index 97cd31f..3d304c8 100644 --- a/src/Psl/Arr/at.php +++ b/src/Psl/Arr/at.php @@ -10,7 +10,7 @@ use Psl; * Retrieve a value from the array using the given key. * If the key doesn't exist, an InvariantViolationException will be thrown. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/contains_key.php b/src/Psl/Arr/contains_key.php index 1a04275..d21c000 100644 --- a/src/Psl/Arr/contains_key.php +++ b/src/Psl/Arr/contains_key.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Returns true if the given array contains the key. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/count_values.php b/src/Psl/Arr/count_values.php index 4efcd60..3707a8a 100644 --- a/src/Psl/Arr/count_values.php +++ b/src/Psl/Arr/count_values.php @@ -12,7 +12,7 @@ use Psl\Str; * Returns a new array mapping each value to the number of times it appears * in the given iterable. * - * @psalm-template Tv as array-key + * @psalm-template Tv of array-key * * @psalm-param iterable $values * diff --git a/src/Psl/Arr/equal.php b/src/Psl/Arr/equal.php index fe268b5..46b427f 100644 --- a/src/Psl/Arr/equal.php +++ b/src/Psl/Arr/equal.php @@ -10,7 +10,7 @@ use Psl\Iter; * Returns whether the two given arrays have the same entries, using strict * equality. To guarantee equality of order as well as contents, use `===`. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/first.php b/src/Psl/Arr/first.php index 1589023..979c1b1 100644 --- a/src/Psl/Arr/first.php +++ b/src/Psl/Arr/first.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Get the first value of an array, If the array is empty, null will be returned. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/first_key.php b/src/Psl/Arr/first_key.php index fa3b40e..f4b6203 100644 --- a/src/Psl/Arr/first_key.php +++ b/src/Psl/Arr/first_key.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Get the first key of an array, if the array is empty, null will be returned. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * * @psalm-param array $array * diff --git a/src/Psl/Arr/firstx.php b/src/Psl/Arr/firstx.php index 13d4989..22668bc 100644 --- a/src/Psl/Arr/firstx.php +++ b/src/Psl/Arr/firstx.php @@ -10,7 +10,7 @@ use Psl; * Get the first value of an array, If the array is empty, an InvariantViolationException * will be thrown. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/flatten.php b/src/Psl/Arr/flatten.php index 2cd056b..b437064 100644 --- a/src/Psl/Arr/flatten.php +++ b/src/Psl/Arr/flatten.php @@ -16,7 +16,7 @@ namespace Psl\Arr; * Arr\flatten([[0 => 1, 1 => 2], [2 => 9, 3 => 8]]) * => Arr(0 => 1, 1 => 2, 2 => 9, 3 => 8) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable> $iterables diff --git a/src/Psl/Arr/flip.php b/src/Psl/Arr/flip.php index b90f9bb..7466857 100644 --- a/src/Psl/Arr/flip.php +++ b/src/Psl/Arr/flip.php @@ -16,8 +16,8 @@ use Psl\Str; * Iter\flip(['a' => 1, 'b' => 2, 'c' => 3]) * => Iter(1 => 'a', 2 => 'b', 3 => 'c') * - * @psalm-template Tk as array-key - * @psalm-template Tv as array-key + * @psalm-template Tk of array-key + * @psalm-template Tv of array-key * * @psalm-param iterable $iterable * diff --git a/src/Psl/Arr/group_by.php b/src/Psl/Arr/group_by.php index 927fa7b..67795ed 100644 --- a/src/Psl/Arr/group_by.php +++ b/src/Psl/Arr/group_by.php @@ -27,7 +27,7 @@ use Psl\Str; * ) * => Arr(7 => [2], 8 => [3], 9 => [4], 10 => [5], 11 => [6], 12 => [7, 8, 9, 10]) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $values diff --git a/src/Psl/Arr/idx.php b/src/Psl/Arr/idx.php index e1aced4..80b1f17 100644 --- a/src/Psl/Arr/idx.php +++ b/src/Psl/Arr/idx.php @@ -19,7 +19,7 @@ namespace Psl\Arr; * Arr\contains_key($array, $index) ? $array[$index] : $default; * ``` * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/keys.php b/src/Psl/Arr/keys.php index 703cf76..dda514f 100644 --- a/src/Psl/Arr/keys.php +++ b/src/Psl/Arr/keys.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Return all the keys of an array. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $arr diff --git a/src/Psl/Arr/last.php b/src/Psl/Arr/last.php index 784cba4..3797174 100644 --- a/src/Psl/Arr/last.php +++ b/src/Psl/Arr/last.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Get the last value of an array, if the array is empty, returns null. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/last_key.php b/src/Psl/Arr/last_key.php index 46f56c8..542c55a 100644 --- a/src/Psl/Arr/last_key.php +++ b/src/Psl/Arr/last_key.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Get the last key of an array, if the array is empty, null will be returned. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/lastx.php b/src/Psl/Arr/lastx.php index 75b6dda..eee4bb1 100644 --- a/src/Psl/Arr/lastx.php +++ b/src/Psl/Arr/lastx.php @@ -10,7 +10,7 @@ use Psl; * Get the last value of an array, If the array is empty, an InvariantViolationException * will be thrown. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/merge.php b/src/Psl/Arr/merge.php index ddc650b..a37fd41 100644 --- a/src/Psl/Arr/merge.php +++ b/src/Psl/Arr/merge.php @@ -15,7 +15,7 @@ namespace Psl\Arr; * Arr\merge([0 => 1, 1 => 2], [2 => 9, 3 => 8]) * => Arr(0 => 1, 1 => 2, 2 => 9, 3 => 8) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $first diff --git a/src/Psl/Arr/random.php b/src/Psl/Arr/random.php index 011bebd..4cf011e 100644 --- a/src/Psl/Arr/random.php +++ b/src/Psl/Arr/random.php @@ -11,7 +11,7 @@ use Psl\Random; /** * Retrieve a random value from a non-empty array. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $values diff --git a/src/Psl/Arr/select_keys.php b/src/Psl/Arr/select_keys.php index 09a39d5..f9d0fd9 100644 --- a/src/Psl/Arr/select_keys.php +++ b/src/Psl/Arr/select_keys.php @@ -9,7 +9,7 @@ namespace Psl\Arr; * and the given iterable. The array will have the same ordering as the * `$keys` iterable. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/shuffle.php b/src/Psl/Arr/shuffle.php index 648b2e4..1f35e2b 100644 --- a/src/Psl/Arr/shuffle.php +++ b/src/Psl/Arr/shuffle.php @@ -17,7 +17,7 @@ use Psl; * Arr\shuffle('a' => 1, 'b' => 2, 'c' => 3) * => Arr(2, 3, 1) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Arr/sort.php b/src/Psl/Arr/sort.php index ea81e24..d322eac 100644 --- a/src/Psl/Arr/sort.php +++ b/src/Psl/Arr/sort.php @@ -11,7 +11,7 @@ use Psl\Iter; * optional comparator function isn't provided, the values will be sorted in * ascending order. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Arr/sort_by.php b/src/Psl/Arr/sort_by.php index 78ce89b..e13268c 100644 --- a/src/Psl/Arr/sort_by.php +++ b/src/Psl/Arr/sort_by.php @@ -12,7 +12,7 @@ use Psl\Iter; * comparator function isn't provided, the values will be sorted in ascending * order of scalar key. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template Ts * diff --git a/src/Psl/Arr/sort_by_key.php b/src/Psl/Arr/sort_by_key.php index cd2b022..d43597b 100644 --- a/src/Psl/Arr/sort_by_key.php +++ b/src/Psl/Arr/sort_by_key.php @@ -11,7 +11,7 @@ use Psl\Iter; * optional comparator function isn't provided, the keys will be sorted in * ascending order. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Arr/sort_with_keys.php b/src/Psl/Arr/sort_with_keys.php index 1c72aef..399d0d6 100644 --- a/src/Psl/Arr/sort_with_keys.php +++ b/src/Psl/Arr/sort_with_keys.php @@ -11,7 +11,7 @@ use Psl\Iter; * optional comparator function isn't provided, the values will be sorted in * ascending order ( maintains index association ). * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Arr/sort_with_keys_by.php b/src/Psl/Arr/sort_with_keys_by.php index 91800b0..447929d 100644 --- a/src/Psl/Arr/sort_with_keys_by.php +++ b/src/Psl/Arr/sort_with_keys_by.php @@ -12,7 +12,7 @@ use Psl\Iter; * comparator function isn't provided, the values will be sorted in ascending * order of scalar key. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template Ts * diff --git a/src/Psl/Arr/unique.php b/src/Psl/Arr/unique.php index 275373d..b7d9b75 100644 --- a/src/Psl/Arr/unique.php +++ b/src/Psl/Arr/unique.php @@ -7,7 +7,7 @@ namespace Psl\Arr; /** * Returns a new array in which each value appears exactly once. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Arr/unique_by.php b/src/Psl/Arr/unique_by.php index b61ae9d..f76dcfd 100644 --- a/src/Psl/Arr/unique_by.php +++ b/src/Psl/Arr/unique_by.php @@ -13,9 +13,9 @@ use Psl\Str; * value's uniqueness is determined by transforming it to a scalar via the * given function. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv - * @psalm-template Ts as array-key + * @psalm-template Ts of array-key * * @psalm-param iterable $iterable * @psalm-param (callable(Tv): Ts) $scalar_func diff --git a/src/Psl/Collection/ConstMap.php b/src/Psl/Collection/ConstMap.php index 3ab0425..bd2ad61 100644 --- a/src/Psl/Collection/ConstMap.php +++ b/src/Psl/Collection/ConstMap.php @@ -9,7 +9,7 @@ use IteratorAggregate; /** * Interface ConstMap. * - * @template Tk as array-key + * @template Tk of array-key * @template Tv * * @extends ConstCollection> diff --git a/src/Psl/Collection/ConstSetAccess.php b/src/Psl/Collection/ConstSetAccess.php index 3d4d0cf..a038abd 100644 --- a/src/Psl/Collection/ConstSetAccess.php +++ b/src/Psl/Collection/ConstSetAccess.php @@ -7,7 +7,7 @@ namespace Psl\Collection; /** * The interface for all Sets to enable access its values. * - * @template Tv as array-key + * @template Tv of array-key */ interface ConstSetAccess { diff --git a/src/Psl/Collection/ImmMap.php b/src/Psl/Collection/ImmMap.php index 878a276..46a27c9 100644 --- a/src/Psl/Collection/ImmMap.php +++ b/src/Psl/Collection/ImmMap.php @@ -8,7 +8,7 @@ use Psl; use Psl\Iter; /** - * @template Tk as array-key + * @template Tk of array-key * @template Tv * * @implements ConstMap diff --git a/src/Psl/Collection/Map.php b/src/Psl/Collection/Map.php index be05d98..25a8a08 100644 --- a/src/Psl/Collection/Map.php +++ b/src/Psl/Collection/Map.php @@ -24,7 +24,7 @@ use Psl\Iter; * are being removed. When a new key is added or an element is removed, all * iterators that point to the `Map` shall be considered invalid. * - * @template Tk as array-key + * @template Tk of array-key * @template Tv * * @implements MutableMap diff --git a/src/Psl/Collection/MapAccess.php b/src/Psl/Collection/MapAccess.php index 389639a..c6eb60b 100644 --- a/src/Psl/Collection/MapAccess.php +++ b/src/Psl/Collection/MapAccess.php @@ -11,7 +11,7 @@ namespace Psl\Collection; * defined in its parent interfaces. But you could theoretically use this * interface for parameter and return type annotations. * - * @template Tk as array-key + * @template Tk of array-key * @template Tv * * @extends ConstMapAccess diff --git a/src/Psl/Collection/MutableMap.php b/src/Psl/Collection/MutableMap.php index ef0bd8a..23ba7af 100644 --- a/src/Psl/Collection/MutableMap.php +++ b/src/Psl/Collection/MutableMap.php @@ -7,7 +7,7 @@ namespace Psl\Collection; /** * Represents a write-enabled (mutable) sequence of key/value pairs (ie. map). * - * @template Tk as array-key + * @template Tk of array-key * @template Tv * * @extends ConstMap diff --git a/src/Psl/Collection/SetAccess.php b/src/Psl/Collection/SetAccess.php index db2700b..3c6b1fa 100644 --- a/src/Psl/Collection/SetAccess.php +++ b/src/Psl/Collection/SetAccess.php @@ -7,7 +7,7 @@ namespace Psl\Collection; /** * The interface for mutable `Set`s to enable removal of its values. * - * @template Tv as array-key + * @template Tv of array-key * * @extends ConstSetAccess */ diff --git a/src/Psl/Iter/chain.php b/src/Psl/Iter/chain.php index 94020c3..7fc030c 100644 --- a/src/Psl/Iter/chain.php +++ b/src/Psl/Iter/chain.php @@ -17,7 +17,7 @@ use Generator; * Iter\chain(Iterable\range(0, 5), Iter\range(6, 10), Iter\range(11, 15)) * => Iter(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable ...$iterables Iterables to chain diff --git a/src/Psl/Iter/contains_key.php b/src/Psl/Iter/contains_key.php index d65a1b8..1dbc975 100644 --- a/src/Psl/Iter/contains_key.php +++ b/src/Psl/Iter/contains_key.php @@ -9,7 +9,7 @@ use Psl\Arr; /** * Returns true if the given iterable contains the key. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable, diff --git a/src/Psl/Iter/diff_by_key.php b/src/Psl/Iter/diff_by_key.php index d759a47..c8269ae 100644 --- a/src/Psl/Iter/diff_by_key.php +++ b/src/Psl/Iter/diff_by_key.php @@ -9,7 +9,7 @@ use Generator; use Psl\Arr; /** - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $first diff --git a/src/Psl/Iter/drop.php b/src/Psl/Iter/drop.php index 010f7a7..4acaaf6 100644 --- a/src/Psl/Iter/drop.php +++ b/src/Psl/Iter/drop.php @@ -12,7 +12,7 @@ namespace Psl\Iter; * Iter\drop([1, 2, 3, 4, 5], 3) * => Iter(4, 5) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to drop the elements from diff --git a/src/Psl/Iter/drop_while.php b/src/Psl/Iter/drop_while.php index 3034e8c..c0d345d 100644 --- a/src/Psl/Iter/drop_while.php +++ b/src/Psl/Iter/drop_while.php @@ -17,7 +17,7 @@ use Generator; * Iter\drop_while([3, 1, 4, -1, 5], fm($i) => $i > 0) * => Iter(-1, 5) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to drop values from diff --git a/src/Psl/Iter/enumerate.php b/src/Psl/Iter/enumerate.php index ab24468..82e707c 100644 --- a/src/Psl/Iter/enumerate.php +++ b/src/Psl/Iter/enumerate.php @@ -9,7 +9,7 @@ use Generator; /** * Converts an iterable of key and value pairs, into an iterable of entries. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/filter.php b/src/Psl/Iter/filter.php index 4e0d6be..895ea2b 100644 --- a/src/Psl/Iter/filter.php +++ b/src/Psl/Iter/filter.php @@ -19,7 +19,7 @@ use Generator; * Iter\filter(['foo', 'bar', 'baz', 'qux'], fn($value) => Str\contains($value, 'a')); * => Iter('bar', 'baz') * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/filter_keys.php b/src/Psl/Iter/filter_keys.php index e4d5e4d..fa01679 100644 --- a/src/Psl/Iter/filter_keys.php +++ b/src/Psl/Iter/filter_keys.php @@ -19,7 +19,7 @@ use Generator; * Iter\filter_keys([0 => 'a', 1 => 'b', 2 => 'c'], fn($key) => $key <= 1); * => Iter(0 => 'a', 1 => 'b') * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/filter_with_key.php b/src/Psl/Iter/filter_with_key.php index 9f102db..1d84cfd 100644 --- a/src/Psl/Iter/filter_with_key.php +++ b/src/Psl/Iter/filter_with_key.php @@ -19,7 +19,7 @@ use Psl; * Iter\filter(['foo', 'bar', 'baz', 'qux'], fn($key, $value) => $key > 1 && Str\contains($value, 'a')); * => Iter('baz') * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/first_key.php b/src/Psl/Iter/first_key.php index 3aa8fe3..a2f9d7f 100644 --- a/src/Psl/Iter/first_key.php +++ b/src/Psl/Iter/first_key.php @@ -22,7 +22,7 @@ use Psl\Arr; * Iter\first_key([]) * => Null * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/flatten.php b/src/Psl/Iter/flatten.php index dbeab32..00d234b 100644 --- a/src/Psl/Iter/flatten.php +++ b/src/Psl/Iter/flatten.php @@ -10,7 +10,7 @@ use Generator; * Returns a new dict formed by merging the iterable elements of the * given iterable. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable> $iterables diff --git a/src/Psl/Iter/from_entires.php b/src/Psl/Iter/from_entires.php index 4642d18..65485a7 100644 --- a/src/Psl/Iter/from_entires.php +++ b/src/Psl/Iter/from_entires.php @@ -10,7 +10,7 @@ use Generator; * Returns a new dict where each mapping is defined by the given key/value * tuples. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $entries diff --git a/src/Psl/Iter/from_keys.php b/src/Psl/Iter/from_keys.php index 1875254..d160223 100644 --- a/src/Psl/Iter/from_keys.php +++ b/src/Psl/Iter/from_keys.php @@ -10,7 +10,7 @@ use Generator; * Returns a new dict where each value is the result of calling the given * function on the corresponding key. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $keys diff --git a/src/Psl/Iter/keys.php b/src/Psl/Iter/keys.php index 7404d17..ef9f9c8 100644 --- a/src/Psl/Iter/keys.php +++ b/src/Psl/Iter/keys.php @@ -14,7 +14,7 @@ use Generator; * Iter\keys(['a' => 0, 'b' => 1, 'c' => 2]) * => Iter('a', 'b', 'c') * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to get keys from diff --git a/src/Psl/Iter/last.php b/src/Psl/Iter/last.php index 2147a89..21e3e9a 100644 --- a/src/Psl/Iter/last.php +++ b/src/Psl/Iter/last.php @@ -9,7 +9,7 @@ use Psl\Arr; /** * Get the last value of an iterable, if the iterable is empty, returns null. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Iter/last_key.php b/src/Psl/Iter/last_key.php index 93f34a4..1171322 100644 --- a/src/Psl/Iter/last_key.php +++ b/src/Psl/Iter/last_key.php @@ -9,7 +9,7 @@ use Psl\Arr; /** * Get the last key of an iterable, if the iterable is empty, null will be returned. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param array $array diff --git a/src/Psl/Iter/map.php b/src/Psl/Iter/map.php index 818dac2..60e5181 100644 --- a/src/Psl/Iter/map.php +++ b/src/Psl/Iter/map.php @@ -18,7 +18,7 @@ use Generator; * Iter\map([1, 2, 3, 4, 5], fn($i) => $i * 2); * => Iter(2, 4, 6, 8, 10) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template T * diff --git a/src/Psl/Iter/map_keys.php b/src/Psl/Iter/map_keys.php index 5e53911..0345daf 100644 --- a/src/Psl/Iter/map_keys.php +++ b/src/Psl/Iter/map_keys.php @@ -18,8 +18,8 @@ use Generator; * Iter\map_keys([0 => 1, 1 => 2, 2 => 3, 3 => 4, 4 => 5], fn($i) => $i * 2); * => Iter(0 => 1, 2 => 2, 4 => 3, 6 => 4, 8 => 5) * - * @psalm-template Tk1 as array-key - * @psalm-template Tk2 as array-key + * @psalm-template Tk1 of array-key + * @psalm-template Tk2 of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to be mapped over diff --git a/src/Psl/Iter/map_with_key.php b/src/Psl/Iter/map_with_key.php index dc91cfa..dfd4175 100644 --- a/src/Psl/Iter/map_with_key.php +++ b/src/Psl/Iter/map_with_key.php @@ -17,7 +17,7 @@ use Generator; * Iter\map_with_key([1, 2, 3, 4, 5], fn($k, $v) => $k + $v); * => Iter(1, 3, 5, 7, 9) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template T * diff --git a/src/Psl/Iter/pull.php b/src/Psl/Iter/pull.php index aafbe9e..cfadaf8 100644 --- a/src/Psl/Iter/pull.php +++ b/src/Psl/Iter/pull.php @@ -24,11 +24,11 @@ use Generator; * ) * * - * k as array-key + * k of array-key * v * * @psalm-template T - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/pull_with_key.php b/src/Psl/Iter/pull_with_key.php index 3cf0d5d..0ca3d20 100644 --- a/src/Psl/Iter/pull_with_key.php +++ b/src/Psl/Iter/pull_with_key.php @@ -23,9 +23,9 @@ use Generator; * 70 => 'H', 131 => 'I', 264 => 'J', 521 => 'K', 1034 => 'L' * ) * - * @psalm-template Tk1 as array-key + * @psalm-template Tk1 of array-key * @psalm-template Tv1 - * @psalm-template Tk2 as array-key + * @psalm-template Tk2 of array-key * @psalm-template Tv2 * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/random.php b/src/Psl/Iter/random.php index 249c924..41f0eb8 100644 --- a/src/Psl/Iter/random.php +++ b/src/Psl/Iter/random.php @@ -10,7 +10,7 @@ use Psl\Arr; /** * Retrieve a random value from a non-empty iterable. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/reduce.php b/src/Psl/Iter/reduce.php index a56d2d7..73b8272 100644 --- a/src/Psl/Iter/reduce.php +++ b/src/Psl/Iter/reduce.php @@ -19,7 +19,7 @@ namespace Psl\Iter; * Iter\reduce(Iter\range(1, 5), fn($accumulator, $value) => $accumulator * $value, 1) * => 120 * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template Ts * diff --git a/src/Psl/Iter/reductions.php b/src/Psl/Iter/reductions.php index 27b4013..b245596 100644 --- a/src/Psl/Iter/reductions.php +++ b/src/Psl/Iter/reductions.php @@ -15,7 +15,7 @@ use Generator; * * Reductions yield each accumulator along the way. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * @psalm-template Ts * diff --git a/src/Psl/Iter/reindex.php b/src/Psl/Iter/reindex.php index 477ca17..8748d6d 100644 --- a/src/Psl/Iter/reindex.php +++ b/src/Psl/Iter/reindex.php @@ -26,8 +26,8 @@ use Generator; * 24 => ['id' => 24, 'name' => 'bar'] * ) * - * @psalm-template Tk1 as array-key - * @psalm-template Tk2 as array-key + * @psalm-template Tk1 of array-key + * @psalm-template Tk2 of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to reindex diff --git a/src/Psl/Iter/slice.php b/src/Psl/Iter/slice.php index fea1ead..7e3f4a2 100644 --- a/src/Psl/Iter/slice.php +++ b/src/Psl/Iter/slice.php @@ -18,7 +18,7 @@ use Psl; * IterIter\slice([-5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5], 5, 3) * => Iter(0, 1, 2, 3) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to take the slice from diff --git a/src/Psl/Iter/take.php b/src/Psl/Iter/take.php index f2c3ff1..2c2e0b4 100644 --- a/src/Psl/Iter/take.php +++ b/src/Psl/Iter/take.php @@ -7,7 +7,7 @@ namespace Psl\Iter; /** * Take the first n elements from an iterable. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/take_while.php b/src/Psl/Iter/take_while.php index 573d2ff..886e30e 100644 --- a/src/Psl/Iter/take_while.php +++ b/src/Psl/Iter/take_while.php @@ -17,7 +17,7 @@ use Generator; * Iter\take_while([3, 1, 4, -1, 5], fn($i) => $i > 0) * => iter(3, 1, 4) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to take values from diff --git a/src/Psl/Iter/to_array_with_keys.php b/src/Psl/Iter/to_array_with_keys.php index 42195f8..b8216ec 100644 --- a/src/Psl/Iter/to_array_with_keys.php +++ b/src/Psl/Iter/to_array_with_keys.php @@ -7,7 +7,7 @@ namespace Psl\Iter; /** * Copy the iterable into an array with keys. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/to_iterator.php b/src/Psl/Iter/to_iterator.php index 69611c8..e6feaaf 100644 --- a/src/Psl/Iter/to_iterator.php +++ b/src/Psl/Iter/to_iterator.php @@ -10,7 +10,7 @@ use IteratorAggregate; /** * Copy the iterable into an Iterator. * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable diff --git a/src/Psl/Iter/values.php b/src/Psl/Iter/values.php index 891911c..05c4848 100644 --- a/src/Psl/Iter/values.php +++ b/src/Psl/Iter/values.php @@ -17,7 +17,7 @@ use Generator; * Iter\values([17 => 1, 42 => 2, -2 => 100]) * => Iter(0 => 1, 1 => 42, 2 => 100) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable $iterable Iterable to get values from diff --git a/src/Psl/Iter/zip.php b/src/Psl/Iter/zip.php index 2fc89ee..079714f 100644 --- a/src/Psl/Iter/zip.php +++ b/src/Psl/Iter/zip.php @@ -22,7 +22,7 @@ use Generator; * Arr(2, 2, 2) => Arr(3, 6, 9) * ) * - * @psalm-template Tk as array-key + * @psalm-template Tk of array-key * @psalm-template Tv * * @psalm-param iterable ...$iterables