-
-
Notifications
You must be signed in to change notification settings - Fork 633
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
Using PHP keywords as method name #2055
Comments
Hi, Thanks for you report. I thing you have to switch to phpdoc v3. We had issues like this we could not fix in phpdoc v2. V3 is still in alpha phase but should be stable enough to handle a library like yours. Please let me know if this solves your issue. |
Hi, @jaapio! |
This issue is fixed with #2056 |
Thanks! I'll check. 😃 |
I want to document a class (the link to the project exists in the Environment section) that has a method named
JSON::isSet()
. When I want to document it using phpDocumentor, the following error will be shown and the documentation will not be created successfully:Parse Error: Syntax error, unexpected T_ISSET, expecting T_STRING on line 307 No summary was found for this file
Since PHP methods are case-insensitive, maybe phpDocumentor think the method as
JSON::isset()
, a PHP keyword. It may think a PHP keyword as method name is an error; however, as of PHP7, it is possible to do that (see this RFC).How to overcome the problem? Is there any quick fix for this?
Note: When I comment the
JSON::isSet()
definition or I change its name to something else (e.g.JSON::is_set()
) and run the same command, the documentation will be created successfully.Environment
The text was updated successfully, but these errors were encountered: