Skip to content

Commit

Permalink
update functions signature
Browse files Browse the repository at this point in the history
  • Loading branch information
wapmorgan committed Feb 3, 2018
1 parent 3a7b5a7 commit 01b6b1b
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/Russian/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,14 @@
* Should be one of [[morphos\Gender]] constants.
* @return string Returns string containing the inflection of name to a case.
*/
function inflectName($fullName, $case, $gender = null)
function inflectName($fullName, $case = null, $gender = null)
{
if ($case === null) {
return getNameCases($fullName);
}

if (in_array($case, [Gender::MALE, Gender::FEMALE], true)) {
return getNameCases($fullName, $gender);
return getNameCases($fullName, $case);
}

$fullName = normalizeFullName($fullName);
Expand Down

0 comments on commit 01b6b1b

Please sign in to comment.