Closed ghost closed 3 years ago
It needs to accept an array, sometimes people just want to use arrays for their items.
We can just always turn it into a collection in the method itself, but it needs to allow basic arrays with indexes or associative.
I'm done with type declarations and docblocks across the package with the exception of the EachStatement
Currently the
$items
prop is able to accept either an array or aCollection
I'm wondering if it wouldn't be better to declare this as a
Collection
since we're using Laravel. This would require a user to wrap any raw array incollect()
before passing it in, but I think having it as typed declaration is better than worrying about this one tiny extra step.I'm gonna submit the pull request this way and document it, if you don't want it that way then of course you can edit the request.