Code Duplication    Length = 2-6 lines in 4 locations

src/Russian/MiddleNamesInflection.php 1 location

@@ 28-29 (lines=2) @@
25
    public static function isMutable($name, $gender = null)
26
    {
27
        $name = S::lower($name);
28
        if (in_array(S::slice($name, -2), array('ич', 'на'))) {
29
            return true;
30
        }
31
        // if foreign, try it as a name
32
        return FirstNamesInflection::isMutable($name, $gender);

src/Russian/LastNamesInflection.php 2 locations

@@ 31-32 (lines=2) @@
28
            return false;
29
        }
30
31
        if (in_array(S::slice($name, -1), array('а', 'я'))) {
32
            return true;
33
        }
34
35
        if ($gender == self::MALE) {
@@ 60-65 (lines=6) @@
57
                return true;
58
            }
59
60
        } else {
61
            // Типичные суффиксы женских фамилий
62
            if (in_array(S::slice($name, -2), ['ва', 'на', 'ая'])) {
63
                return true;
64
            }
65
        }
66
67
        return false;
68
    }

src/Russian/NounPluralization.php 1 location

@@ 172-174 (lines=3) @@
169
            $prefix = NounDeclension::getPrefixOfSecondDeclension($word, $last);
170
        } elseif ($declension == NounDeclension::FIRST_DECLENSION) {
171
            $soft_last = self::checkLastConsonantSoftness($word);
172
        } else {
173
            $soft_last = in_array(S::slice($word, -2), ['чь', 'сь', 'ть', 'нь']);
174
        }
175
176
        $forms = array();
177