-
Notifications
You must be signed in to change notification settings - Fork 9.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Edited doc block of the walk method in a Collection #13373
Edited doc block of the walk method in a Collection #13373
Conversation
@@ -492,7 +492,7 @@ public function clear() | |||
* | |||
* Returns array with results of callback for each item | |||
* | |||
* @param string $callback | |||
* @param string|array $callback |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please replace to callable
, I believe it is a better alternative.
As always, amend commit and do force push, please.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done & squashed into a single commit. Please let me know if anything else is needed.
@ByteCreation no need to specify Now please squash changes from 3 commits into single commit and force push. If you need assistance with that, just tell me. |
- Edited doc block of the walk method in a Collection to reflect that this method will accept a callback
519754d
to
906713b
Compare
@ByteCreation thank you for contributing. Please accept Community Contributors team invitation here to gain extended permissions for this repository. |
Description
Edited doc block of the walk method in a Collection to reflect that this method will accept an array.
The following callback is created by passing an array that consists of an object and a string. The method of that object will be used in the callback, and each model in the collection will be passed to the method as the first parameter. While this results in a successful callback, the doc block of the walk method of a collection incorrectly reports that it will only accept a string, while the following example uses an array.
Manual testing scenarios
Code is provided above to show a scenario where the doc block does not reflect what it will actually accept.
Contribution checklist