Pagerfanta
Pagerfanta copied to clipboard
CollectionAdapter typehint
i think the CollectionAdapter constructor
Pagerfanta\Doctrine\Collections\CollectionAdapter::__construct(Collection $collection)
should be typehinted to ReadableCollection instead of Collection.
that's what Doctrine\Common\Collections\Selectable::matching() is typehinted to as well. and both ::slice() and ::count() used in the adapter come from ReadableCollection.
not a big deal, i don't know if any class actually does implement just ReadableCollection and not Collection, but still.
Feel free to send a PR in for it. I know the readable interface is relatively new compared to either the adapter here or the collections package as a whole, so it's just one of those cases where things haven't been updated to use it.