@@ -855,7 +855,7 @@ discard block |
||
855 | 855 | public static function add_bom_to_string($str) |
856 | 856 | { |
857 | 857 | if (self::string_has_bom($str) === false) { |
858 | - $str = self::bom() . $str; |
|
858 | + $str = self::bom().$str; |
|
859 | 859 | } |
860 | 860 | |
861 | 861 | return $str; |
@@ -980,10 +980,10 @@ discard block |
||
980 | 980 | && |
981 | 981 | self::$SUPPORT['mbstring'] === false |
982 | 982 | ) { |
983 | - trigger_error('UTF8::chr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
983 | + trigger_error('UTF8::chr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
984 | 984 | } |
985 | 985 | |
986 | - $cacheKey = $code_point . $encoding; |
|
986 | + $cacheKey = $code_point.$encoding; |
|
987 | 987 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
988 | 988 | return $CHAR_CACHE[$cacheKey]; |
989 | 989 | } |
@@ -1008,16 +1008,16 @@ discard block |
||
1008 | 1008 | if ($code_point <= 0x7F) { |
1009 | 1009 | $str = self::chr_and_parse_int($code_point); |
1010 | 1010 | } elseif ($code_point <= 0x7FF) { |
1011 | - $str = self::chr_and_parse_int(($code_point >> 6) + 0xC0) . |
|
1011 | + $str = self::chr_and_parse_int(($code_point >> 6) + 0xC0). |
|
1012 | 1012 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
1013 | 1013 | } elseif ($code_point <= 0xFFFF) { |
1014 | - $str = self::chr_and_parse_int(($code_point >> 12) + 0xE0) . |
|
1015 | - self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80) . |
|
1014 | + $str = self::chr_and_parse_int(($code_point >> 12) + 0xE0). |
|
1015 | + self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80). |
|
1016 | 1016 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
1017 | 1017 | } else { |
1018 | - $str = self::chr_and_parse_int(($code_point >> 18) + 0xF0) . |
|
1019 | - self::chr_and_parse_int((($code_point >> 12) & 0x3F) + 0x80) . |
|
1020 | - self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80) . |
|
1018 | + $str = self::chr_and_parse_int(($code_point >> 18) + 0xF0). |
|
1019 | + self::chr_and_parse_int((($code_point >> 12) & 0x3F) + 0x80). |
|
1020 | + self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80). |
|
1021 | 1021 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
1022 | 1022 | } |
1023 | 1023 | |
@@ -1077,7 +1077,7 @@ discard block |
||
1077 | 1077 | } |
1078 | 1078 | |
1079 | 1079 | return array_map( |
1080 | - function ($data) { |
|
1080 | + function($data) { |
|
1081 | 1081 | return self::strlen($data, '8BIT'); |
1082 | 1082 | }, |
1083 | 1083 | self::split($str) |
@@ -1319,7 +1319,7 @@ discard block |
||
1319 | 1319 | $flags = ENT_QUOTES; |
1320 | 1320 | } |
1321 | 1321 | |
1322 | - return self::html_entity_decode('&#' . $int . ';', $flags); |
|
1322 | + return self::html_entity_decode('&#'.$int.';', $flags); |
|
1323 | 1323 | } |
1324 | 1324 | |
1325 | 1325 | /** |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | && |
1398 | 1398 | self::$SUPPORT['mbstring'] === false |
1399 | 1399 | ) { |
1400 | - trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
1400 | + trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
1401 | 1401 | } |
1402 | 1402 | |
1403 | 1403 | $strEncoded = \mb_convert_encoding( |
@@ -1606,7 +1606,7 @@ discard block |
||
1606 | 1606 | ) { |
1607 | 1607 | // Prevent leading combining chars |
1608 | 1608 | // for NFC-safe concatenations. |
1609 | - $var = $leading_combining . $var; |
|
1609 | + $var = $leading_combining.$var; |
|
1610 | 1610 | } |
1611 | 1611 | } |
1612 | 1612 | |
@@ -2030,7 +2030,7 @@ discard block |
||
2030 | 2030 | */ |
2031 | 2031 | private static function getData($file) |
2032 | 2032 | { |
2033 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
2033 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
2034 | 2034 | if (file_exists($file)) { |
2035 | 2035 | /** @noinspection PhpIncludeInspection */ |
2036 | 2036 | return require $file; |
@@ -2175,7 +2175,7 @@ discard block |
||
2175 | 2175 | return implode( |
2176 | 2176 | '', |
2177 | 2177 | array_map( |
2178 | - function ($data) use ($keepAsciiChars, $encoding) { |
|
2178 | + function($data) use ($keepAsciiChars, $encoding) { |
|
2179 | 2179 | return self::single_chr_html_encode($data, $keepAsciiChars, $encoding); |
2180 | 2180 | }, |
2181 | 2181 | self::split($str) |
@@ -2296,7 +2296,7 @@ discard block |
||
2296 | 2296 | && |
2297 | 2297 | self::$SUPPORT['mbstring'] === false |
2298 | 2298 | ) { |
2299 | - trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
2299 | + trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
2300 | 2300 | } |
2301 | 2301 | |
2302 | 2302 | do { |
@@ -2304,7 +2304,7 @@ discard block |
||
2304 | 2304 | |
2305 | 2305 | $str = preg_replace_callback( |
2306 | 2306 | "/&#\d{2,6};/", |
2307 | - function ($matches) use ($encoding) { |
|
2307 | + function($matches) use ($encoding) { |
|
2308 | 2308 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2309 | 2309 | |
2310 | 2310 | if ($returnTmp !== '"' && $returnTmp !== "'") { |
@@ -2638,9 +2638,9 @@ discard block |
||
2638 | 2638 | if ((int)$int === $int) { |
2639 | 2639 | $hex = dechex($int); |
2640 | 2640 | |
2641 | - $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex); |
|
2641 | + $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex); |
|
2642 | 2642 | |
2643 | - return $pfix . $hex; |
|
2643 | + return $pfix.$hex; |
|
2644 | 2644 | } |
2645 | 2645 | |
2646 | 2646 | return ''; |
@@ -3381,7 +3381,7 @@ discard block |
||
3381 | 3381 | $cleanUtf8 |
3382 | 3382 | ); |
3383 | 3383 | |
3384 | - return $strPartOne . $strPartTwo; |
|
3384 | + return $strPartOne.$strPartTwo; |
|
3385 | 3385 | } |
3386 | 3386 | |
3387 | 3387 | /** |
@@ -3471,7 +3471,7 @@ discard block |
||
3471 | 3471 | return preg_replace('/^[\pZ\pC]+/u', '', $str); |
3472 | 3472 | } |
3473 | 3473 | |
3474 | - return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str); |
|
3474 | + return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str); |
|
3475 | 3475 | } |
3476 | 3476 | |
3477 | 3477 | /** |
@@ -4068,7 +4068,7 @@ discard block |
||
4068 | 4068 | if (is_array($what) === true) { |
4069 | 4069 | /** @noinspection ForeachSourceInspection */ |
4070 | 4070 | foreach ($what as $item) { |
4071 | - $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str); |
|
4071 | + $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str); |
|
4072 | 4072 | } |
4073 | 4073 | } |
4074 | 4074 | |
@@ -4176,7 +4176,7 @@ discard block |
||
4176 | 4176 | return preg_replace('/[\pZ\pC]+$/u', '', $str); |
4177 | 4177 | } |
4178 | 4178 | |
4179 | - return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str); |
|
4179 | + return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str); |
|
4180 | 4180 | } |
4181 | 4181 | |
4182 | 4182 | /** |
@@ -4191,7 +4191,7 @@ discard block |
||
4191 | 4191 | { |
4192 | 4192 | static $RX_CLASSS_CACHE = array(); |
4193 | 4193 | |
4194 | - $cacheKey = $s . $class; |
|
4194 | + $cacheKey = $s.$class; |
|
4195 | 4195 | |
4196 | 4196 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4197 | 4197 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4203,7 +4203,7 @@ discard block |
||
4203 | 4203 | /** @noinspection SuspiciousLoopInspection */ |
4204 | 4204 | foreach (self::str_split($s) as $s) { |
4205 | 4205 | if ('-' === $s) { |
4206 | - $class[0] = '-' . $class[0]; |
|
4206 | + $class[0] = '-'.$class[0]; |
|
4207 | 4207 | } elseif (!isset($s[2])) { |
4208 | 4208 | $class[0] .= preg_quote($s, '/'); |
4209 | 4209 | } elseif (1 === self::strlen($s)) { |
@@ -4214,13 +4214,13 @@ discard block |
||
4214 | 4214 | } |
4215 | 4215 | |
4216 | 4216 | if ($class[0]) { |
4217 | - $class[0] = '[' . $class[0] . ']'; |
|
4217 | + $class[0] = '['.$class[0].']'; |
|
4218 | 4218 | } |
4219 | 4219 | |
4220 | 4220 | if (1 === count($class)) { |
4221 | 4221 | $return = $class[0]; |
4222 | 4222 | } else { |
4223 | - $return = '(?:' . implode('|', $class) . ')'; |
|
4223 | + $return = '(?:'.implode('|', $class).')'; |
|
4224 | 4224 | } |
4225 | 4225 | |
4226 | 4226 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4238,7 +4238,7 @@ discard block |
||
4238 | 4238 | } |
4239 | 4239 | |
4240 | 4240 | foreach (self::$SUPPORT as $utf8Support) { |
4241 | - echo $utf8Support . "\n<br>"; |
|
4241 | + echo $utf8Support."\n<br>"; |
|
4242 | 4242 | } |
4243 | 4243 | } |
4244 | 4244 | |
@@ -4271,7 +4271,7 @@ discard block |
||
4271 | 4271 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4272 | 4272 | } |
4273 | 4273 | |
4274 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4274 | + return '&#'.self::ord($char, $encoding).';'; |
|
4275 | 4275 | } |
4276 | 4276 | |
4277 | 4277 | /** |
@@ -4338,7 +4338,7 @@ discard block |
||
4338 | 4338 | ) { |
4339 | 4339 | |
4340 | 4340 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4341 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4341 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4342 | 4342 | |
4343 | 4343 | $i++; |
4344 | 4344 | } |
@@ -4354,7 +4354,7 @@ discard block |
||
4354 | 4354 | && |
4355 | 4355 | ($str[$i + 2] & "\xC0") === "\x80" |
4356 | 4356 | ) { |
4357 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4357 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4358 | 4358 | |
4359 | 4359 | $i += 2; |
4360 | 4360 | } |
@@ -4372,7 +4372,7 @@ discard block |
||
4372 | 4372 | && |
4373 | 4373 | ($str[$i + 3] & "\xC0") === "\x80" |
4374 | 4374 | ) { |
4375 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4375 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4376 | 4376 | |
4377 | 4377 | $i += 3; |
4378 | 4378 | } |
@@ -4385,7 +4385,7 @@ discard block |
||
4385 | 4385 | $ret = array_chunk($ret, $length); |
4386 | 4386 | |
4387 | 4387 | return array_map( |
4388 | - function ($item) { |
|
4388 | + function($item) { |
|
4389 | 4389 | return implode('', $item); |
4390 | 4390 | }, $ret |
4391 | 4391 | ); |
@@ -4491,7 +4491,7 @@ discard block |
||
4491 | 4491 | foreach (self::$ICONV_ENCODING as $encodingTmp) { |
4492 | 4492 | # INFO: //IGNORE and //TRANSLIT still throw notice |
4493 | 4493 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
4494 | - if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) { |
|
4494 | + if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) { |
|
4495 | 4495 | return $encodingTmp; |
4496 | 4496 | } |
4497 | 4497 | } |
@@ -4586,7 +4586,7 @@ discard block |
||
4586 | 4586 | if ('' === $s .= '') { |
4587 | 4587 | $s = '/^(?<=.)$/'; |
4588 | 4588 | } else { |
4589 | - $s = '/' . preg_quote($s, '/') . '/ui'; |
|
4589 | + $s = '/'.preg_quote($s, '/').'/ui'; |
|
4590 | 4590 | } |
4591 | 4591 | } |
4592 | 4592 | |
@@ -4644,7 +4644,7 @@ discard block |
||
4644 | 4644 | } |
4645 | 4645 | |
4646 | 4646 | if (self::substr($str, $length - 1, 1) === ' ') { |
4647 | - return (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4647 | + return (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4648 | 4648 | } |
4649 | 4649 | |
4650 | 4650 | $str = (string)self::substr($str, 0, $length); |
@@ -4653,9 +4653,9 @@ discard block |
||
4653 | 4653 | $new_str = implode(' ', $array); |
4654 | 4654 | |
4655 | 4655 | if ($new_str === '') { |
4656 | - $str = (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4656 | + $str = (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4657 | 4657 | } else { |
4658 | - $str = $new_str . $strAddOn; |
|
4658 | + $str = $new_str.$strAddOn; |
|
4659 | 4659 | } |
4660 | 4660 | |
4661 | 4661 | return $str; |
@@ -4710,7 +4710,7 @@ discard block |
||
4710 | 4710 | $pre = ''; |
4711 | 4711 | } |
4712 | 4712 | |
4713 | - return $pre . $str . $post; |
|
4713 | + return $pre.$str.$post; |
|
4714 | 4714 | } |
4715 | 4715 | |
4716 | 4716 | return $str; |
@@ -4860,7 +4860,7 @@ discard block |
||
4860 | 4860 | } |
4861 | 4861 | |
4862 | 4862 | /** @noinspection PhpInternalEntityUsedInspection */ |
4863 | - preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a); |
|
4863 | + preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a); |
|
4864 | 4864 | $a = $a[0]; |
4865 | 4865 | |
4866 | 4866 | if ($len === 1) { |
@@ -5096,7 +5096,7 @@ discard block |
||
5096 | 5096 | public static function strcmp($str1, $str2) |
5097 | 5097 | { |
5098 | 5098 | /** @noinspection PhpUndefinedClassInspection */ |
5099 | - return $str1 . '' === $str2 . '' ? 0 : strcmp( |
|
5099 | + return $str1.'' === $str2.'' ? 0 : strcmp( |
|
5100 | 5100 | \Normalizer::normalize($str1, \Normalizer::NFD), |
5101 | 5101 | \Normalizer::normalize($str2, \Normalizer::NFD) |
5102 | 5102 | ); |
@@ -5131,7 +5131,7 @@ discard block |
||
5131 | 5131 | return null; |
5132 | 5132 | } |
5133 | 5133 | |
5134 | - if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
5134 | + if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
5135 | 5135 | /** @noinspection OffsetOperationsInspection */ |
5136 | 5136 | return self::strlen($length[1]); |
5137 | 5137 | } |
@@ -5342,7 +5342,7 @@ discard block |
||
5342 | 5342 | && |
5343 | 5343 | self::$SUPPORT['mbstring'] === false |
5344 | 5344 | ) { |
5345 | - trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5345 | + trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5346 | 5346 | } |
5347 | 5347 | |
5348 | 5348 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5363,7 +5363,7 @@ discard block |
||
5363 | 5363 | return stristr($haystack, $needle, $before_needle); |
5364 | 5364 | } |
5365 | 5365 | |
5366 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
5366 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match); |
|
5367 | 5367 | |
5368 | 5368 | if (!isset($match[1])) { |
5369 | 5369 | return false; |
@@ -5438,7 +5438,7 @@ discard block |
||
5438 | 5438 | && |
5439 | 5439 | self::$SUPPORT['iconv'] === false |
5440 | 5440 | ) { |
5441 | - trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5441 | + trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5442 | 5442 | } |
5443 | 5443 | |
5444 | 5444 | if ( |
@@ -5517,7 +5517,7 @@ discard block |
||
5517 | 5517 | */ |
5518 | 5518 | public static function strnatcmp($str1, $str2) |
5519 | 5519 | { |
5520 | - return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5520 | + return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5521 | 5521 | } |
5522 | 5522 | |
5523 | 5523 | /** |
@@ -5578,7 +5578,7 @@ discard block |
||
5578 | 5578 | return false; |
5579 | 5579 | } |
5580 | 5580 | |
5581 | - if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
5581 | + if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
5582 | 5582 | return substr($haystack, strpos($haystack, $m[0])); |
5583 | 5583 | } |
5584 | 5584 | |
@@ -5655,7 +5655,7 @@ discard block |
||
5655 | 5655 | && |
5656 | 5656 | self::$SUPPORT['mbstring'] === false |
5657 | 5657 | ) { |
5658 | - trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5658 | + trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5659 | 5659 | } |
5660 | 5660 | |
5661 | 5661 | if ( |
@@ -5887,7 +5887,7 @@ discard block |
||
5887 | 5887 | && |
5888 | 5888 | self::$SUPPORT['mbstring'] === false |
5889 | 5889 | ) { |
5890 | - trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5890 | + trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5891 | 5891 | } |
5892 | 5892 | |
5893 | 5893 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5970,7 +5970,7 @@ discard block |
||
5970 | 5970 | && |
5971 | 5971 | self::$SUPPORT['mbstring'] === false |
5972 | 5972 | ) { |
5973 | - trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5973 | + trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5974 | 5974 | } |
5975 | 5975 | |
5976 | 5976 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6038,7 +6038,7 @@ discard block |
||
6038 | 6038 | return 0; |
6039 | 6039 | } |
6040 | 6040 | |
6041 | - return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
6041 | + return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
6042 | 6042 | } |
6043 | 6043 | |
6044 | 6044 | /** |
@@ -6084,7 +6084,7 @@ discard block |
||
6084 | 6084 | && |
6085 | 6085 | self::$SUPPORT['mbstring'] === false |
6086 | 6086 | ) { |
6087 | - trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6087 | + trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6088 | 6088 | } |
6089 | 6089 | |
6090 | 6090 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6101,7 +6101,7 @@ discard block |
||
6101 | 6101 | return \grapheme_strstr($haystack, $needle, $before_needle); |
6102 | 6102 | } |
6103 | 6103 | |
6104 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match); |
|
6104 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match); |
|
6105 | 6105 | |
6106 | 6106 | if (!isset($match[1])) { |
6107 | 6107 | return false; |
@@ -6208,9 +6208,9 @@ discard block |
||
6208 | 6208 | Bootup::is_php('5.4') === true |
6209 | 6209 | ) { |
6210 | 6210 | |
6211 | - $langCode = $lang . '-Lower'; |
|
6211 | + $langCode = $lang.'-Lower'; |
|
6212 | 6212 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6213 | - trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6213 | + trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING); |
|
6214 | 6214 | |
6215 | 6215 | $langCode = 'Any-Lower'; |
6216 | 6216 | } |
@@ -6218,7 +6218,7 @@ discard block |
||
6218 | 6218 | return transliterator_transliterate($langCode, $str); |
6219 | 6219 | } |
6220 | 6220 | |
6221 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6221 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6222 | 6222 | } |
6223 | 6223 | |
6224 | 6224 | return \mb_strtolower($str, $encoding); |
@@ -6278,9 +6278,9 @@ discard block |
||
6278 | 6278 | Bootup::is_php('5.4') === true |
6279 | 6279 | ) { |
6280 | 6280 | |
6281 | - $langCode = $lang . '-Upper'; |
|
6281 | + $langCode = $lang.'-Upper'; |
|
6282 | 6282 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6283 | - trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6283 | + trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
6284 | 6284 | |
6285 | 6285 | $langCode = 'Any-Upper'; |
6286 | 6286 | } |
@@ -6288,7 +6288,7 @@ discard block |
||
6288 | 6288 | return transliterator_transliterate($langCode, $str); |
6289 | 6289 | } |
6290 | 6290 | |
6291 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6291 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6292 | 6292 | } |
6293 | 6293 | |
6294 | 6294 | return \mb_strtoupper($str, $encoding); |
@@ -6488,7 +6488,7 @@ discard block |
||
6488 | 6488 | && |
6489 | 6489 | self::$SUPPORT['mbstring'] === false |
6490 | 6490 | ) { |
6491 | - trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6491 | + trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6492 | 6492 | } |
6493 | 6493 | |
6494 | 6494 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6515,8 +6515,7 @@ discard block |
||
6515 | 6515 | |
6516 | 6516 | if (self::is_ascii($str)) { |
6517 | 6517 | return ($length === null) ? |
6518 | - substr($str, $offset) : |
|
6519 | - substr($str, $offset, $length); |
|
6518 | + substr($str, $offset) : substr($str, $offset, $length); |
|
6520 | 6519 | } |
6521 | 6520 | |
6522 | 6521 | // fallback via vanilla php |
@@ -6651,14 +6650,14 @@ discard block |
||
6651 | 6650 | && |
6652 | 6651 | self::$SUPPORT['mbstring'] === false |
6653 | 6652 | ) { |
6654 | - trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6653 | + trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6655 | 6654 | } |
6656 | 6655 | |
6657 | 6656 | if (self::$SUPPORT['mbstring'] === true) { |
6658 | 6657 | return \mb_substr_count($haystack, $needle, $encoding); |
6659 | 6658 | } |
6660 | 6659 | |
6661 | - preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
6660 | + preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
6662 | 6661 | |
6663 | 6662 | return count($matches); |
6664 | 6663 | } |
@@ -6848,8 +6847,7 @@ discard block |
||
6848 | 6847 | |
6849 | 6848 | if (self::is_ascii($str)) { |
6850 | 6849 | return ($length === null) ? |
6851 | - substr_replace($str, $replacement, $offset) : |
|
6852 | - substr_replace($str, $replacement, $offset, $length); |
|
6850 | + substr_replace($str, $replacement, $offset) : substr_replace($str, $replacement, $offset, $length); |
|
6853 | 6851 | } |
6854 | 6852 | |
6855 | 6853 | preg_match_all('/./us', $str, $smatches); |
@@ -6925,7 +6923,7 @@ discard block |
||
6925 | 6923 | |
6926 | 6924 | $strSwappedCase = preg_replace_callback( |
6927 | 6925 | '/[\S]/u', |
6928 | - function ($match) use ($encoding) { |
|
6926 | + function($match) use ($encoding) { |
|
6929 | 6927 | $marchToUpper = self::strtoupper($match[0], $encoding); |
6930 | 6928 | |
6931 | 6929 | if ($match[0] === $marchToUpper) { |
@@ -7269,7 +7267,7 @@ discard block |
||
7269 | 7267 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
7270 | 7268 | |
7271 | 7269 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7272 | - $buf .= $c1 . $c2; |
|
7270 | + $buf .= $c1.$c2; |
|
7273 | 7271 | $i++; |
7274 | 7272 | } else { // not valid UTF8 - convert it |
7275 | 7273 | $buf .= self::to_utf8_convert($c1); |
@@ -7281,7 +7279,7 @@ discard block |
||
7281 | 7279 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
7282 | 7280 | |
7283 | 7281 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7284 | - $buf .= $c1 . $c2 . $c3; |
|
7282 | + $buf .= $c1.$c2.$c3; |
|
7285 | 7283 | $i += 2; |
7286 | 7284 | } else { // not valid UTF8 - convert it |
7287 | 7285 | $buf .= self::to_utf8_convert($c1); |
@@ -7294,7 +7292,7 @@ discard block |
||
7294 | 7292 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
7295 | 7293 | |
7296 | 7294 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7297 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
7295 | + $buf .= $c1.$c2.$c3.$c4; |
|
7298 | 7296 | $i += 3; |
7299 | 7297 | } else { // not valid UTF8 - convert it |
7300 | 7298 | $buf .= self::to_utf8_convert($c1); |
@@ -7316,7 +7314,7 @@ discard block |
||
7316 | 7314 | // decode unicode escape sequences |
7317 | 7315 | $buf = preg_replace_callback( |
7318 | 7316 | '/\\\\u([0-9a-f]{4})/i', |
7319 | - function ($match) { |
|
7317 | + function($match) { |
|
7320 | 7318 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
7321 | 7319 | }, |
7322 | 7320 | $buf |
@@ -7345,7 +7343,7 @@ discard block |
||
7345 | 7343 | } else { |
7346 | 7344 | $cc1 = self::chr_and_parse_int($ordC1 / 64) | "\xC0"; |
7347 | 7345 | $cc2 = ($int & "\x3F") | "\x80"; |
7348 | - $buf .= $cc1 . $cc2; |
|
7346 | + $buf .= $cc1.$cc2; |
|
7349 | 7347 | } |
7350 | 7348 | |
7351 | 7349 | return $buf; |
@@ -7408,7 +7406,7 @@ discard block |
||
7408 | 7406 | $cleanUtf8 |
7409 | 7407 | ); |
7410 | 7408 | |
7411 | - return $strPartOne . $strPartTwo; |
|
7409 | + return $strPartOne.$strPartTwo; |
|
7412 | 7410 | } |
7413 | 7411 | |
7414 | 7412 | /** |
@@ -7453,7 +7451,7 @@ discard block |
||
7453 | 7451 | $str = self::clean($str); |
7454 | 7452 | } |
7455 | 7453 | |
7456 | - $usePhpDefaultFunctions = !(bool)($charlist . implode('', $exceptions)); |
|
7454 | + $usePhpDefaultFunctions = !(bool)($charlist.implode('', $exceptions)); |
|
7457 | 7455 | |
7458 | 7456 | if ( |
7459 | 7457 | $usePhpDefaultFunctions === true |
@@ -7940,7 +7938,7 @@ discard block |
||
7940 | 7938 | return ''; |
7941 | 7939 | } |
7942 | 7940 | |
7943 | - preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
7941 | + preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
7944 | 7942 | |
7945 | 7943 | if ( |
7946 | 7944 | !isset($matches[0]) |
@@ -7950,7 +7948,7 @@ discard block |
||
7950 | 7948 | return $str; |
7951 | 7949 | } |
7952 | 7950 | |
7953 | - return self::rtrim($matches[0]) . $strAddOn; |
|
7951 | + return self::rtrim($matches[0]).$strAddOn; |
|
7954 | 7952 | } |
7955 | 7953 | |
7956 | 7954 | /** |
@@ -8018,7 +8016,7 @@ discard block |
||
8018 | 8016 | $strReturn .= $break; |
8019 | 8017 | } |
8020 | 8018 | |
8021 | - return $strReturn . implode('', $chars); |
|
8019 | + return $strReturn.implode('', $chars); |
|
8022 | 8020 | } |
8023 | 8021 | |
8024 | 8022 | /** |