Conditions | 8 |
Paths | 6 |
Total Lines | 14 |
Code Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
5 | public function pluralize($word, $count, $animateness = false) { |
||
6 | static $plu; |
||
7 | if ($plu === null) |
||
8 | $plu = new GeneralDeclension(); |
||
9 | $ending = $count % 10; |
||
10 | if (($count > 20 && $ending == 1) || $count == 1) { |
||
11 | return $word; |
||
12 | } else if (($count > 20 && in_array($ending, range(2, 4))) || in_array($count, range(2, 4))) { |
||
13 | return $plu->getForm($word, $animateness, self::RODIT_2); |
||
14 | } else { |
||
15 | $forms = $plu->pluralizeAllDeclensions($word, $animateness); |
||
16 | return $forms[self::RODIT_2]; |
||
17 | } |
||
18 | } |
||
19 | } |
||
20 |