You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not sure what makes the most sense here, I guess it would make sense for the function to return mixed instead of bool, but I am sure @nunomaduro knows more, since he made the adjustments in #39323?
The text was updated successfully, but these errors were encountered:
NiclasvanEyk
changed the title
Wrong type annotation for Collection::unique
Wrong/Too strict type annotation for Collection::uniqueFeb 9, 2022
Description:
Currently the
$key
parameter of theCollection::unique
method has the following type annotation:So basically it can be
I think the first one is a little bit too strict. Looking at https://laravel.com/docs/9.x/collections#method-unique I should be able to return any value to determine uniqueness:
Suggestions
Not sure what makes the most sense here, I guess it would make sense for the function to return
mixed
instead ofbool
, but I am sure @nunomaduro knows more, since he made the adjustments in #39323?The text was updated successfully, but these errors were encountered: