-
-
Notifications
You must be signed in to change notification settings - Fork 404
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
Use prefix "is" for getters on boolean fields #456
Conversation
Hey @MaximePinot! In general, I like this idea. The question is, will it integrate with the other parts of Symfony - Twig ( Could you write a test for this in |
Hi @weaverryan, I'm glad you like the idea! I added a unit test for this change. |
Hi, The Travis CI build failed, but it has nothing to do with my changes. Almost all other opened pull requests encounter the same issue... Is this pull request ready to be merged? @stof, do you approve these changes? :) |
That's correct regarding tests, even master is red. We will be looking into that next Saturday, and I hope after that we can move forward all blocked PRs. |
Hi, This looks good, I think than you can rebase to master @MaximePinot and @weaverryan this can probably be merged WDYT? |
Hi @BatsaxIV, thanks a lot for your feedback! I rebased to master and all checks have passed! (cc @weaverryan) |
Friendly ping @weaverryan and @stof. One year later, is this PR still relevant? (The branch was updated from |
If a property is named "isFoo" (or "is_foo"), the getter for this property should be named "isFoo()" instead of "isIsFoo()".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @MaximePinot!
This is subject to discussion as there is no standard about this in the PHP world. There is a "Methods and Functions" section in PSR-12 but nothing specific to getters and setters. However, I believe this is a widely used naming convention...