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

[8.x] Align Collection::pluck()/Arr:pluck() DocBlock with data_get() #34703

Merged
merged 1 commit into from
Oct 6, 2020
Merged

[8.x] Align Collection::pluck()/Arr:pluck() DocBlock with data_get() #34703

merged 1 commit into from
Oct 6, 2020

Conversation

AegirLeet
Copy link
Contributor

Arr::pluck() supports int and null for its $value param in addition the the already documented string|array, because it calls data_get() under the hood, which supports those types. Collection::pluck() just forwards the call to Arr:pluck(), so it supports the same types.

This PR aligns the DocBlocks to reflect this.

For reference, data_get() DocBlock:

/**
* Get an item from an array or object using "dot" notation.
*
* @param mixed $target
* @param string|array|int|null $key
* @param mixed $default
* @return mixed
*/
function data_get($target, $key, $default = null)

@taylorotwell taylorotwell merged commit 669034c into laravel:8.x Oct 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants