Code Duplication    Length = 11-11 lines in 3 locations

src/Russian/FirstNamesInflection.php 2 locations

@@ 262-272 (lines=11) @@
259
                static::TVORIT => RussianLanguage::isHissingConsonant(S::slice($name, -1)) || S::slice($name, -1) == 'ц' ? $prefix.'ем' : $prefix.'ом',
260
                static::PREDLOJ => $prefix.'е',
261
            ];
262
        } elseif (S::slice($name, -1) == 'ь' && static::isConsonant(S::slice($name, -2, -1))) { // soft consonant
263
            $prefix = S::name(S::slice($name, 0, -1));
264
            return [
265
                static::IMENIT => $prefix.'ь',
266
                static::RODIT => $prefix.'я',
267
                static::DAT => $prefix.'ю',
268
                static::VINIT => $prefix.'я',
269
                static::TVORIT => $prefix.'ем',
270
                static::PREDLOJ => $prefix.'е',
271
            ];
272
        } elseif (in_array(S::slice($name, -2), ['ай', 'ей', 'ой', 'уй', 'яй', 'юй', 'ий'], true)) {
273
            $prefix = S::name(S::slice($name, 0, -1));
274
            $postfix = S::slice($name, -2) == 'ий' ? 'и' : 'е';
275
            return [
@@ 338-348 (lines=11) @@
335
                    static::PREDLOJ => $prefix.'е',
336
                ];
337
            }
338
        } elseif (S::slice($name, -1) == 'ь' && static::isConsonant(S::slice($name, -2, -1))) {
339
            $prefix = S::name(S::slice($name, 0, -1));
340
            return [
341
                static::IMENIT => $prefix.'ь',
342
                static::RODIT => $prefix.'и',
343
                static::DAT => $prefix.'и',
344
                static::VINIT => $prefix.'ь',
345
                static::TVORIT => $prefix.'ью',
346
                static::PREDLOJ => $prefix.'и',
347
            ];
348
        } elseif (RussianLanguage::isHissingConsonant(S::slice($name, -1))) {
349
            $prefix = S::name($name);
350
            return [
351
                static::IMENIT => $prefix,

src/Russian/LastNamesInflection.php 1 location

@@ 190-200 (lines=11) @@
187
                    static::TVORIT => $prefix.'ей',
188
                    static::PREDLOJ => $prefix.'е'
189
                ];
190
            } elseif (S::slice($name, -1) == 'а') {
191
                $prefix = S::name(S::slice($name, 0, -1));
192
                return [
193
                    static::IMENIT => S::name($name),
194
                    static::RODIT => $prefix.(static::isDeafConsonant(S::slice($name, -2, -1)) ? 'и' : 'ы'),
195
                    static::DAT => $prefix.'е',
196
                    static::VINIT => $prefix.'у',
197
                    static::TVORIT => $prefix.'ой',
198
                    static::PREDLOJ => $prefix.'е'
199
                ];
200
            } elseif (static::isConsonant(S::slice($name, -1)) && S::slice($name, -2) != 'ых') {
201
                $prefix = S::name($name);
202
                return [
203
                    static::IMENIT => S::name($name),