@@ -850,7 +850,7 @@ discard block |
||
850 | 850 | public static function add_bom_to_string($str) |
851 | 851 | { |
852 | 852 | if (self::string_has_bom($str) === false) { |
853 | - $str = self::bom() . $str; |
|
853 | + $str = self::bom().$str; |
|
854 | 854 | } |
855 | 855 | |
856 | 856 | return $str; |
@@ -975,7 +975,7 @@ discard block |
||
975 | 975 | |
976 | 976 | // use static cache, only if there is no support for "\IntlChar" |
977 | 977 | static $CHAR_CACHE = array(); |
978 | - $cacheKey = $code_point . $encoding; |
|
978 | + $cacheKey = $code_point.$encoding; |
|
979 | 979 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
980 | 980 | return $CHAR_CACHE[$cacheKey]; |
981 | 981 | } |
@@ -983,16 +983,16 @@ discard block |
||
983 | 983 | if (0x80 > $code_point %= 0x200000) { |
984 | 984 | $str = self::chr_and_parse_int($code_point); |
985 | 985 | } elseif (0x800 > $code_point) { |
986 | - $str = self::chr_and_parse_int(0xC0 | $code_point >> 6) . |
|
986 | + $str = self::chr_and_parse_int(0xC0 | $code_point >> 6). |
|
987 | 987 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
988 | 988 | } elseif (0x10000 > $code_point) { |
989 | - $str = self::chr_and_parse_int(0xE0 | $code_point >> 12) . |
|
990 | - self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) . |
|
989 | + $str = self::chr_and_parse_int(0xE0 | $code_point >> 12). |
|
990 | + self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F). |
|
991 | 991 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
992 | 992 | } else { |
993 | - $str = self::chr_and_parse_int(0xF0 | $code_point >> 18) . |
|
994 | - self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F) . |
|
995 | - self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) . |
|
993 | + $str = self::chr_and_parse_int(0xF0 | $code_point >> 18). |
|
994 | + self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F). |
|
995 | + self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F). |
|
996 | 996 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
997 | 997 | } |
998 | 998 | |
@@ -1052,7 +1052,7 @@ discard block |
||
1052 | 1052 | } |
1053 | 1053 | |
1054 | 1054 | return array_map( |
1055 | - function ($data) { |
|
1055 | + function($data) { |
|
1056 | 1056 | return UTF8::strlen($data, '8BIT'); |
1057 | 1057 | }, |
1058 | 1058 | self::split($str) |
@@ -1294,7 +1294,7 @@ discard block |
||
1294 | 1294 | $flags = ENT_QUOTES; |
1295 | 1295 | } |
1296 | 1296 | |
1297 | - return self::html_entity_decode('&#' . $int . ';', $flags); |
|
1297 | + return self::html_entity_decode('&#'.$int.';', $flags); |
|
1298 | 1298 | } |
1299 | 1299 | |
1300 | 1300 | /** |
@@ -1371,7 +1371,7 @@ discard block |
||
1371 | 1371 | && |
1372 | 1372 | self::$SUPPORT['mbstring'] === false |
1373 | 1373 | ) { |
1374 | - trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
1374 | + trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
1375 | 1375 | } |
1376 | 1376 | |
1377 | 1377 | $strEncoded = \mb_convert_encoding( |
@@ -1580,7 +1580,7 @@ discard block |
||
1580 | 1580 | ) { |
1581 | 1581 | // Prevent leading combining chars |
1582 | 1582 | // for NFC-safe concatenations. |
1583 | - $var = $leading_combining . $var; |
|
1583 | + $var = $leading_combining.$var; |
|
1584 | 1584 | } |
1585 | 1585 | } |
1586 | 1586 | |
@@ -2004,7 +2004,7 @@ discard block |
||
2004 | 2004 | */ |
2005 | 2005 | private static function getData($file) |
2006 | 2006 | { |
2007 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
2007 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
2008 | 2008 | if (file_exists($file)) { |
2009 | 2009 | /** @noinspection PhpIncludeInspection */ |
2010 | 2010 | return require $file; |
@@ -2149,7 +2149,7 @@ discard block |
||
2149 | 2149 | return implode( |
2150 | 2150 | '', |
2151 | 2151 | array_map( |
2152 | - function ($data) use ($keepAsciiChars, $encoding) { |
|
2152 | + function($data) use ($keepAsciiChars, $encoding) { |
|
2153 | 2153 | return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding); |
2154 | 2154 | }, |
2155 | 2155 | self::split($str) |
@@ -2268,7 +2268,7 @@ discard block |
||
2268 | 2268 | |
2269 | 2269 | $str = preg_replace_callback( |
2270 | 2270 | "/&#\d{2,6};/", |
2271 | - function ($matches) use ($encoding) { |
|
2271 | + function($matches) use ($encoding) { |
|
2272 | 2272 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2273 | 2273 | |
2274 | 2274 | if ($returnTmp !== '"' && $returnTmp !== "'") { |
@@ -2592,9 +2592,9 @@ discard block |
||
2592 | 2592 | if ((int)$int === $int) { |
2593 | 2593 | $hex = dechex($int); |
2594 | 2594 | |
2595 | - $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex); |
|
2595 | + $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex); |
|
2596 | 2596 | |
2597 | - return $pfix . $hex; |
|
2597 | + return $pfix.$hex; |
|
2598 | 2598 | } |
2599 | 2599 | |
2600 | 2600 | return ''; |
@@ -3335,7 +3335,7 @@ discard block |
||
3335 | 3335 | $cleanUtf8 |
3336 | 3336 | ); |
3337 | 3337 | |
3338 | - return $strPartOne . $strPartTwo; |
|
3338 | + return $strPartOne.$strPartTwo; |
|
3339 | 3339 | } |
3340 | 3340 | |
3341 | 3341 | /** |
@@ -3425,7 +3425,7 @@ discard block |
||
3425 | 3425 | return preg_replace('/^[\pZ\pC]+/u', '', $str); |
3426 | 3426 | } |
3427 | 3427 | |
3428 | - return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str); |
|
3428 | + return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str); |
|
3429 | 3429 | } |
3430 | 3430 | |
3431 | 3431 | /** |
@@ -3965,7 +3965,7 @@ discard block |
||
3965 | 3965 | if (is_array($what) === true) { |
3966 | 3966 | /** @noinspection ForeachSourceInspection */ |
3967 | 3967 | foreach ($what as $item) { |
3968 | - $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str); |
|
3968 | + $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str); |
|
3969 | 3969 | } |
3970 | 3970 | } |
3971 | 3971 | |
@@ -4078,7 +4078,7 @@ discard block |
||
4078 | 4078 | return preg_replace('/[\pZ\pC]+$/u', '', $str); |
4079 | 4079 | } |
4080 | 4080 | |
4081 | - return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str); |
|
4081 | + return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str); |
|
4082 | 4082 | } |
4083 | 4083 | |
4084 | 4084 | /** |
@@ -4093,7 +4093,7 @@ discard block |
||
4093 | 4093 | { |
4094 | 4094 | static $RX_CLASSS_CACHE = array(); |
4095 | 4095 | |
4096 | - $cacheKey = $s . $class; |
|
4096 | + $cacheKey = $s.$class; |
|
4097 | 4097 | |
4098 | 4098 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4099 | 4099 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4105,7 +4105,7 @@ discard block |
||
4105 | 4105 | /** @noinspection SuspiciousLoopInspection */ |
4106 | 4106 | foreach (self::str_split($s) as $s) { |
4107 | 4107 | if ('-' === $s) { |
4108 | - $class[0] = '-' . $class[0]; |
|
4108 | + $class[0] = '-'.$class[0]; |
|
4109 | 4109 | } elseif (!isset($s[2])) { |
4110 | 4110 | $class[0] .= preg_quote($s, '/'); |
4111 | 4111 | } elseif (1 === self::strlen($s)) { |
@@ -4116,13 +4116,13 @@ discard block |
||
4116 | 4116 | } |
4117 | 4117 | |
4118 | 4118 | if ($class[0]) { |
4119 | - $class[0] = '[' . $class[0] . ']'; |
|
4119 | + $class[0] = '['.$class[0].']'; |
|
4120 | 4120 | } |
4121 | 4121 | |
4122 | 4122 | if (1 === count($class)) { |
4123 | 4123 | $return = $class[0]; |
4124 | 4124 | } else { |
4125 | - $return = '(?:' . implode('|', $class) . ')'; |
|
4125 | + $return = '(?:'.implode('|', $class).')'; |
|
4126 | 4126 | } |
4127 | 4127 | |
4128 | 4128 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4140,7 +4140,7 @@ discard block |
||
4140 | 4140 | } |
4141 | 4141 | |
4142 | 4142 | foreach (self::$SUPPORT as $utf8Support) { |
4143 | - echo $utf8Support . "\n<br>"; |
|
4143 | + echo $utf8Support."\n<br>"; |
|
4144 | 4144 | } |
4145 | 4145 | } |
4146 | 4146 | |
@@ -4174,7 +4174,7 @@ discard block |
||
4174 | 4174 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4175 | 4175 | } |
4176 | 4176 | |
4177 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4177 | + return '&#'.self::ord($char, $encoding).';'; |
|
4178 | 4178 | } |
4179 | 4179 | |
4180 | 4180 | /** |
@@ -4241,7 +4241,7 @@ discard block |
||
4241 | 4241 | ) { |
4242 | 4242 | |
4243 | 4243 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4244 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4244 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4245 | 4245 | |
4246 | 4246 | $i++; |
4247 | 4247 | } |
@@ -4257,7 +4257,7 @@ discard block |
||
4257 | 4257 | && |
4258 | 4258 | ($str[$i + 2] & "\xC0") === "\x80" |
4259 | 4259 | ) { |
4260 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4260 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4261 | 4261 | |
4262 | 4262 | $i += 2; |
4263 | 4263 | } |
@@ -4275,7 +4275,7 @@ discard block |
||
4275 | 4275 | && |
4276 | 4276 | ($str[$i + 3] & "\xC0") === "\x80" |
4277 | 4277 | ) { |
4278 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4278 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4279 | 4279 | |
4280 | 4280 | $i += 3; |
4281 | 4281 | } |
@@ -4288,7 +4288,7 @@ discard block |
||
4288 | 4288 | $ret = array_chunk($ret, $length); |
4289 | 4289 | |
4290 | 4290 | return array_map( |
4291 | - function ($item) { |
|
4291 | + function($item) { |
|
4292 | 4292 | return implode('', $item); |
4293 | 4293 | }, $ret |
4294 | 4294 | ); |
@@ -4395,7 +4395,7 @@ discard block |
||
4395 | 4395 | foreach (self::$ICONV_ENCODING as $encodingTmp) { |
4396 | 4396 | # INFO: //IGNORE and //TRANSLIT still throw notice |
4397 | 4397 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
4398 | - if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) { |
|
4398 | + if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) { |
|
4399 | 4399 | return $encodingTmp; |
4400 | 4400 | } |
4401 | 4401 | } |
@@ -4490,7 +4490,7 @@ discard block |
||
4490 | 4490 | if ('' === $s .= '') { |
4491 | 4491 | $s = '/^(?<=.)$/'; |
4492 | 4492 | } else { |
4493 | - $s = '/' . preg_quote($s, '/') . '/ui'; |
|
4493 | + $s = '/'.preg_quote($s, '/').'/ui'; |
|
4494 | 4494 | } |
4495 | 4495 | } |
4496 | 4496 | |
@@ -4548,7 +4548,7 @@ discard block |
||
4548 | 4548 | } |
4549 | 4549 | |
4550 | 4550 | if (self::substr($str, $length - 1, 1) === ' ') { |
4551 | - return (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4551 | + return (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4552 | 4552 | } |
4553 | 4553 | |
4554 | 4554 | $str = (string)self::substr($str, 0, $length); |
@@ -4557,9 +4557,9 @@ discard block |
||
4557 | 4557 | $new_str = implode(' ', $array); |
4558 | 4558 | |
4559 | 4559 | if ($new_str === '') { |
4560 | - $str = (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4560 | + $str = (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4561 | 4561 | } else { |
4562 | - $str = $new_str . $strAddOn; |
|
4562 | + $str = $new_str.$strAddOn; |
|
4563 | 4563 | } |
4564 | 4564 | |
4565 | 4565 | return $str; |
@@ -4614,7 +4614,7 @@ discard block |
||
4614 | 4614 | $pre = ''; |
4615 | 4615 | } |
4616 | 4616 | |
4617 | - return $pre . $str . $post; |
|
4617 | + return $pre.$str.$post; |
|
4618 | 4618 | } |
4619 | 4619 | |
4620 | 4620 | return $str; |
@@ -4764,7 +4764,7 @@ discard block |
||
4764 | 4764 | } |
4765 | 4765 | |
4766 | 4766 | /** @noinspection PhpInternalEntityUsedInspection */ |
4767 | - preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a); |
|
4767 | + preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a); |
|
4768 | 4768 | $a = $a[0]; |
4769 | 4769 | |
4770 | 4770 | if ($len === 1) { |
@@ -5001,7 +5001,7 @@ discard block |
||
5001 | 5001 | public static function strcmp($str1, $str2) |
5002 | 5002 | { |
5003 | 5003 | /** @noinspection PhpUndefinedClassInspection */ |
5004 | - return $str1 . '' === $str2 . '' ? 0 : strcmp( |
|
5004 | + return $str1.'' === $str2.'' ? 0 : strcmp( |
|
5005 | 5005 | \Normalizer::normalize($str1, \Normalizer::NFD), |
5006 | 5006 | \Normalizer::normalize($str2, \Normalizer::NFD) |
5007 | 5007 | ); |
@@ -5036,7 +5036,7 @@ discard block |
||
5036 | 5036 | return null; |
5037 | 5037 | } |
5038 | 5038 | |
5039 | - if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
5039 | + if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
5040 | 5040 | /** @noinspection OffsetOperationsInspection */ |
5041 | 5041 | return self::strlen($length[1]); |
5042 | 5042 | } |
@@ -5251,7 +5251,7 @@ discard block |
||
5251 | 5251 | && |
5252 | 5252 | self::$SUPPORT['mbstring'] === false |
5253 | 5253 | ) { |
5254 | - trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5254 | + trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5255 | 5255 | } |
5256 | 5256 | |
5257 | 5257 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5268,7 +5268,7 @@ discard block |
||
5268 | 5268 | return \grapheme_stristr($haystack, $needle, $before_needle); |
5269 | 5269 | } |
5270 | 5270 | |
5271 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
5271 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match); |
|
5272 | 5272 | |
5273 | 5273 | if (!isset($match[1])) { |
5274 | 5274 | return false; |
@@ -5342,7 +5342,7 @@ discard block |
||
5342 | 5342 | && |
5343 | 5343 | self::$SUPPORT['iconv'] === false |
5344 | 5344 | ) { |
5345 | - trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5345 | + trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5346 | 5346 | } |
5347 | 5347 | |
5348 | 5348 | if ( |
@@ -5417,7 +5417,7 @@ discard block |
||
5417 | 5417 | */ |
5418 | 5418 | public static function strnatcmp($str1, $str2) |
5419 | 5419 | { |
5420 | - return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5420 | + return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5421 | 5421 | } |
5422 | 5422 | |
5423 | 5423 | /** |
@@ -5478,7 +5478,7 @@ discard block |
||
5478 | 5478 | return false; |
5479 | 5479 | } |
5480 | 5480 | |
5481 | - if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
5481 | + if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
5482 | 5482 | return substr($haystack, strpos($haystack, $m[0])); |
5483 | 5483 | } |
5484 | 5484 | |
@@ -5555,7 +5555,7 @@ discard block |
||
5555 | 5555 | && |
5556 | 5556 | self::$SUPPORT['mbstring'] === false |
5557 | 5557 | ) { |
5558 | - trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5558 | + trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5559 | 5559 | } |
5560 | 5560 | |
5561 | 5561 | if ( |
@@ -5778,7 +5778,7 @@ discard block |
||
5778 | 5778 | && |
5779 | 5779 | self::$SUPPORT['mbstring'] === false |
5780 | 5780 | ) { |
5781 | - trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5781 | + trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5782 | 5782 | } |
5783 | 5783 | |
5784 | 5784 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5861,7 +5861,7 @@ discard block |
||
5861 | 5861 | && |
5862 | 5862 | self::$SUPPORT['mbstring'] === false |
5863 | 5863 | ) { |
5864 | - trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5864 | + trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5865 | 5865 | } |
5866 | 5866 | |
5867 | 5867 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5929,7 +5929,7 @@ discard block |
||
5929 | 5929 | return 0; |
5930 | 5930 | } |
5931 | 5931 | |
5932 | - return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5932 | + return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5933 | 5933 | } |
5934 | 5934 | |
5935 | 5935 | /** |
@@ -5975,7 +5975,7 @@ discard block |
||
5975 | 5975 | && |
5976 | 5976 | self::$SUPPORT['mbstring'] === false |
5977 | 5977 | ) { |
5978 | - trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5978 | + trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5979 | 5979 | } |
5980 | 5980 | |
5981 | 5981 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5992,7 +5992,7 @@ discard block |
||
5992 | 5992 | return \grapheme_strstr($haystack, $needle, $before_needle); |
5993 | 5993 | } |
5994 | 5994 | |
5995 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match); |
|
5995 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match); |
|
5996 | 5996 | |
5997 | 5997 | if (!isset($match[1])) { |
5998 | 5998 | return false; |
@@ -6099,9 +6099,9 @@ discard block |
||
6099 | 6099 | Bootup::is_php('5.4') === true |
6100 | 6100 | ) { |
6101 | 6101 | |
6102 | - $langCode = $lang . '-Lower'; |
|
6102 | + $langCode = $lang.'-Lower'; |
|
6103 | 6103 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6104 | - trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6104 | + trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING); |
|
6105 | 6105 | |
6106 | 6106 | $langCode = 'Any-Lower'; |
6107 | 6107 | } |
@@ -6109,7 +6109,7 @@ discard block |
||
6109 | 6109 | return transliterator_transliterate($langCode, $str); |
6110 | 6110 | } |
6111 | 6111 | |
6112 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6112 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6113 | 6113 | } |
6114 | 6114 | |
6115 | 6115 | return \mb_strtolower($str, $encoding); |
@@ -6169,9 +6169,9 @@ discard block |
||
6169 | 6169 | Bootup::is_php('5.4') === true |
6170 | 6170 | ) { |
6171 | 6171 | |
6172 | - $langCode = $lang . '-Upper'; |
|
6172 | + $langCode = $lang.'-Upper'; |
|
6173 | 6173 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6174 | - trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6174 | + trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
6175 | 6175 | |
6176 | 6176 | $langCode = 'Any-Upper'; |
6177 | 6177 | } |
@@ -6179,7 +6179,7 @@ discard block |
||
6179 | 6179 | return transliterator_transliterate($langCode, $str); |
6180 | 6180 | } |
6181 | 6181 | |
6182 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6182 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6183 | 6183 | } |
6184 | 6184 | |
6185 | 6185 | return \mb_strtoupper($str, $encoding); |
@@ -6284,7 +6284,7 @@ discard block |
||
6284 | 6284 | |
6285 | 6285 | $return = array(); |
6286 | 6286 | foreach ($array as $key => $value) { |
6287 | - if ($case === CASE_LOWER) { |
|
6287 | + if ($case === CASE_LOWER) { |
|
6288 | 6288 | $key = self::strtolower($key); |
6289 | 6289 | } else { |
6290 | 6290 | $key = self::strtoupper($key); |
@@ -6368,7 +6368,7 @@ discard block |
||
6368 | 6368 | && |
6369 | 6369 | self::$SUPPORT['mbstring'] === false |
6370 | 6370 | ) { |
6371 | - trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6371 | + trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6372 | 6372 | } |
6373 | 6373 | |
6374 | 6374 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6525,14 +6525,14 @@ discard block |
||
6525 | 6525 | && |
6526 | 6526 | self::$SUPPORT['mbstring'] === false |
6527 | 6527 | ) { |
6528 | - trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6528 | + trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6529 | 6529 | } |
6530 | 6530 | |
6531 | 6531 | if (self::$SUPPORT['mbstring'] === true) { |
6532 | 6532 | return \mb_substr_count($haystack, $needle, $encoding); |
6533 | 6533 | } |
6534 | 6534 | |
6535 | - preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
6535 | + preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
6536 | 6536 | |
6537 | 6537 | return count($matches); |
6538 | 6538 | } |
@@ -6794,7 +6794,7 @@ discard block |
||
6794 | 6794 | |
6795 | 6795 | $strSwappedCase = preg_replace_callback( |
6796 | 6796 | '/[\S]/u', |
6797 | - function ($match) use ($encoding) { |
|
6797 | + function($match) use ($encoding) { |
|
6798 | 6798 | $marchToUpper = UTF8::strtoupper($match[0], $encoding); |
6799 | 6799 | |
6800 | 6800 | if ($match[0] === $marchToUpper) { |
@@ -7133,13 +7133,13 @@ discard block |
||
7133 | 7133 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
7134 | 7134 | |
7135 | 7135 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7136 | - $buf .= $c1 . $c2; |
|
7136 | + $buf .= $c1.$c2; |
|
7137 | 7137 | $i++; |
7138 | 7138 | } else { // not valid UTF8 - convert it |
7139 | 7139 | $cc1tmp = ord($c1) / 64; |
7140 | 7140 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7141 | 7141 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7142 | - $buf .= $cc1 . $cc2; |
|
7142 | + $buf .= $cc1.$cc2; |
|
7143 | 7143 | } |
7144 | 7144 | |
7145 | 7145 | } elseif ($c1 >= "\xE0" && $c1 <= "\xEF") { // looks like 3 bytes UTF8 |
@@ -7148,13 +7148,13 @@ discard block |
||
7148 | 7148 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
7149 | 7149 | |
7150 | 7150 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7151 | - $buf .= $c1 . $c2 . $c3; |
|
7151 | + $buf .= $c1.$c2.$c3; |
|
7152 | 7152 | $i += 2; |
7153 | 7153 | } else { // not valid UTF8 - convert it |
7154 | 7154 | $cc1tmp = ord($c1) / 64; |
7155 | 7155 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7156 | 7156 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7157 | - $buf .= $cc1 . $cc2; |
|
7157 | + $buf .= $cc1.$cc2; |
|
7158 | 7158 | } |
7159 | 7159 | |
7160 | 7160 | } elseif ($c1 >= "\xF0" && $c1 <= "\xF7") { // looks like 4 bytes UTF8 |
@@ -7164,20 +7164,20 @@ discard block |
||
7164 | 7164 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
7165 | 7165 | |
7166 | 7166 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7167 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
7167 | + $buf .= $c1.$c2.$c3.$c4; |
|
7168 | 7168 | $i += 3; |
7169 | 7169 | } else { // not valid UTF8 - convert it |
7170 | 7170 | $cc1tmp = ord($c1) / 64; |
7171 | 7171 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7172 | 7172 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7173 | - $buf .= $cc1 . $cc2; |
|
7173 | + $buf .= $cc1.$cc2; |
|
7174 | 7174 | } |
7175 | 7175 | |
7176 | 7176 | } else { // doesn't look like UTF8, but should be converted |
7177 | 7177 | $cc1tmp = ord($c1) / 64; |
7178 | 7178 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7179 | 7179 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7180 | - $buf .= $cc1 . $cc2; |
|
7180 | + $buf .= $cc1.$cc2; |
|
7181 | 7181 | } |
7182 | 7182 | |
7183 | 7183 | } elseif (($c1 & "\xC0") === "\x80") { // needs conversion |
@@ -7188,7 +7188,7 @@ discard block |
||
7188 | 7188 | } else { |
7189 | 7189 | $cc1 = self::chr_and_parse_int($ordC1 / 64) | "\xC0"; |
7190 | 7190 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7191 | - $buf .= $cc1 . $cc2; |
|
7191 | + $buf .= $cc1.$cc2; |
|
7192 | 7192 | } |
7193 | 7193 | |
7194 | 7194 | } else { // it doesn't need conversion |
@@ -7199,7 +7199,7 @@ discard block |
||
7199 | 7199 | // decode unicode escape sequences |
7200 | 7200 | $buf = preg_replace_callback( |
7201 | 7201 | '/\\\\u([0-9a-f]{4})/i', |
7202 | - function ($match) { |
|
7202 | + function($match) { |
|
7203 | 7203 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
7204 | 7204 | }, |
7205 | 7205 | $buf |
@@ -7264,7 +7264,7 @@ discard block |
||
7264 | 7264 | $cleanUtf8 |
7265 | 7265 | ); |
7266 | 7266 | |
7267 | - return $strPartOne . $strPartTwo; |
|
7267 | + return $strPartOne.$strPartTwo; |
|
7268 | 7268 | } |
7269 | 7269 | |
7270 | 7270 | /** |
@@ -7775,7 +7775,7 @@ discard block |
||
7775 | 7775 | return ''; |
7776 | 7776 | } |
7777 | 7777 | |
7778 | - preg_match('/^\s*+(?:\S++\s*+){1,' . $words . '}/u', $str, $matches); |
|
7778 | + preg_match('/^\s*+(?:\S++\s*+){1,'.$words.'}/u', $str, $matches); |
|
7779 | 7779 | |
7780 | 7780 | if ( |
7781 | 7781 | !isset($matches[0]) |
@@ -7785,7 +7785,7 @@ discard block |
||
7785 | 7785 | return $str; |
7786 | 7786 | } |
7787 | 7787 | |
7788 | - return self::rtrim($matches[0]) . $strAddOn; |
|
7788 | + return self::rtrim($matches[0]).$strAddOn; |
|
7789 | 7789 | } |
7790 | 7790 | |
7791 | 7791 | /** |
@@ -7853,7 +7853,7 @@ discard block |
||
7853 | 7853 | $strReturn .= $break; |
7854 | 7854 | } |
7855 | 7855 | |
7856 | - return $strReturn . implode('', $chars); |
|
7856 | + return $strReturn.implode('', $chars); |
|
7857 | 7857 | } |
7858 | 7858 | |
7859 | 7859 | /** |