mirror of
https://github.com/danog/endtoend-test-psl.git
synced 2025-01-22 05:11:47 +01:00
update docblocks
This commit is contained in:
parent
e17ff484be
commit
d4c7870a54
@ -12,8 +12,8 @@ use Psl;
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* Iter\flip(['a' => 1, 'b' => 2, 'c' => 3])
|
||||
* => Iter(1 => 'a', 2 => 'b', 3 => 'c')
|
||||
* Arr\flip(['a' => 1, 'b' => 2, 'c' => 3])
|
||||
* => Arr(1 => 'a', 2 => 'b', 3 => 'c')
|
||||
*
|
||||
* @psalm-template Tk of array-key
|
||||
* @psalm-template Tv of array-key
|
||||
|
@ -16,13 +16,16 @@ use Psl\Str;
|
||||
*
|
||||
* Example:
|
||||
*
|
||||
* Arr\group_by(Iter\range(0, 10), fn($i) => $i < 2 ? null : $i + 5)
|
||||
* Arr\group_by(
|
||||
* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
* fn($i) => $i < 2 ? null : $i + 5
|
||||
* )
|
||||
* => Arr(
|
||||
* 7 => [2], 8 => [3], 9 => [4], 10 => [5], 11 => [6], 12 => [7], 13 => [8], 14 => [9], 15 => [10]
|
||||
* )
|
||||
*
|
||||
* Arr\group_by(
|
||||
* Iter\range(0, 10),
|
||||
* [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10],
|
||||
* fn($i) => $i < 2 ? null : ($i >= 7 ? 12 : $i +5)
|
||||
* )
|
||||
* => Arr(7 => [2], 8 => [3], 9 => [4], 10 => [5], 11 => [6], 12 => [7, 8, 9, 10])
|
||||
|
@ -4,8 +4,6 @@ declare(strict_types=1);
|
||||
|
||||
namespace Psl\Arr;
|
||||
|
||||
use Psl\Iter;
|
||||
|
||||
/**
|
||||
* Returns a new array sorted by some scalar property of each value of the given
|
||||
* array, which is computed by the given function. If the optional
|
||||
|
@ -5,8 +5,6 @@ declare(strict_types=1);
|
||||
namespace Psl\Arr;
|
||||
|
||||
use Psl;
|
||||
use Psl\Iter;
|
||||
use Psl\Str;
|
||||
|
||||
/**
|
||||
* Returns a new array in which each value appears exactly once, where the
|
||||
|
Loading…
x
Reference in New Issue
Block a user