Skip to content
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

[5.4] Make Arr::random($array, 1) return an array of one item #19826

merged 5 commits into from Jun 29, 2017


None yet
2 participants
Copy link

vlakoff commented Jun 29, 2017

Follow-up to #19818.

A bit of proofreading would be welcome. For example I nearly forgot adding a count(func_get_args()) in the array_random() helper, which was necessary before I make the optional parameter no more "magical".


This comment has been minimized.

Copy link
Contributor Author

vlakoff commented Jun 29, 2017

vlakoff added some commits Jun 29, 2017

Set optional parameter default value to null
Makes it less magical that it behaves differently when the parameter is omitted.

@vlakoff vlakoff force-pushed the vlakoff:array_random_2 branch from 8066483 to 79e6c8c Jun 29, 2017

@taylorotwell taylorotwell merged commit 79e6c8c into laravel:5.4 Jun 29, 2017

2 checks passed

continuous-integration/styleci/pr The StyleCI analysis has passed
continuous-integration/travis-ci/pr The Travis CI build passed

@vlakoff vlakoff deleted the vlakoff:array_random_2 branch Jun 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.