@@ -153,6 +153,9 @@ discard block |
||
153 | 153 | } |
154 | 154 | } |
155 | 155 | |
156 | + /** |
|
157 | + * @param string|false $word |
|
158 | + */ |
|
156 | 159 | public static function declinateFirstDeclension($word) |
157 | 160 | { |
158 | 161 | $word = S::lower($word); |
@@ -189,6 +192,9 @@ discard block |
||
189 | 192 | return $forms; |
190 | 193 | } |
191 | 194 | |
195 | + /** |
|
196 | + * @param string|false $word |
|
197 | + */ |
|
192 | 198 | public static function declinateSecondDeclension($word, $animateness = false) |
193 | 199 | { |
194 | 200 | $word = S::lower($word); |
@@ -234,6 +240,9 @@ discard block |
||
234 | 240 | return $forms; |
235 | 241 | } |
236 | 242 | |
243 | + /** |
|
244 | + * @param string|false $word |
|
245 | + */ |
|
237 | 246 | public static function declinateThirdDeclension($word) |
238 | 247 | { |
239 | 248 | $word = S::lower($word); |
@@ -250,6 +259,8 @@ discard block |
||
250 | 259 | |
251 | 260 | /** |
252 | 261 | * Rules are from http://rusgram.narod.ru/1216-1231.html |
262 | + * @param string|false $word |
|
263 | + * @param boolean $animateness |
|
253 | 264 | */ |
254 | 265 | public static function declinateAdjective($word, $animateness) |
255 | 266 | { |
@@ -312,6 +323,9 @@ discard block |
||
312 | 323 | return $forms[$case]; |
313 | 324 | } |
314 | 325 | |
326 | + /** |
|
327 | + * @param string|false $last |
|
328 | + */ |
|
315 | 329 | public static function getPrefixOfSecondDeclension($word, $last) |
316 | 330 | { |
317 | 331 | // слова с бегающей гласной в корне |
@@ -338,6 +352,10 @@ discard block |
||
338 | 352 | } |
339 | 353 | } |
340 | 354 | |
355 | + /** |
|
356 | + * @param string|false $word |
|
357 | + * @param string|false $last |
|
358 | + */ |
|
341 | 359 | public static function getPredCaseOf12Declensions($word, $last, $prefix) |
342 | 360 | { |
343 | 361 | if (in_array(S::slice($word, -2), array('ий', 'ие'))) { |
@@ -111,6 +111,10 @@ discard block |
||
111 | 111 | return self::declinateSubstative($word, $animateness); |
112 | 112 | } |
113 | 113 | |
114 | + /** |
|
115 | + * @param string|false $word |
|
116 | + * @param boolean $animateness |
|
117 | + */ |
|
114 | 118 | protected static function declinateSubstative($word, $animateness) |
115 | 119 | { |
116 | 120 | $prefix = S::slice($word, 0, -1); |
@@ -195,6 +199,8 @@ discard block |
||
195 | 199 | |
196 | 200 | /** |
197 | 201 | * Rules are from http://rusgram.narod.ru/1216-1231.html |
202 | + * @param string|false $word |
|
203 | + * @param boolean $animateness |
|
198 | 204 | */ |
199 | 205 | protected static function declinateAdjective($word, $animateness) |
200 | 206 | { |
@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | require dirname(dirname(__FILE__)).'/vendor/autoload.php'; |
3 | -use morphos\Gender; |
|
4 | -use morphos\Russian\CardinalNumeralGenerator; |
|
5 | -use morphos\Russian\Cases; |
|
6 | -use morphos\Russian\NounDeclension; |
|
7 | -use morphos\Russian\GeographicalNamesInflection; |
|
8 | -use morphos\Russian\NounPluralization; |
|
3 | +use morphos\Gender; |
|
4 | +use morphos\Russian\CardinalNumeralGenerator; |
|
5 | +use morphos\Russian\Cases; |
|
6 | +use morphos\Russian\NounDeclension; |
|
7 | +use morphos\Russian\GeographicalNamesInflection; |
|
8 | +use morphos\Russian\NounPluralization; |
|
9 | 9 | use morphos\Russian\OrdinalNumeralGenerator; |
10 | 10 | |
11 | 11 | function safe_string($string) { |