|
@@ 225-229 (lines=5) @@
|
| 222 |
|
*/ |
| 223 |
|
public static function choosePrepositionByFirstLetter($word, $prepositionWithVowel, $preposition) |
| 224 |
|
{ |
| 225 |
|
if (in_array(S::lower(S::slice($word, 0, 1)), ['а', 'о', 'и', 'у', 'э'], true)) { |
| 226 |
|
return $prepositionWithVowel; |
| 227 |
|
} else { |
| 228 |
|
return $preposition; |
| 229 |
|
} |
| 230 |
|
} |
| 231 |
|
|
| 232 |
|
/** |
|
@@ 310-311 (lines=2) @@
|
| 307 |
|
if (static::isVowel(S::slice($normalized, 0, 1)) && !in_array(S::slice($normalized, 0, 1), ['е', 'ё', 'ю', 'я'], true)) |
| 308 |
|
return 'об '.$word; |
| 309 |
|
|
| 310 |
|
if (in_array(S::slice($normalized, 0, 3), ['все', 'всё', 'всю', 'что', 'мне'], true)) |
| 311 |
|
return 'обо '.$word; |
| 312 |
|
|
| 313 |
|
return 'о '.$word; |
| 314 |
|
} |