diff --git a/src/Russian/RussianLanguage.php b/src/Russian/RussianLanguage.php index 30cdefe..0f5b3b4 100644 --- a/src/Russian/RussianLanguage.php +++ b/src/Russian/RussianLanguage.php @@ -120,7 +120,7 @@ protected static function isVelarConsonant($consonant) */ public static function countSyllables($string) { - return S::chars_count($string, self::$vowels); + return S::countChars($string, self::$vowels); } /** @@ -137,7 +137,7 @@ public static function isPaired($consonant) */ public static function checkLastConsonantSoftness($word) { - if (($substring = S::last_position_for_one_of_chars(S::lower($word), self::$consonants)) !== false) { + if (($substring = S::findLastPositionForOneOfChars(S::lower($word), self::$consonants)) !== false) { if (in_array(S::slice($substring, 0, 1), ['й', 'ч', 'щ'])) { // always soft consonants return true; } elseif (S::length($substring) > 1 && in_array(S::slice($substring, 1, 2), ['е', 'ё', 'и', 'ю', 'я', 'ь'])) { // consonants are soft if they are trailed with these vowels diff --git a/src/S.php b/src/S.php index 927181d..6f796af 100644 --- a/src/S.php +++ b/src/S.php @@ -9,7 +9,7 @@ class S /** * Sets encoding for using in morphos/* functions. */ - public static function set_encoding($encoding) + public static function setEncoding($encoding) { if (function_exists('mb_internal_encoding')) { mb_internal_encoding($encoding); @@ -93,7 +93,7 @@ public static function name($string) /** * multiple substr_count(). */ - public static function chars_count($string, array $chars) + public static function countChars($string, array $chars) { if (function_exists('mb_split')) { return count(mb_split('('.implode('|', $chars).')', $string)) - 1; @@ -102,7 +102,7 @@ public static function chars_count($string, array $chars) } } - public static function last_position_for_one_of_chars($string, array $chars) + public static function findLastPositionForOneOfChars($string, array $chars) { if (function_exists('mb_strrpos')) { $last_position = false; diff --git a/src/initialization.php b/src/initialization.php index 6847a50..ff21068 100644 --- a/src/initialization.php +++ b/src/initialization.php @@ -1,2 +1,2 @@