Skip to content

Commit

Permalink
Merge pull request #151 from alex-storchak/fix-cases-for-cardinal-num…
Browse files Browse the repository at this point in the history
…-8-russian

Added precalculated cases of cardinal number 8 in Russian\CardinalNumeralGenerator
  • Loading branch information
wapmorgan authored Sep 26, 2024
2 parents 71dec63 + 9682f3b commit 857ce52
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Russian/CardinalNumeralGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,14 @@ class CardinalNumeralGenerator extends NumeralGenerator implements Cases
self::TVORIT => 'четырьмя',
self::PREDLOJ => 'четырех',
],
'восемь' => [
self::IMENIT => 'восемь',
self::RODIT => 'восьми',
self::DAT => 'восьми',
self::VINIT => 'восемь',
self::TVORIT => 'восемью',
self::PREDLOJ => 'восьми',
],
'восемьдесят' => [
self::IMENIT => 'восемьдесят',
self::RODIT => 'восьмидесяти',
Expand Down
1 change: 1 addition & 0 deletions tests/Russian/CardinalNumeralTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ public function numbersProvider()
return [
[1, NumeralGenerator::MALE, 'один', 'одного', 'одному', 'один', 'одним', 'одном'],
[1, NumeralGenerator::FEMALE, 'одна', 'одной', 'одной', 'одну', 'одной', 'одной'],
[8, NumeralGenerator::MALE, 'восемь', 'восьми', 'восьми', 'восемь', 'восемью', 'восьми'],
[
85,
NumeralGenerator::MALE,
Expand Down

0 comments on commit 857ce52

Please sign in to comment.