Code Duplication    Length = 11-11 lines in 2 locations

src/Russian/MiddleNamesInflection.php 1 location

@@ 78-88 (lines=11) @@
75
                Cases::TVORIT => $name.'ем',
76
                Cases::PREDLOJ => $name.'е',
77
            );
78
        } elseif (S::slice($name, -2) == 'на') {
79
            $prefix = S::name(S::slice($name, 0, -1));
80
            return array(
81
                Cases::IMENIT => $prefix.'а',
82
                Cases::RODIT => $prefix.'ы',
83
                Cases::DAT => $prefix.'е',
84
                Cases::VINIT => $prefix.'у',
85
                Cases::TVORIT => $prefix.'ой',
86
                Cases::PREDLOJ => $prefix.'е',
87
            );
88
        }
89
90
        // inflect other middle names (foreign) as first names
91
        return FirstNamesInflection::getCases($name, $gender);

src/Russian/FirstNamesInflection.php 1 location

@@ 200-210 (lines=11) @@
197
                    self::TVORIT => $prefix.'ей',
198
                    self::PREDLOJ => $prefix.'и',
199
                ];
200
            } elseif (S::slice($name, -1) == 'я') {
201
                $prefix = S::name(S::slice($name, 0, -1));
202
                return [
203
                    self::IMENIT => $prefix.'я',
204
                    self::RODIT => $prefix.'и',
205
                    self::DAT => $prefix.'е',
206
                    self::VINIT => $prefix.'ю',
207
                    self::TVORIT => $prefix.'ей',
208
                    self::PREDLOJ => $prefix.'е',
209
                ];
210
            }
211
212
            if (!in_array($name, self::$immutableNames, true)) {
213
                if ($gender === null) {