-
Notifications
You must be signed in to change notification settings - Fork 729
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
Remove query, filter, facet, transport and type class suffixes #303
Conversation
… Removed Filter suffix from AbstractMulti filter
@@ -10,7 +11,7 @@ | |||
* @package Elastica | |||
* @author James Boehmer <[email protected]> | |||
*/ | |||
class NullTransport extends AbstractTransport | |||
class Null extends AbstractTransport |
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.
I would have expected, that this is also a reserved keyword.
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.
Null is not a reserved keyword, here is full list http://php.net/manual/en/reserved.keywords.php.
Remove query, filter, facet, transport and type class suffixes
Should it be BoolAnd or AndBool? |
You think there is a point in renaming those classes to AndBool, OrBool and NotBool ? |
That is exactly what I'm not sure about. Which one is better and makes more sense. Why I thought it should perhaps be the other way around is because of autocompletion. People start to to Prefix for the prefix query and will start to type and for the Andquery. So autocomplete would work. On the other hand someone perhaps knows, he needs a bool query and starts to type. |
I've tried PhpStorm autocomplete - it suggests BoolOr class when you type Or. |
Very helpful. At least that confirms again that PhpStorm is awesome :-) I personally prefer the OrBool option, but as I described above I'm undecided. |
Removed Query, Filter, Facet, Transport and Type suffixes form class names to avoid duplicating this part in namespace and class.
Abstract classes and Exceptions were left as it is. I checked ZF2 and Symfony2 naming convensions and both of them suggest naming abstract classes with Abstract prefix and exception classes with Exception suffix.
Thou some class names were interfering with php reserved keywords, so i had to rename them in different manner,