From 9682f3bc65d7cc0db92855ad533d574955944a18 Mon Sep 17 00:00:00 2001 From: Alexander Storchak Date: Tue, 10 Sep 2024 23:55:26 +0300 Subject: [PATCH] =?UTF-8?q?Added=20precalculated=20cases=20of=20cardinal?= =?UTF-8?q?=20number=208=20in=20Russian\CardinalNumeralGenerator=20(fix=20?= =?UTF-8?q?'=D0=B2=D0=BE=D1=81=D0=B5=D0=BC=D0=B8'=20->=20'=D0=B2=D0=BE?= =?UTF-8?q?=D1=81=D1=8C=D0=BC=D0=B8'=20for=20genitive=20case)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Russian/CardinalNumeralGenerator.php | 8 ++++++++ tests/Russian/CardinalNumeralTest.php | 1 + 2 files changed, 9 insertions(+) diff --git a/src/Russian/CardinalNumeralGenerator.php b/src/Russian/CardinalNumeralGenerator.php index 0ac2233..0ae7b3a 100644 --- a/src/Russian/CardinalNumeralGenerator.php +++ b/src/Russian/CardinalNumeralGenerator.php @@ -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 => 'восьмидесяти', diff --git a/tests/Russian/CardinalNumeralTest.php b/tests/Russian/CardinalNumeralTest.php index f226239..52b126f 100644 --- a/tests/Russian/CardinalNumeralTest.php +++ b/tests/Russian/CardinalNumeralTest.php @@ -29,6 +29,7 @@ public function numbersProvider() return [ [1, NumeralGenerator::MALE, 'один', 'одного', 'одному', 'один', 'одним', 'одном'], [1, NumeralGenerator::FEMALE, 'одна', 'одной', 'одной', 'одну', 'одной', 'одной'], + [8, NumeralGenerator::MALE, 'восемь', 'восьми', 'восьми', 'восемь', 'восемью', 'восьми'], [ 85, NumeralGenerator::MALE,