src/Russian/NounDeclension.php
public static function declinateAdjective($word, $animateness)
    {
        $prefix = S::slice($word, 0, -2);

        switch (S::slice($word, -2)) {
            // Male adjectives
            case 'ой':
            case 'ый':
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'ого',
                    Cases::DAT => $prefix.'ому',
                    Cases::VINIT => $word,
                    Cases::TVORIT => $prefix.'ым',
                    Cases::PREDLOJ => $prefix.'ом',
                ];

            case 'ий':
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'его',
                    Cases::DAT => $prefix.'ему',
                    Cases::VINIT => $prefix.'его',
                    Cases::TVORIT => $prefix.'им',
                    Cases::PREDLOJ => $prefix.'ем',
                ];

            // Neuter adjectives
            case 'ое':
            case 'ее':
                $prefix = S::slice($word, 0, -1);
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'го',
                    Cases::DAT => $prefix.'му',
                    Cases::VINIT => $word,
                    Cases::TVORIT => S::slice($word, 0, -2).(S::slice($word, -2, -1) == 'о' ? 'ы' : 'и').'м',
                    Cases::PREDLOJ => $prefix.'м',
                ];

            // Female adjectives
            case 'ая':
                $ending = static::isHissingConsonant(S::slice($prefix, -1)) ? 'ей' : 'ой';
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.$ending,
                    Cases::DAT => $prefix.$ending,
                    Cases::VINIT => $prefix.'ую',
                    Cases::TVORIT => $prefix.$ending,
                    Cases::PREDLOJ => $prefix.$ending,
                ];
        }
    }
public static function declinateAdjective($word, $animateness)
    {
        $prefix = S::slice($word, 0, -2);

        switch (S::slice($word, -2)) {
            // Male adjectives
            case 'ой':
            case 'ый':
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'ого',
                    Cases::DAT => $prefix.'ому',
                    Cases::VINIT => $word,
                    Cases::TVORIT => $prefix.'ым',
                    Cases::PREDLOJ => $prefix.'ом',
                ];

            case 'ий':
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'его',
                    Cases::DAT => $prefix.'ему',
                    Cases::VINIT => $prefix.'его',
                    Cases::TVORIT => $prefix.'им',
                    Cases::PREDLOJ => $prefix.'ем',
                ];

            // Neuter adjectives
            case 'ое':
            case 'ее':
                $prefix = S::slice($word, 0, -1);
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.'го',
                    Cases::DAT => $prefix.'му',
                    Cases::VINIT => $word,
                    Cases::TVORIT => S::slice($word, 0, -2).(S::slice($word, -2, -1) == 'о' ? 'ы' : 'и').'м',
                    Cases::PREDLOJ => $prefix.'м',
                ];

            // Female adjectives
            case 'ая':
                $ending = static::isHissingConsonant(S::slice($prefix, -1)) ? 'ей' : 'ой';
                return [
                    Cases::IMENIT => $word,
                    Cases::RODIT => $prefix.$ending,
                    Cases::DAT => $prefix.$ending,
                    Cases::VINIT => $prefix.'ую',
                    Cases::TVORIT => $prefix.$ending,
                    Cases::PREDLOJ => $prefix.$ending,
                ];
        }
    }
Склонение существительных, образованных от прилагательных и причастий.
Rules are from http://rusgram.narod.ru/1216-1231.html
@param $word
@param $animateness
@return array