update docblocks

This commit is contained in:
azjezz 2020-08-27 15:18:42 +01:00
parent e17ff484be
commit d4c7870a54
4 changed files with 7 additions and 8 deletions

View File

@ -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

View File

@ -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])

View File

@ -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

View File

@ -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