Skip to content

Conversation

mnapoli
Copy link
Contributor

@mnapoli mnapoli commented Apr 5, 2016

Q A
Branch? master?
Bug fix? no
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

Improve the phpdoc for the $default parameter of the get() method. It wasn't clear when the default value would be used (whether the key would not exist or the value was null or nullish).

The comment is now in sync with Symfony\Component\HttpFoundation\ParameterBag::get().

Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).

The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.
@xabbuh
Copy link
Member

xabbuh commented Apr 5, 2016

👍 (should be merged into the 2.3 branch)

Status: Reviewed

@javiereguiluz
Copy link
Member

In case you accept suggestions for the new doc, what about changing this:

@param mixed  $default the default value if the parameter key does not exist

by this:

@param mixed  $default the value returned when the parameter key does not exist

@mnapoli
Copy link
Contributor Author

mnapoli commented Apr 5, 2016

@javiereguiluz 👍 how about this:

the value to return if the parameter key does not exist

?

@nicolas-grekas
Copy link
Member

Thank you @mnapoli.

nicolas-grekas added a commit that referenced this pull request Apr 5, 2016
This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #18442).

Discussion
----------

[HttpFoundation] Improve phpdoc

| Q             | A
| ------------- | ---
| Branch?       | master?
| Bug fix?      | no
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

Improve the phpdoc for the `$default` parameter of the `get()` method. It wasn't clear when the default value would be used (whether the key would not exist or the value was `null` or nullish).

The comment is now in sync with `Symfony\Component\HttpFoundation\ParameterBag::get()`.

Commits
-------

6bfbb2e [HttpFoundation] Improve phpdoc
@mnapoli mnapoli deleted the patch-1 branch April 5, 2016 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants