Open
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
Member
Author
|
Commented from @heiglandreas I am sorry for noice, but I renamed 3.x branch to mater to protect some unexpected cases... |
ADmad
reviewed
Jan 29, 2020
| $gender = self::GENDER_FEMALE; | ||
| } | ||
|
|
||
| $genders = [ |
Contributor
There was a problem hiding this comment.
Instead of this you can also declare a constant of valid values: const VALID_GENDERS = [self::GENDER_MALE, self::GENDER_FEMALE ....]
ADmad
reviewed
Oct 25, 2020
Contributor
ADmad
left a comment
There was a problem hiding this comment.
Personally I would prefer if null was used instead of unknown when the value wasn't available from the provider. Seems fine otherwise.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.