@@ 154-187 (lines=34) @@ | ||
151 | * |
|
152 | * @return array |
|
153 | */ |
|
154 | protected static function declinateHardAdjective($adjective, $animateness, $gender, |
|
155 | $afterConsonantVowel) |
|
156 | { |
|
157 | switch ($gender) |
|
158 | { |
|
159 | case static::MALE: |
|
160 | $postfix = $afterConsonantVowel.'й'; |
|
161 | break; |
|
162 | ||
163 | case static::FEMALE: |
|
164 | $postfix = $afterConsonantVowel.'я'; |
|
165 | break; |
|
166 | ||
167 | case static::NEUTER: |
|
168 | $postfix = $afterConsonantVowel.'е'; |
|
169 | break; |
|
170 | } |
|
171 | ||
172 | $cases = [ |
|
173 | static::IMENIT => $adjective.$postfix, |
|
174 | static::RODIT => $adjective.'о'.($gender !== static::FEMALE ? 'го' : 'й'), |
|
175 | static::DAT => $adjective.'о'.($gender !== static::FEMALE ? 'му' : 'й'), |
|
176 | ]; |
|
177 | ||
178 | if ($gender !== static::FEMALE) |
|
179 | $cases[static::VINIT] = static::getVinitCaseByAnimateness($cases, $animateness); |
|
180 | else |
|
181 | $cases[static::VINIT] = $adjective.'ую'; |
|
182 | ||
183 | $cases[static::TVORIT] = $adjective.($gender !== static::FEMALE ? 'ым' : 'ой'); |
|
184 | $cases[static::PREDLOJ] = $adjective.($gender !== static::FEMALE ? 'ом' : 'ой'); |
|
185 | ||
186 | return $cases; |
|
187 | } |
|
188 | ||
189 | /** |
|
190 | * @param string $adjective |
|
@@ 199-231 (lines=33) @@ | ||
196 | * |
|
197 | * @return array |
|
198 | */ |
|
199 | protected static function declinateSoftAdjective($adjective, $animateness, $gender, $afterConsonantVowel) |
|
200 | { |
|
201 | switch ($gender) |
|
202 | { |
|
203 | case static::MALE: |
|
204 | $postfix = $afterConsonantVowel.'й'; |
|
205 | break; |
|
206 | ||
207 | case static::FEMALE: |
|
208 | $postfix = $afterConsonantVowel.'я'; |
|
209 | break; |
|
210 | ||
211 | case static::NEUTER: |
|
212 | $postfix = $afterConsonantVowel.'е'; |
|
213 | break; |
|
214 | } |
|
215 | ||
216 | $cases = [ |
|
217 | static::IMENIT => $adjective.$postfix, |
|
218 | static::RODIT => $adjective.'е'.($gender !== static::FEMALE ? 'го' : 'й'), |
|
219 | static::DAT => $adjective.'е'.($gender !== static::FEMALE ? 'му' : 'й'), |
|
220 | ]; |
|
221 | ||
222 | if ($gender !== static::FEMALE) |
|
223 | $cases[static::VINIT] = static::getVinitCaseByAnimateness($cases, $animateness); |
|
224 | else |
|
225 | $cases[static::VINIT] = $adjective.'юю'; |
|
226 | ||
227 | $cases[static::TVORIT] = $adjective.($gender !== static::FEMALE ? 'им' : 'ей'); |
|
228 | $cases[static::PREDLOJ] = $adjective.($gender !== static::FEMALE ? 'ем' : 'ей'); |
|
229 | ||
230 | return $cases; |
|
231 | } |
|
232 | ||
233 | /** |
|
234 | * @param string $adjective |