Skip to content

Commit

Permalink
fix(dict/vec): might be non-empty-list/non-empty-array for map functi…
Browse files Browse the repository at this point in the history
…ons (#384)
  • Loading branch information
dragosprotung authored Dec 21, 2022
1 parent 3ce5e7a commit 59509e9
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Psl/Dict/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @param iterable<Tk, Tv> $iterable Iterable to be mapped over
* @param (Closure(Tv): T) $function
*
* @return array<Tk, T>
* @return ($iterable is non-empty-array ? non-empty-array<Tk, T> : array<Tk, T>)
*/
function map(iterable $iterable, Closure $function): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psl/Dict/map_keys.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @param iterable<Tk1, Tv> $iterable Iterable to be mapped over
* @param (Closure(Tk1): Tk2) $function
*
* @return array<Tk2, Tv>
* @return ($iterable is non-empty-array ? non-empty-array<Tk2, Tv> : array<Tk2, Tv>)
*/
function map_keys(iterable $iterable, Closure $function): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psl/Dict/map_with_key.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
* @param iterable<Tk, Tv> $iterable Iterable to be mapped over
* @param (Closure(Tk,Tv): T) $function
*
* @return array<Tk, T>
* @return ($iterable is non-empty-array ? non-empty-array<Tk, T> : array<Tk, T>)
*/
function map_with_key(iterable $iterable, Closure $function): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psl/Vec/map.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @param iterable<Tk, Tv> $iterable Iterable to be mapped over
* @param (Closure(Tv): T) $function
*
* @return list<T>
* @return ($iterable is non-empty-array ? non-empty-list<T> : list<T>)
*/
function map(iterable $iterable, Closure $function): array
{
Expand Down
2 changes: 1 addition & 1 deletion src/Psl/Vec/map_with_key.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* @param iterable<Tk, Tv> $iterable Iterable to be mapped over
* @param (Closure(Tk,Tv): T) $function
*
* @return list<T>
* @return ($iterable is non-empty-array ? non-empty-list<T> : list<T>)
*/
function map_with_key(iterable $iterable, Closure $function): array
{
Expand Down

0 comments on commit 59509e9

Please sign in to comment.