MenaraSolutions\Geographer\Services\Poliglottas\Russian::getPreposition PHP Метод

getPreposition() защищенный Метод

protected getPreposition ( $form, string $result = null ) : string
$form
$result string
Результат string
    protected function getPreposition($form, $result = null)
    {
        $preposition = $this->defaultPrepositions[$form];
        if ($result && $form == 'in' && in_array(mb_strtolower(mb_substr($result, 0, 1)), ['в', 'ф']) && !$this->isVowel(mb_substr($result, 1, 1))) {
            $preposition .= 'о';
        }
        return $preposition;
    }