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

Implement isDefaultValueConstant and fix getDefaultValueConstantName #4009

Closed
wants to merge 8 commits into from
Closed

Implement isDefaultValueConstant and fix getDefaultValueConstantName #4009

wants to merge 8 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Oct 17, 2014

Closes #3812
Closes #3828.

Lucas Tadeu Teixeira added 3 commits October 17, 2014 16:04
The 'defaultText' field inside the 'info' array of a ReflectionParameter
instance is matched against a regex that checks if it complies with the
accepted format for labels and constants names.

Then it checks whether or not it is one of the following reserved words:
'NULL', 'false' and 'true'. If it is, then the function returns FALSE.
Otherwise, TRUE.
The method getDefaultValueConstantName returns NULL in case the
value is NOT a constant; otherwise, it returns the constant's name.

To check if the value is indeed a constant, we use the method
isDefaultValueConstant method.
@facebook-github-bot
Copy link
Contributor

This pull request has been imported into Phabricator, and discussion and review of the diff will take place at https://reviews.facebook.net/D25095

Lucas Tadeu Teixeira added 5 commits October 17, 2014 18:58
Correct the doc on return values to lowercase booleans for the
isDefaultValueConstant method.
Add return of NULL (to the method cited above) when the given argument does not
have a default value.
@sgolemon sgolemon changed the title (#3812 and #3828)Implement isDefaultValueConstant and fix getDefaultValueConstantName Implement isDefaultValueConstant and fix getDefaultValueConstantName Nov 6, 2014
@JoelMarcey
Copy link
Contributor

@lucastadeu Hi. As discussed on the pull request comments, we are abandoning this pull request in favor of another approach. Thanks!

@JoelMarcey JoelMarcey closed this Nov 14, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants