|
@@ 168-172 (lines=5) @@
|
| 165 |
|
*/ |
| 166 |
|
public static function choosePrepositionByFirstLetter($word, $prepositionWithVowel, $preposition) |
| 167 |
|
{ |
| 168 |
|
if (in_array(S::lower(S::slice($word, 0, 1)), ['а', 'о', 'и', 'у', 'э'], true)) { |
| 169 |
|
return $prepositionWithVowel; |
| 170 |
|
} else { |
| 171 |
|
return $preposition; |
| 172 |
|
} |
| 173 |
|
} |
| 174 |
|
|
| 175 |
|
/** |
|
@@ 241-242 (lines=2) @@
|
| 238 |
|
if (static::isVowel(S::slice($normalized, 0, 1)) && !in_array(S::slice($normalized, 0, 1), ['е', 'ё', 'ю', 'я'], true)) |
| 239 |
|
return 'об '.$word; |
| 240 |
|
|
| 241 |
|
if (in_array(S::slice($normalized, 0, 3), ['все', 'всё', 'всю', 'что', 'мне'], true)) |
| 242 |
|
return 'обо '.$word; |
| 243 |
|
|
| 244 |
|
return 'о '.$word; |
| 245 |
|
} |