protected function getPredCaseOf12Declensions($word, $last, $prefix) { if (slice($word, -2) == 'ий') { if ($last == 'ё') { return $prefix . 'е'; } else { return $prefix . 'и'; } } else { return $prefix . 'е'; } }