@@ -482,7 +482,7 @@ function _trigram($text)
482
482
* @param array $arr array of trgram
483
483
* @return array ranks of trigrams
484
484
*/
485
- function _arr_rank (& $ arr )
485
+ function _arr_rank ($ arr )
486
486
{
487
487
488
488
// sorts alphabetically first as a standard way of breaking rank ties
@@ -950,7 +950,7 @@ function unicodeBlockName($unicode) {
950
950
// assume it is being passed a utf8 char, so convert it
951
951
952
952
// input check
953
- if ($ this -> utf8strlen ($ unicode ) > 1 ) {
953
+ if (self :: utf8strlen ($ unicode ) > 1 ) {
954
954
throw new Text_LanguageDetect_Exception (
955
955
'Pass this function only a single char ' ,
956
956
Text_LanguageDetect_Exception::PARAM_TYPE
@@ -1489,12 +1489,11 @@ function clusteredSearch($str)
1489
1489
*
1490
1490
* Returns the numbers of characters (not bytes) in a utf8 string
1491
1491
*
1492
- * @static
1493
1492
* @access public
1494
1493
* @param string $str string to get the length of
1495
1494
* @return int number of chars
1496
1495
*/
1497
- function utf8strlen ($ str )
1496
+ static function utf8strlen ($ str )
1498
1497
{
1499
1498
// utf8_decode() will convert unknown chars to '?', which is actually
1500
1499
// ideal for counting.
@@ -1565,12 +1564,12 @@ function _utf8char2unicode($char) {
1565
1564
* $counter will be incremeted by the number of bytes in the char.
1566
1565
*
1567
1566
* @access private
1568
- * @param string & $str the string being iterated over
1567
+ * @param string $str the string being iterated over
1569
1568
* @param int &$counter the iterator, will increment by reference
1570
1569
* @param bool $special_convert whether to do special conversions
1571
1570
* @return char the next (possibly multi-byte) char from $counter
1572
1571
*/
1573
- function _next_char(& $ str , &$ counter , $ special_convert = false )
1572
+ static function _next_char ($ str , &$ counter , $ special_convert = false )
1574
1573
{
1575
1574
1576
1575
$ char = $ str {$ counter ++};
0 commit comments