@@ -851,7 +851,7 @@ discard block |
||
851 | 851 | public static function add_bom_to_string($str) |
852 | 852 | { |
853 | 853 | if (self::string_has_bom($str) === false) { |
854 | - $str = self::bom() . $str; |
|
854 | + $str = self::bom().$str; |
|
855 | 855 | } |
856 | 856 | |
857 | 857 | return $str; |
@@ -976,7 +976,7 @@ discard block |
||
976 | 976 | |
977 | 977 | // use static cache, only if there is no support for "\IntlChar" |
978 | 978 | static $CHAR_CACHE = array(); |
979 | - $cacheKey = $code_point . $encoding; |
|
979 | + $cacheKey = $code_point.$encoding; |
|
980 | 980 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
981 | 981 | return $CHAR_CACHE[$cacheKey]; |
982 | 982 | } |
@@ -984,16 +984,16 @@ discard block |
||
984 | 984 | if (0x80 > $code_point %= 0x200000) { |
985 | 985 | $str = self::chr_and_parse_int($code_point); |
986 | 986 | } elseif (0x800 > $code_point) { |
987 | - $str = self::chr_and_parse_int(0xC0 | $code_point >> 6) . |
|
987 | + $str = self::chr_and_parse_int(0xC0 | $code_point >> 6). |
|
988 | 988 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
989 | 989 | } elseif (0x10000 > $code_point) { |
990 | - $str = self::chr_and_parse_int(0xE0 | $code_point >> 12) . |
|
991 | - self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) . |
|
990 | + $str = self::chr_and_parse_int(0xE0 | $code_point >> 12). |
|
991 | + self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F). |
|
992 | 992 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
993 | 993 | } else { |
994 | - $str = self::chr_and_parse_int(0xF0 | $code_point >> 18) . |
|
995 | - self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F) . |
|
996 | - self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F) . |
|
994 | + $str = self::chr_and_parse_int(0xF0 | $code_point >> 18). |
|
995 | + self::chr_and_parse_int(0x80 | $code_point >> 12 & 0x3F). |
|
996 | + self::chr_and_parse_int(0x80 | $code_point >> 6 & 0x3F). |
|
997 | 997 | self::chr_and_parse_int(0x80 | $code_point & 0x3F); |
998 | 998 | } |
999 | 999 | |
@@ -1053,7 +1053,7 @@ discard block |
||
1053 | 1053 | } |
1054 | 1054 | |
1055 | 1055 | return array_map( |
1056 | - function ($data) { |
|
1056 | + function($data) { |
|
1057 | 1057 | return UTF8::strlen($data, '8BIT'); |
1058 | 1058 | }, |
1059 | 1059 | self::split($str) |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | $flags = ENT_QUOTES; |
1296 | 1296 | } |
1297 | 1297 | |
1298 | - return self::html_entity_decode('&#' . $int . ';', $flags); |
|
1298 | + return self::html_entity_decode('&#'.$int.';', $flags); |
|
1299 | 1299 | } |
1300 | 1300 | |
1301 | 1301 | /** |
@@ -1372,7 +1372,7 @@ discard block |
||
1372 | 1372 | && |
1373 | 1373 | self::$SUPPORT['mbstring'] === false |
1374 | 1374 | ) { |
1375 | - trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
1375 | + trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
1376 | 1376 | } |
1377 | 1377 | |
1378 | 1378 | $strEncoded = \mb_convert_encoding( |
@@ -1581,7 +1581,7 @@ discard block |
||
1581 | 1581 | ) { |
1582 | 1582 | // Prevent leading combining chars |
1583 | 1583 | // for NFC-safe concatenations. |
1584 | - $var = $leading_combining . $var; |
|
1584 | + $var = $leading_combining.$var; |
|
1585 | 1585 | } |
1586 | 1586 | } |
1587 | 1587 | |
@@ -2005,7 +2005,7 @@ discard block |
||
2005 | 2005 | */ |
2006 | 2006 | private static function getData($file) |
2007 | 2007 | { |
2008 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
2008 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
2009 | 2009 | if (file_exists($file)) { |
2010 | 2010 | /** @noinspection PhpIncludeInspection */ |
2011 | 2011 | return require $file; |
@@ -2150,7 +2150,7 @@ discard block |
||
2150 | 2150 | return implode( |
2151 | 2151 | '', |
2152 | 2152 | array_map( |
2153 | - function ($data) use ($keepAsciiChars, $encoding) { |
|
2153 | + function($data) use ($keepAsciiChars, $encoding) { |
|
2154 | 2154 | return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding); |
2155 | 2155 | }, |
2156 | 2156 | self::split($str) |
@@ -2269,7 +2269,7 @@ discard block |
||
2269 | 2269 | |
2270 | 2270 | $str = preg_replace_callback( |
2271 | 2271 | "/&#\d{2,6};/", |
2272 | - function ($matches) use ($encoding) { |
|
2272 | + function($matches) use ($encoding) { |
|
2273 | 2273 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2274 | 2274 | |
2275 | 2275 | if ($returnTmp !== '"' && $returnTmp !== "'") { |
@@ -2593,9 +2593,9 @@ discard block |
||
2593 | 2593 | if ((int)$int === $int) { |
2594 | 2594 | $hex = dechex($int); |
2595 | 2595 | |
2596 | - $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex); |
|
2596 | + $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex); |
|
2597 | 2597 | |
2598 | - return $pfix . $hex; |
|
2598 | + return $pfix.$hex; |
|
2599 | 2599 | } |
2600 | 2600 | |
2601 | 2601 | return ''; |
@@ -3336,7 +3336,7 @@ discard block |
||
3336 | 3336 | $cleanUtf8 |
3337 | 3337 | ); |
3338 | 3338 | |
3339 | - return $strPartOne . $strPartTwo; |
|
3339 | + return $strPartOne.$strPartTwo; |
|
3340 | 3340 | } |
3341 | 3341 | |
3342 | 3342 | /** |
@@ -3426,7 +3426,7 @@ discard block |
||
3426 | 3426 | return preg_replace('/^[\pZ\pC]+/u', '', $str); |
3427 | 3427 | } |
3428 | 3428 | |
3429 | - return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str); |
|
3429 | + return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str); |
|
3430 | 3430 | } |
3431 | 3431 | |
3432 | 3432 | /** |
@@ -3963,7 +3963,7 @@ discard block |
||
3963 | 3963 | if (is_array($what) === true) { |
3964 | 3964 | /** @noinspection ForeachSourceInspection */ |
3965 | 3965 | foreach ($what as $item) { |
3966 | - $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str); |
|
3966 | + $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str); |
|
3967 | 3967 | } |
3968 | 3968 | } |
3969 | 3969 | |
@@ -4072,7 +4072,7 @@ discard block |
||
4072 | 4072 | return preg_replace('/[\pZ\pC]+$/u', '', $str); |
4073 | 4073 | } |
4074 | 4074 | |
4075 | - return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str); |
|
4075 | + return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str); |
|
4076 | 4076 | } |
4077 | 4077 | |
4078 | 4078 | /** |
@@ -4087,7 +4087,7 @@ discard block |
||
4087 | 4087 | { |
4088 | 4088 | static $RX_CLASSS_CACHE = array(); |
4089 | 4089 | |
4090 | - $cacheKey = $s . $class; |
|
4090 | + $cacheKey = $s.$class; |
|
4091 | 4091 | |
4092 | 4092 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4093 | 4093 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4099,7 +4099,7 @@ discard block |
||
4099 | 4099 | /** @noinspection SuspiciousLoopInspection */ |
4100 | 4100 | foreach (self::str_split($s) as $s) { |
4101 | 4101 | if ('-' === $s) { |
4102 | - $class[0] = '-' . $class[0]; |
|
4102 | + $class[0] = '-'.$class[0]; |
|
4103 | 4103 | } elseif (!isset($s[2])) { |
4104 | 4104 | $class[0] .= preg_quote($s, '/'); |
4105 | 4105 | } elseif (1 === self::strlen($s)) { |
@@ -4110,13 +4110,13 @@ discard block |
||
4110 | 4110 | } |
4111 | 4111 | |
4112 | 4112 | if ($class[0]) { |
4113 | - $class[0] = '[' . $class[0] . ']'; |
|
4113 | + $class[0] = '['.$class[0].']'; |
|
4114 | 4114 | } |
4115 | 4115 | |
4116 | 4116 | if (1 === count($class)) { |
4117 | 4117 | $return = $class[0]; |
4118 | 4118 | } else { |
4119 | - $return = '(?:' . implode('|', $class) . ')'; |
|
4119 | + $return = '(?:'.implode('|', $class).')'; |
|
4120 | 4120 | } |
4121 | 4121 | |
4122 | 4122 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4134,7 +4134,7 @@ discard block |
||
4134 | 4134 | } |
4135 | 4135 | |
4136 | 4136 | foreach (self::$SUPPORT as $utf8Support) { |
4137 | - echo $utf8Support . "\n<br>"; |
|
4137 | + echo $utf8Support."\n<br>"; |
|
4138 | 4138 | } |
4139 | 4139 | } |
4140 | 4140 | |
@@ -4167,7 +4167,7 @@ discard block |
||
4167 | 4167 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4168 | 4168 | } |
4169 | 4169 | |
4170 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4170 | + return '&#'.self::ord($char, $encoding).';'; |
|
4171 | 4171 | } |
4172 | 4172 | |
4173 | 4173 | /** |
@@ -4234,7 +4234,7 @@ discard block |
||
4234 | 4234 | ) { |
4235 | 4235 | |
4236 | 4236 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4237 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4237 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4238 | 4238 | |
4239 | 4239 | $i++; |
4240 | 4240 | } |
@@ -4250,7 +4250,7 @@ discard block |
||
4250 | 4250 | && |
4251 | 4251 | ($str[$i + 2] & "\xC0") === "\x80" |
4252 | 4252 | ) { |
4253 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4253 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4254 | 4254 | |
4255 | 4255 | $i += 2; |
4256 | 4256 | } |
@@ -4268,7 +4268,7 @@ discard block |
||
4268 | 4268 | && |
4269 | 4269 | ($str[$i + 3] & "\xC0") === "\x80" |
4270 | 4270 | ) { |
4271 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4271 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4272 | 4272 | |
4273 | 4273 | $i += 3; |
4274 | 4274 | } |
@@ -4281,7 +4281,7 @@ discard block |
||
4281 | 4281 | $ret = array_chunk($ret, $length); |
4282 | 4282 | |
4283 | 4283 | return array_map( |
4284 | - function ($item) { |
|
4284 | + function($item) { |
|
4285 | 4285 | return implode('', $item); |
4286 | 4286 | }, $ret |
4287 | 4287 | ); |
@@ -4388,7 +4388,7 @@ discard block |
||
4388 | 4388 | foreach (self::$ICONV_ENCODING as $encodingTmp) { |
4389 | 4389 | # INFO: //IGNORE and //TRANSLIT still throw notice |
4390 | 4390 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
4391 | - if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) { |
|
4391 | + if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) { |
|
4392 | 4392 | return $encodingTmp; |
4393 | 4393 | } |
4394 | 4394 | } |
@@ -4483,7 +4483,7 @@ discard block |
||
4483 | 4483 | if ('' === $s .= '') { |
4484 | 4484 | $s = '/^(?<=.)$/'; |
4485 | 4485 | } else { |
4486 | - $s = '/' . preg_quote($s, '/') . '/ui'; |
|
4486 | + $s = '/'.preg_quote($s, '/').'/ui'; |
|
4487 | 4487 | } |
4488 | 4488 | } |
4489 | 4489 | |
@@ -4541,7 +4541,7 @@ discard block |
||
4541 | 4541 | } |
4542 | 4542 | |
4543 | 4543 | if (self::substr($str, $length - 1, 1) === ' ') { |
4544 | - return (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4544 | + return (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4545 | 4545 | } |
4546 | 4546 | |
4547 | 4547 | $str = (string)self::substr($str, 0, $length); |
@@ -4550,9 +4550,9 @@ discard block |
||
4550 | 4550 | $new_str = implode(' ', $array); |
4551 | 4551 | |
4552 | 4552 | if ($new_str === '') { |
4553 | - $str = (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4553 | + $str = (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4554 | 4554 | } else { |
4555 | - $str = $new_str . $strAddOn; |
|
4555 | + $str = $new_str.$strAddOn; |
|
4556 | 4556 | } |
4557 | 4557 | |
4558 | 4558 | return $str; |
@@ -4607,7 +4607,7 @@ discard block |
||
4607 | 4607 | $pre = ''; |
4608 | 4608 | } |
4609 | 4609 | |
4610 | - return $pre . $str . $post; |
|
4610 | + return $pre.$str.$post; |
|
4611 | 4611 | } |
4612 | 4612 | |
4613 | 4613 | return $str; |
@@ -4757,7 +4757,7 @@ discard block |
||
4757 | 4757 | } |
4758 | 4758 | |
4759 | 4759 | /** @noinspection PhpInternalEntityUsedInspection */ |
4760 | - preg_match_all('/' . Grapheme::GRAPHEME_CLUSTER_RX . '/u', $str, $a); |
|
4760 | + preg_match_all('/'.Grapheme::GRAPHEME_CLUSTER_RX.'/u', $str, $a); |
|
4761 | 4761 | $a = $a[0]; |
4762 | 4762 | |
4763 | 4763 | if ($len === 1) { |
@@ -4993,7 +4993,7 @@ discard block |
||
4993 | 4993 | public static function strcmp($str1, $str2) |
4994 | 4994 | { |
4995 | 4995 | /** @noinspection PhpUndefinedClassInspection */ |
4996 | - return $str1 . '' === $str2 . '' ? 0 : strcmp( |
|
4996 | + return $str1.'' === $str2.'' ? 0 : strcmp( |
|
4997 | 4997 | \Normalizer::normalize($str1, \Normalizer::NFD), |
4998 | 4998 | \Normalizer::normalize($str2, \Normalizer::NFD) |
4999 | 4999 | ); |
@@ -5028,7 +5028,7 @@ discard block |
||
5028 | 5028 | return null; |
5029 | 5029 | } |
5030 | 5030 | |
5031 | - if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
5031 | + if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
5032 | 5032 | /** @noinspection OffsetOperationsInspection */ |
5033 | 5033 | return self::strlen($length[1]); |
5034 | 5034 | } |
@@ -5243,7 +5243,7 @@ discard block |
||
5243 | 5243 | && |
5244 | 5244 | self::$SUPPORT['mbstring'] === false |
5245 | 5245 | ) { |
5246 | - trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5246 | + trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5247 | 5247 | } |
5248 | 5248 | |
5249 | 5249 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5260,7 +5260,7 @@ discard block |
||
5260 | 5260 | return \grapheme_stristr($haystack, $needle, $before_needle); |
5261 | 5261 | } |
5262 | 5262 | |
5263 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
5263 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match); |
|
5264 | 5264 | |
5265 | 5265 | if (!isset($match[1])) { |
5266 | 5266 | return false; |
@@ -5334,7 +5334,7 @@ discard block |
||
5334 | 5334 | && |
5335 | 5335 | self::$SUPPORT['iconv'] === false |
5336 | 5336 | ) { |
5337 | - trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5337 | + trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5338 | 5338 | } |
5339 | 5339 | |
5340 | 5340 | if ( |
@@ -5409,7 +5409,7 @@ discard block |
||
5409 | 5409 | */ |
5410 | 5410 | public static function strnatcmp($str1, $str2) |
5411 | 5411 | { |
5412 | - return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5412 | + return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5413 | 5413 | } |
5414 | 5414 | |
5415 | 5415 | /** |
@@ -5470,7 +5470,7 @@ discard block |
||
5470 | 5470 | return false; |
5471 | 5471 | } |
5472 | 5472 | |
5473 | - if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
5473 | + if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
5474 | 5474 | return substr($haystack, strpos($haystack, $m[0])); |
5475 | 5475 | } |
5476 | 5476 | |
@@ -5547,7 +5547,7 @@ discard block |
||
5547 | 5547 | && |
5548 | 5548 | self::$SUPPORT['mbstring'] === false |
5549 | 5549 | ) { |
5550 | - trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5550 | + trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5551 | 5551 | } |
5552 | 5552 | |
5553 | 5553 | if ( |
@@ -5770,7 +5770,7 @@ discard block |
||
5770 | 5770 | && |
5771 | 5771 | self::$SUPPORT['mbstring'] === false |
5772 | 5772 | ) { |
5773 | - trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5773 | + trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5774 | 5774 | } |
5775 | 5775 | |
5776 | 5776 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5853,7 +5853,7 @@ discard block |
||
5853 | 5853 | && |
5854 | 5854 | self::$SUPPORT['mbstring'] === false |
5855 | 5855 | ) { |
5856 | - trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5856 | + trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5857 | 5857 | } |
5858 | 5858 | |
5859 | 5859 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5921,7 +5921,7 @@ discard block |
||
5921 | 5921 | return 0; |
5922 | 5922 | } |
5923 | 5923 | |
5924 | - return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5924 | + return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5925 | 5925 | } |
5926 | 5926 | |
5927 | 5927 | /** |
@@ -5967,7 +5967,7 @@ discard block |
||
5967 | 5967 | && |
5968 | 5968 | self::$SUPPORT['mbstring'] === false |
5969 | 5969 | ) { |
5970 | - trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5970 | + trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5971 | 5971 | } |
5972 | 5972 | |
5973 | 5973 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5984,7 +5984,7 @@ discard block |
||
5984 | 5984 | return \grapheme_strstr($haystack, $needle, $before_needle); |
5985 | 5985 | } |
5986 | 5986 | |
5987 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match); |
|
5987 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match); |
|
5988 | 5988 | |
5989 | 5989 | if (!isset($match[1])) { |
5990 | 5990 | return false; |
@@ -6091,9 +6091,9 @@ discard block |
||
6091 | 6091 | Bootup::is_php('5.4') === true |
6092 | 6092 | ) { |
6093 | 6093 | |
6094 | - $langCode = $lang . '-Lower'; |
|
6094 | + $langCode = $lang.'-Lower'; |
|
6095 | 6095 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6096 | - trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6096 | + trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING); |
|
6097 | 6097 | |
6098 | 6098 | $langCode = 'Any-Lower'; |
6099 | 6099 | } |
@@ -6101,7 +6101,7 @@ discard block |
||
6101 | 6101 | return transliterator_transliterate($langCode, $str); |
6102 | 6102 | } |
6103 | 6103 | |
6104 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6104 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6105 | 6105 | } |
6106 | 6106 | |
6107 | 6107 | return \mb_strtolower($str, $encoding); |
@@ -6161,9 +6161,9 @@ discard block |
||
6161 | 6161 | Bootup::is_php('5.4') === true |
6162 | 6162 | ) { |
6163 | 6163 | |
6164 | - $langCode = $lang . '-Upper'; |
|
6164 | + $langCode = $lang.'-Upper'; |
|
6165 | 6165 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6166 | - trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6166 | + trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
6167 | 6167 | |
6168 | 6168 | $langCode = 'Any-Upper'; |
6169 | 6169 | } |
@@ -6171,7 +6171,7 @@ discard block |
||
6171 | 6171 | return transliterator_transliterate($langCode, $str); |
6172 | 6172 | } |
6173 | 6173 | |
6174 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6174 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6175 | 6175 | } |
6176 | 6176 | |
6177 | 6177 | return \mb_strtoupper($str, $encoding); |
@@ -6276,7 +6276,7 @@ discard block |
||
6276 | 6276 | |
6277 | 6277 | $return = array(); |
6278 | 6278 | foreach ($array as $key => $value) { |
6279 | - if ($case === CASE_LOWER) { |
|
6279 | + if ($case === CASE_LOWER) { |
|
6280 | 6280 | $key = self::strtolower($key); |
6281 | 6281 | } else { |
6282 | 6282 | $key = self::strtoupper($key); |
@@ -6360,7 +6360,7 @@ discard block |
||
6360 | 6360 | && |
6361 | 6361 | self::$SUPPORT['mbstring'] === false |
6362 | 6362 | ) { |
6363 | - trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6363 | + trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6364 | 6364 | } |
6365 | 6365 | |
6366 | 6366 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6517,14 +6517,14 @@ discard block |
||
6517 | 6517 | && |
6518 | 6518 | self::$SUPPORT['mbstring'] === false |
6519 | 6519 | ) { |
6520 | - trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6520 | + trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6521 | 6521 | } |
6522 | 6522 | |
6523 | 6523 | if (self::$SUPPORT['mbstring'] === true) { |
6524 | 6524 | return \mb_substr_count($haystack, $needle, $encoding); |
6525 | 6525 | } |
6526 | 6526 | |
6527 | - preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
6527 | + preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
6528 | 6528 | |
6529 | 6529 | return count($matches); |
6530 | 6530 | } |
@@ -6786,7 +6786,7 @@ discard block |
||
6786 | 6786 | |
6787 | 6787 | $strSwappedCase = preg_replace_callback( |
6788 | 6788 | '/[\S]/u', |
6789 | - function ($match) use ($encoding) { |
|
6789 | + function($match) use ($encoding) { |
|
6790 | 6790 | $marchToUpper = UTF8::strtoupper($match[0], $encoding); |
6791 | 6791 | |
6792 | 6792 | if ($match[0] === $marchToUpper) { |
@@ -7125,13 +7125,13 @@ discard block |
||
7125 | 7125 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
7126 | 7126 | |
7127 | 7127 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7128 | - $buf .= $c1 . $c2; |
|
7128 | + $buf .= $c1.$c2; |
|
7129 | 7129 | $i++; |
7130 | 7130 | } else { // not valid UTF8 - convert it |
7131 | 7131 | $cc1tmp = ord($c1) / 64; |
7132 | 7132 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7133 | 7133 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7134 | - $buf .= $cc1 . $cc2; |
|
7134 | + $buf .= $cc1.$cc2; |
|
7135 | 7135 | } |
7136 | 7136 | |
7137 | 7137 | } elseif ($c1 >= "\xE0" && $c1 <= "\xEF") { // looks like 3 bytes UTF8 |
@@ -7140,13 +7140,13 @@ discard block |
||
7140 | 7140 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
7141 | 7141 | |
7142 | 7142 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7143 | - $buf .= $c1 . $c2 . $c3; |
|
7143 | + $buf .= $c1.$c2.$c3; |
|
7144 | 7144 | $i += 2; |
7145 | 7145 | } else { // not valid UTF8 - convert it |
7146 | 7146 | $cc1tmp = ord($c1) / 64; |
7147 | 7147 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7148 | 7148 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7149 | - $buf .= $cc1 . $cc2; |
|
7149 | + $buf .= $cc1.$cc2; |
|
7150 | 7150 | } |
7151 | 7151 | |
7152 | 7152 | } elseif ($c1 >= "\xF0" && $c1 <= "\xF7") { // looks like 4 bytes UTF8 |
@@ -7156,20 +7156,20 @@ discard block |
||
7156 | 7156 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
7157 | 7157 | |
7158 | 7158 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7159 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
7159 | + $buf .= $c1.$c2.$c3.$c4; |
|
7160 | 7160 | $i += 3; |
7161 | 7161 | } else { // not valid UTF8 - convert it |
7162 | 7162 | $cc1tmp = ord($c1) / 64; |
7163 | 7163 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7164 | 7164 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7165 | - $buf .= $cc1 . $cc2; |
|
7165 | + $buf .= $cc1.$cc2; |
|
7166 | 7166 | } |
7167 | 7167 | |
7168 | 7168 | } else { // doesn't look like UTF8, but should be converted |
7169 | 7169 | $cc1tmp = ord($c1) / 64; |
7170 | 7170 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7171 | 7171 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7172 | - $buf .= $cc1 . $cc2; |
|
7172 | + $buf .= $cc1.$cc2; |
|
7173 | 7173 | } |
7174 | 7174 | |
7175 | 7175 | } elseif (($c1 & "\xC0") === "\x80") { // needs conversion |
@@ -7180,7 +7180,7 @@ discard block |
||
7180 | 7180 | } else { |
7181 | 7181 | $cc1 = self::chr_and_parse_int($ordC1 / 64) | "\xC0"; |
7182 | 7182 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7183 | - $buf .= $cc1 . $cc2; |
|
7183 | + $buf .= $cc1.$cc2; |
|
7184 | 7184 | } |
7185 | 7185 | |
7186 | 7186 | } else { // it doesn't need conversion |
@@ -7191,7 +7191,7 @@ discard block |
||
7191 | 7191 | // decode unicode escape sequences |
7192 | 7192 | $buf = preg_replace_callback( |
7193 | 7193 | '/\\\\u([0-9a-f]{4})/i', |
7194 | - function ($match) { |
|
7194 | + function($match) { |
|
7195 | 7195 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
7196 | 7196 | }, |
7197 | 7197 | $buf |
@@ -7256,7 +7256,7 @@ discard block |
||
7256 | 7256 | $cleanUtf8 |
7257 | 7257 | ); |
7258 | 7258 | |
7259 | - return $strPartOne . $strPartTwo; |
|
7259 | + return $strPartOne.$strPartTwo; |
|
7260 | 7260 | } |
7261 | 7261 | |
7262 | 7262 | /** |
@@ -7768,7 +7768,7 @@ discard block |
||
7768 | 7768 | return ''; |
7769 | 7769 | } |
7770 | 7770 | |
7771 | - preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
7771 | + preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
7772 | 7772 | |
7773 | 7773 | if ( |
7774 | 7774 | !isset($matches[0]) |
@@ -7778,7 +7778,7 @@ discard block |
||
7778 | 7778 | return $str; |
7779 | 7779 | } |
7780 | 7780 | |
7781 | - return self::rtrim($matches[0]) . $strAddOn; |
|
7781 | + return self::rtrim($matches[0]).$strAddOn; |
|
7782 | 7782 | } |
7783 | 7783 | |
7784 | 7784 | /** |
@@ -7846,7 +7846,7 @@ discard block |
||
7846 | 7846 | $strReturn .= $break; |
7847 | 7847 | } |
7848 | 7848 | |
7849 | - return $strReturn . implode('', $chars); |
|
7849 | + return $strReturn.implode('', $chars); |
|
7850 | 7850 | } |
7851 | 7851 | |
7852 | 7852 | /** |