-
Notifications
You must be signed in to change notification settings - Fork 102
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
Replace get/setSex with get/setGender -> master #105
base: master
Are you sure you want to change the base?
Conversation
As explained in #94 it's a good idea to use gender instead of sex. To not break BC the get/setSex are still available but are marked as deprecated. The current functionality works as before. In addition to that it is possible to set `other` as gender and the default now is to return `unknown` instead of NULL.
As they are already used removing them is a BC break that we do not want!
This removes the calls to get/setSex with the appropriate get/setGender calls. Tests are now again passing
The removed docBlock contains redundant information and was therefore removed
Commented from @heiglandreas I am sorry for noice, but I renamed 3.x branch to mater to protect some unexpected cases... |
$gender = self::GENDER_FEMALE; | ||
} | ||
|
||
$genders = [ |
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.
Instead of this you can also declare a constant of valid values: const VALID_GENDERS = [self::GENDER_MALE, self::GENDER_FEMALE ....]
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.
Personally I would prefer if null
was used instead of unknown
when the value wasn't available from the provider. Seems fine otherwise.
As explained in #94 it's a good idea to use gender instead of sex.
To not break BC the get/setSex are still available but are marked as deprecated. The current functionality works as before. In addition to that it is possible to set other as gender and the default now is to return unknown instead of NULL.