Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/Assert.php
Original file line number Diff line number Diff line change
Expand Up @@ -2025,7 +2025,7 @@ public static function isNonEmptyList(mixed $array, string $message = ''): array
*
* @psalm-assert array<string, T> $array
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, this should be array<array-key, T>.

*
* @param array<string, T> $array
* @param mixed|array<array-key, T> $array
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this should just be mixed. As in, remove the @param declaration because the actual type is already mixed $array.

*
* @return array<string, T>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is incorrect, it should be @return array<array-key, T>.

*
Expand Down
6 changes: 3 additions & 3 deletions src/Mixin.php
Original file line number Diff line number Diff line change
Expand Up @@ -4896,7 +4896,7 @@ public static function allNullOrIsNonEmptyList(mixed $array, string $message = '
* @template T
* @psalm-assert array<string, T>|null $array
*
* @param array<string, T>|null $array
* @param mixed|array<array-key, T>|null $array
*
* @return array<string, T>|null
*
Expand All @@ -4915,7 +4915,7 @@ public static function nullOrIsMap(mixed $array, string $message = ''): mixed
* @template T
* @psalm-assert iterable<array<string, T>> $array
*
* @param iterable<array<string, T>> $array
* @param iterable<mixed|array<array-key, T>> $array
*
* @return iterable<array<string, T>>
*
Expand All @@ -4938,7 +4938,7 @@ public static function allIsMap(mixed $array, string $message = ''): mixed
* @template T
* @psalm-assert iterable<array<string, T>|null> $array
*
* @param iterable<array<string, T>|null> $array
* @param iterable<mixed|array<array-key, T>|null> $array
*
* @return iterable<array<string, T>|null>
*
Expand Down