|
@@ 212-216 (lines=5) @@
|
| 209 |
|
*/ |
| 210 |
|
public static function choosePrepositionByFirstLetter($word, $prepositionWithVowel, $preposition) |
| 211 |
|
{ |
| 212 |
|
if (in_array(S::lower(S::slice($word, 0, 1)), ['а', 'о', 'и', 'у', 'э'], true)) { |
| 213 |
|
return $prepositionWithVowel; |
| 214 |
|
} else { |
| 215 |
|
return $preposition; |
| 216 |
|
} |
| 217 |
|
} |
| 218 |
|
|
| 219 |
|
/** |
|
@@ 297-298 (lines=2) @@
|
| 294 |
|
if (static::isVowel(S::slice($normalized, 0, 1)) && !in_array(S::slice($normalized, 0, 1), ['е', 'ё', 'ю', 'я'], true)) |
| 295 |
|
return 'об '.$word; |
| 296 |
|
|
| 297 |
|
if (in_array(S::slice($normalized, 0, 3), ['все', 'всё', 'всю', 'что', 'мне'], true)) |
| 298 |
|
return 'обо '.$word; |
| 299 |
|
|
| 300 |
|
return 'о '.$word; |
| 301 |
|
} |