Since the update to v11.32.0
this commit introduced type hints for the Paginator Class. The @param for $items was defined too narrow, restricting the use of Collections, but they are supported and it seems like to be preffered, as the protected setItems() method which is called from within the constructor is supporting Collections and converts any array in to one.
This is not a bugfix as the code works, but a type fix supporting the usage of phpstan/larastan
This PR broadens the type hint for the param $items to be compatible with setItems() by allowing Collections with Tkey and TValue
I did not add null as allowed, although it is supported in the setItems method, but maybe that should be supported as well?
Since the update to v11.32.0 this commit introduced type hints for the Paginator Class. The @param for $items was defined too narrow, restricting the use of Collections, but they are supported and it seems like to be preffered, as the protected
setItems()
method which is called from within the constructor is supporting Collections and converts any array in to one.This is not a bugfix as the code works, but a type fix supporting the usage of phpstan/larastan
This PR broadens the type hint for the param $items to be compatible with
setItems()
by allowing Collections withTkey
andTValue
I did not add null as allowed, although it is supported in the setItems method, but maybe that should be supported as well?