This repository has been archived by the owner on Dec 11, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Add lastName gender specific on ru_RU locale #1747
Merged
Merged
Changes from 5 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
a1ddd12
Add lastName Gender specific
aanfarhan f71e973
Fix lastName specific gender for ru_RU locale
aanfarhan 176ae74
Fix lastName specific gender for ru_RU locale
aanfarhan 2a3a580
Fix lastName specific gender for ru_RU locale
aanfarhan c01c36f
Edit phpdoc on method lastName
aanfarhan 4eda000
Update src/Faker/Provider/ru_RU/Person.php
aanfarhan 63d5a01
Remove unused code
aanfarhan c6d03aa
Add ru_RU Person Test
aanfarhan 8d16af3
Fix `lastName` should generate random gender
aanfarhan 5d77af5
Remove access public annotation
aanfarhan 2919adc
Add test for random lastName
aanfarhan File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -154,4 +154,18 @@ public function middleName($gender = null) | |
static::GENDER_FEMALE, | ||
))); | ||
} | ||
|
||
/** | ||
* Return last name for the specified gender. | ||
* | ||
* @access public | ||
* @param string|null $gender A gender of the last name should be generated | ||
* for. If the argument is skipped a random gender will be used. | ||
* @return string Last name | ||
*/ | ||
public function lastName($gender = null) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do I understand correctly or is the generated There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Alright, I'll add some adjustment to the code. |
||
{ | ||
return ($gender === static::GENDER_FEMALE) ? | ||
aanfarhan marked this conversation as resolved.
Show resolved
Hide resolved
|
||
static::randomElement(static::$lastName) . 'a' : static::randomElement(static::$lastName); | ||
} | ||
} |
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.
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.
Not sure if using the
@access
annotation here is something we really need - it duplicates thepublic
visibility keyword that is already present. Can we remove it?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 agree, please remove it