@@ -264,7 +264,7 @@ discard block |
||
264 | 264 | public static function add_bom_to_string(string $str): string |
265 | 265 | { |
266 | 266 | if (self::string_has_bom($str) === false) { |
267 | - $str = self::bom() . $str; |
|
267 | + $str = self::bom().$str; |
|
268 | 268 | } |
269 | 269 | |
270 | 270 | return $str; |
@@ -531,10 +531,10 @@ discard block |
||
531 | 531 | && |
532 | 532 | self::$SUPPORT['mbstring'] === false |
533 | 533 | ) { |
534 | - \trigger_error('UTF8::chr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
534 | + \trigger_error('UTF8::chr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
535 | 535 | } |
536 | 536 | |
537 | - $cacheKey = $code_point . $encoding; |
|
537 | + $cacheKey = $code_point.$encoding; |
|
538 | 538 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
539 | 539 | return $CHAR_CACHE[$cacheKey]; |
540 | 540 | } |
@@ -579,16 +579,16 @@ discard block |
||
579 | 579 | if ($code_point <= 0x7F) { |
580 | 580 | $chr = self::$CHR[$code_point]; |
581 | 581 | } elseif ($code_point <= 0x7FF) { |
582 | - $chr = self::$CHR[($code_point >> 6) + 0xC0] . |
|
582 | + $chr = self::$CHR[($code_point >> 6) + 0xC0]. |
|
583 | 583 | self::$CHR[($code_point & 0x3F) + 0x80]; |
584 | 584 | } elseif ($code_point <= 0xFFFF) { |
585 | - $chr = self::$CHR[($code_point >> 12) + 0xE0] . |
|
586 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
585 | + $chr = self::$CHR[($code_point >> 12) + 0xE0]. |
|
586 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80]. |
|
587 | 587 | self::$CHR[($code_point & 0x3F) + 0x80]; |
588 | 588 | } else { |
589 | - $chr = self::$CHR[($code_point >> 18) + 0xF0] . |
|
590 | - self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] . |
|
591 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
589 | + $chr = self::$CHR[($code_point >> 18) + 0xF0]. |
|
590 | + self::$CHR[(($code_point >> 12) & 0x3F) + 0x80]. |
|
591 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80]. |
|
592 | 592 | self::$CHR[($code_point & 0x3F) + 0x80]; |
593 | 593 | } |
594 | 594 | |
@@ -640,7 +640,7 @@ discard block |
||
640 | 640 | |
641 | 641 | if (self::$SUPPORT['mbstring_func_overload'] === true) { |
642 | 642 | return \array_map( |
643 | - function ($data) { |
|
643 | + function($data) { |
|
644 | 644 | return UTF8::strlen_in_byte($data); |
645 | 645 | }, |
646 | 646 | $strSplit |
@@ -955,7 +955,7 @@ discard block |
||
955 | 955 | */ |
956 | 956 | public static function decimal_to_chr($int): string |
957 | 957 | { |
958 | - return self::html_entity_decode('&#' . $int . ';', ENT_QUOTES | ENT_HTML5); |
|
958 | + return self::html_entity_decode('&#'.$int.';', ENT_QUOTES | ENT_HTML5); |
|
959 | 959 | } |
960 | 960 | |
961 | 961 | /** |
@@ -1111,7 +1111,7 @@ discard block |
||
1111 | 1111 | && |
1112 | 1112 | self::$SUPPORT['mbstring'] === false |
1113 | 1113 | ) { |
1114 | - \trigger_error('UTF8::encode() without mbstring cannot handle "' . $toEncoding . '" encoding', E_USER_WARNING); |
|
1114 | + \trigger_error('UTF8::encode() without mbstring cannot handle "'.$toEncoding.'" encoding', E_USER_WARNING); |
|
1115 | 1115 | } |
1116 | 1116 | |
1117 | 1117 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -1227,7 +1227,7 @@ discard block |
||
1227 | 1227 | return ''; |
1228 | 1228 | } |
1229 | 1229 | |
1230 | - return \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1230 | + return \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1231 | 1231 | } |
1232 | 1232 | |
1233 | 1233 | return $str; |
@@ -1263,14 +1263,14 @@ discard block |
||
1263 | 1263 | if (!$pos_end || $pos_end <= 0) { |
1264 | 1264 | $strSub = self::substr($str, $pos_start, self::strlen($str), $encoding); |
1265 | 1265 | if ($strSub !== false) { |
1266 | - $extract = $replacerForSkippedText . \ltrim($strSub, $trimChars); |
|
1266 | + $extract = $replacerForSkippedText.\ltrim($strSub, $trimChars); |
|
1267 | 1267 | } else { |
1268 | 1268 | $extract = ''; |
1269 | 1269 | } |
1270 | 1270 | } else { |
1271 | 1271 | $strSub = self::substr($str, $pos_start, $pos_end, $encoding); |
1272 | 1272 | if ($strSub !== false) { |
1273 | - $extract = $replacerForSkippedText . \trim($strSub, $trimChars) . $replacerForSkippedText; |
|
1273 | + $extract = $replacerForSkippedText.\trim($strSub, $trimChars).$replacerForSkippedText; |
|
1274 | 1274 | } else { |
1275 | 1275 | $extract = ''; |
1276 | 1276 | } |
@@ -1293,7 +1293,7 @@ discard block |
||
1293 | 1293 | if ($pos_end) { |
1294 | 1294 | $strSub = self::substr($str, 0, $pos_end, $encoding); |
1295 | 1295 | if ($strSub !== false) { |
1296 | - $extract = \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1296 | + $extract = \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1297 | 1297 | } else { |
1298 | 1298 | $extract = ''; |
1299 | 1299 | } |
@@ -1418,7 +1418,7 @@ discard block |
||
1418 | 1418 | { |
1419 | 1419 | $file_content = \file_get_contents($file_path); |
1420 | 1420 | if ($file_content === false) { |
1421 | - throw new \RuntimeException('file_get_contents() returned false for:' . $file_path); |
|
1421 | + throw new \RuntimeException('file_get_contents() returned false for:'.$file_path); |
|
1422 | 1422 | } |
1423 | 1423 | |
1424 | 1424 | return self::string_has_bom($file_content); |
@@ -1478,7 +1478,7 @@ discard block |
||
1478 | 1478 | ) { |
1479 | 1479 | // Prevent leading combining chars |
1480 | 1480 | // for NFC-safe concatenations. |
1481 | - $var = $leading_combining . $var; |
|
1481 | + $var = $leading_combining.$var; |
|
1482 | 1482 | } |
1483 | 1483 | } |
1484 | 1484 | |
@@ -1973,7 +1973,7 @@ discard block |
||
1973 | 1973 | */ |
1974 | 1974 | private static function getData(string $file) |
1975 | 1975 | { |
1976 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
1976 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
1977 | 1977 | if (\file_exists($file)) { |
1978 | 1978 | /** @noinspection PhpIncludeInspection */ |
1979 | 1979 | return require $file; |
@@ -2035,7 +2035,7 @@ discard block |
||
2035 | 2035 | } |
2036 | 2036 | |
2037 | 2037 | $str_info = \unpack('C2chars', $str_info); |
2038 | - $type_code = (int)($str_info['chars1'] . $str_info['chars2']); |
|
2038 | + $type_code = (int)($str_info['chars1'].$str_info['chars2']); |
|
2039 | 2039 | |
2040 | 2040 | // DEBUG |
2041 | 2041 | //var_dump($type_code); |
@@ -2148,16 +2148,16 @@ discard block |
||
2148 | 2148 | */ |
2149 | 2149 | public static function get_unique_string($entropyExtra = '', bool $md5 = true): string |
2150 | 2150 | { |
2151 | - $uniqueHelper = \mt_rand() . |
|
2152 | - \session_id() . |
|
2153 | - ($_SERVER['REMOTE_ADDR'] ?? '') . |
|
2154 | - ($_SERVER['SERVER_ADDR'] ?? '') . |
|
2151 | + $uniqueHelper = \mt_rand(). |
|
2152 | + \session_id(). |
|
2153 | + ($_SERVER['REMOTE_ADDR'] ?? ''). |
|
2154 | + ($_SERVER['SERVER_ADDR'] ?? ''). |
|
2155 | 2155 | $entropyExtra; |
2156 | 2156 | |
2157 | 2157 | $uniqueString = \uniqid($uniqueHelper, true); |
2158 | 2158 | |
2159 | 2159 | if ($md5) { |
2160 | - $uniqueString = \md5($uniqueString . $uniqueHelper); |
|
2160 | + $uniqueString = \md5($uniqueString.$uniqueHelper); |
|
2161 | 2161 | } |
2162 | 2162 | |
2163 | 2163 | return $uniqueString; |
@@ -2302,7 +2302,7 @@ discard block |
||
2302 | 2302 | return \implode( |
2303 | 2303 | '', |
2304 | 2304 | \array_map( |
2305 | - function ($chr) use ($keepAsciiChars, $encoding) { |
|
2305 | + function($chr) use ($keepAsciiChars, $encoding) { |
|
2306 | 2306 | return UTF8::single_chr_html_encode($chr, $keepAsciiChars, $encoding); |
2307 | 2307 | }, |
2308 | 2308 | self::split($str) |
@@ -2418,7 +2418,7 @@ discard block |
||
2418 | 2418 | && |
2419 | 2419 | self::$SUPPORT['mbstring'] === false |
2420 | 2420 | ) { |
2421 | - \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
2421 | + \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
2422 | 2422 | } |
2423 | 2423 | |
2424 | 2424 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -2441,7 +2441,7 @@ discard block |
||
2441 | 2441 | |
2442 | 2442 | $str = (string)\preg_replace_callback( |
2443 | 2443 | "/&#\d{2,6};/", |
2444 | - function ($matches) use ($encoding) { |
|
2444 | + function($matches) use ($encoding) { |
|
2445 | 2445 | // always fallback via symfony polyfill |
2446 | 2446 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2447 | 2447 | |
@@ -2784,9 +2784,9 @@ discard block |
||
2784 | 2784 | { |
2785 | 2785 | $hex = \dechex($int); |
2786 | 2786 | |
2787 | - $hex = (\strlen($hex) < 4 ? \substr('0000' . $hex, -4) : $hex); |
|
2787 | + $hex = (\strlen($hex) < 4 ? \substr('0000'.$hex, -4) : $hex); |
|
2788 | 2788 | |
2789 | - return $pfix . $hex . ''; |
|
2789 | + return $pfix.$hex.''; |
|
2790 | 2790 | } |
2791 | 2791 | |
2792 | 2792 | /** |
@@ -3735,7 +3735,7 @@ discard block |
||
3735 | 3735 | $tryToKeepStringLength |
3736 | 3736 | ); |
3737 | 3737 | |
3738 | - return $strPartOne . $strPartTwo; |
|
3738 | + return $strPartOne.$strPartTwo; |
|
3739 | 3739 | } |
3740 | 3740 | |
3741 | 3741 | /** |
@@ -4245,7 +4245,7 @@ discard block |
||
4245 | 4245 | } |
4246 | 4246 | } |
4247 | 4247 | |
4248 | - $cacheKey = $chr_orig . $encoding; |
|
4248 | + $cacheKey = $chr_orig.$encoding; |
|
4249 | 4249 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
4250 | 4250 | return $CHAR_CACHE[$cacheKey]; |
4251 | 4251 | } |
@@ -4498,7 +4498,7 @@ discard block |
||
4498 | 4498 | } |
4499 | 4499 | |
4500 | 4500 | $str = (string)\preg_replace( |
4501 | - $delimiter . $pattern . $delimiter . 'u' . $options, |
|
4501 | + $delimiter.$pattern.$delimiter.'u'.$options, |
|
4502 | 4502 | $replacement, |
4503 | 4503 | $str |
4504 | 4504 | ); |
@@ -4569,7 +4569,7 @@ discard block |
||
4569 | 4569 | if (\is_array($what) === true) { |
4570 | 4570 | /** @noinspection ForeachSourceInspection */ |
4571 | 4571 | foreach ($what as $item) { |
4572 | - $str = (string)\preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str); |
|
4572 | + $str = (string)\preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str); |
|
4573 | 4573 | } |
4574 | 4574 | } |
4575 | 4575 | |
@@ -4817,7 +4817,7 @@ discard block |
||
4817 | 4817 | { |
4818 | 4818 | static $RX_CLASSS_CACHE = []; |
4819 | 4819 | |
4820 | - $cacheKey = $s . $class; |
|
4820 | + $cacheKey = $s.$class; |
|
4821 | 4821 | |
4822 | 4822 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4823 | 4823 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4829,7 +4829,7 @@ discard block |
||
4829 | 4829 | /** @noinspection SuspiciousLoopInspection */ |
4830 | 4830 | foreach (self::str_split($s) as $s) { |
4831 | 4831 | if ('-' === $s) { |
4832 | - $class[0] = '-' . $class[0]; |
|
4832 | + $class[0] = '-'.$class[0]; |
|
4833 | 4833 | } elseif (!isset($s[2])) { |
4834 | 4834 | $class[0] .= \preg_quote($s, '/'); |
4835 | 4835 | } elseif (1 === self::strlen($s)) { |
@@ -4840,13 +4840,13 @@ discard block |
||
4840 | 4840 | } |
4841 | 4841 | |
4842 | 4842 | if ($class[0]) { |
4843 | - $class[0] = '[' . $class[0] . ']'; |
|
4843 | + $class[0] = '['.$class[0].']'; |
|
4844 | 4844 | } |
4845 | 4845 | |
4846 | 4846 | if (1 === \count($class)) { |
4847 | 4847 | $return = $class[0]; |
4848 | 4848 | } else { |
4849 | - $return = '(?:' . \implode('|', $class) . ')'; |
|
4849 | + $return = '(?:'.\implode('|', $class).')'; |
|
4850 | 4850 | } |
4851 | 4851 | |
4852 | 4852 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4865,7 +4865,7 @@ discard block |
||
4865 | 4865 | |
4866 | 4866 | echo '<pre>'; |
4867 | 4867 | foreach (self::$SUPPORT as $key => $value) { |
4868 | - echo $key . ' - ' . \print_r($value, true) . "\n<br>"; |
|
4868 | + echo $key.' - '.\print_r($value, true)."\n<br>"; |
|
4869 | 4869 | } |
4870 | 4870 | echo '</pre>'; |
4871 | 4871 | } |
@@ -4897,7 +4897,7 @@ discard block |
||
4897 | 4897 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4898 | 4898 | } |
4899 | 4899 | |
4900 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4900 | + return '&#'.self::ord($char, $encoding).';'; |
|
4901 | 4901 | } |
4902 | 4902 | |
4903 | 4903 | /** |
@@ -4984,7 +4984,7 @@ discard block |
||
4984 | 4984 | ) { |
4985 | 4985 | |
4986 | 4986 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4987 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4987 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4988 | 4988 | |
4989 | 4989 | $i++; |
4990 | 4990 | } |
@@ -5000,7 +5000,7 @@ discard block |
||
5000 | 5000 | && |
5001 | 5001 | ($str[$i + 2] & "\xC0") === "\x80" |
5002 | 5002 | ) { |
5003 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
5003 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
5004 | 5004 | |
5005 | 5005 | $i += 2; |
5006 | 5006 | } |
@@ -5018,7 +5018,7 @@ discard block |
||
5018 | 5018 | && |
5019 | 5019 | ($str[$i + 3] & "\xC0") === "\x80" |
5020 | 5020 | ) { |
5021 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
5021 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
5022 | 5022 | |
5023 | 5023 | $i += 3; |
5024 | 5024 | } |
@@ -5031,7 +5031,7 @@ discard block |
||
5031 | 5031 | $ret = \array_chunk($ret, $length); |
5032 | 5032 | |
5033 | 5033 | return \array_map( |
5034 | - function ($item) { |
|
5034 | + function($item) { |
|
5035 | 5035 | return \implode('', $item); |
5036 | 5036 | }, $ret |
5037 | 5037 | ); |
@@ -5064,7 +5064,7 @@ discard block |
||
5064 | 5064 | |
5065 | 5065 | $str = (string)\preg_replace_callback( |
5066 | 5066 | '/[-_\s]+(.)?/u', |
5067 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5067 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5068 | 5068 | if (isset($match[1])) { |
5069 | 5069 | return UTF8::strtoupper($match[1], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5070 | 5070 | } |
@@ -5076,7 +5076,7 @@ discard block |
||
5076 | 5076 | |
5077 | 5077 | $str = (string)\preg_replace_callback( |
5078 | 5078 | '/[\d]+(.)?/u', |
5079 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5079 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5080 | 5080 | return UTF8::strtoupper($match[0], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5081 | 5081 | }, |
5082 | 5082 | $str |
@@ -5448,7 +5448,7 @@ discard block |
||
5448 | 5448 | foreach (self::$ENCODINGS as $encodingTmp) { |
5449 | 5449 | # INFO: //IGNORE but still throw notice |
5450 | 5450 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
5451 | - if ((string)@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str) === $str) { |
|
5451 | + if ((string)@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str) === $str) { |
|
5452 | 5452 | return $encodingTmp; |
5453 | 5453 | } |
5454 | 5454 | } |
@@ -5510,7 +5510,7 @@ discard block |
||
5510 | 5510 | public static function str_ensure_left(string $str, string $substring): string |
5511 | 5511 | { |
5512 | 5512 | if (!self::str_starts_with($str, $substring)) { |
5513 | - $str = $substring . $str; |
|
5513 | + $str = $substring.$str; |
|
5514 | 5514 | } |
5515 | 5515 | |
5516 | 5516 | return $str; |
@@ -5719,7 +5719,7 @@ discard block |
||
5719 | 5719 | $start = self::substr($str, 0, $index, $encoding); |
5720 | 5720 | $end = self::substr($str, $index, $len, $encoding); |
5721 | 5721 | |
5722 | - return $start . $substring . $end; |
|
5722 | + return $start.$substring.$end; |
|
5723 | 5723 | } |
5724 | 5724 | |
5725 | 5725 | /** |
@@ -5756,7 +5756,7 @@ discard block |
||
5756 | 5756 | if ('' === $s .= '') { |
5757 | 5757 | $s = '/^(?<=.)$/'; |
5758 | 5758 | } else { |
5759 | - $s = '/' . \preg_quote($s, '/') . '/ui'; |
|
5759 | + $s = '/'.\preg_quote($s, '/').'/ui'; |
|
5760 | 5760 | } |
5761 | 5761 | } |
5762 | 5762 | |
@@ -6039,7 +6039,7 @@ discard block |
||
6039 | 6039 | return $str; |
6040 | 6040 | } |
6041 | 6041 | |
6042 | - return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding) . $strAddOn; |
|
6042 | + return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding).$strAddOn; |
|
6043 | 6043 | } |
6044 | 6044 | |
6045 | 6045 | /** |
@@ -6067,7 +6067,7 @@ discard block |
||
6067 | 6067 | } |
6068 | 6068 | |
6069 | 6069 | if (self::substr($str, $length - 1, 1, $encoding) === ' ') { |
6070 | - return self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6070 | + return self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6071 | 6071 | } |
6072 | 6072 | |
6073 | 6073 | $str = (string)self::substr($str, 0, $length, $encoding); |
@@ -6076,9 +6076,9 @@ discard block |
||
6076 | 6076 | $new_str = \implode(' ', $array); |
6077 | 6077 | |
6078 | 6078 | if ($new_str === '') { |
6079 | - $str = self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6079 | + $str = self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6080 | 6080 | } else { |
6081 | - $str = $new_str . $strAddOn; |
|
6081 | + $str = $new_str.$strAddOn; |
|
6082 | 6082 | } |
6083 | 6083 | |
6084 | 6084 | return $str; |
@@ -6181,7 +6181,7 @@ discard block |
||
6181 | 6181 | $char = self::substr($str, -$i, 1, $encoding); |
6182 | 6182 | |
6183 | 6183 | if ($char == self::substr($otherStr, -$i, 1, $encoding)) { |
6184 | - $longestCommonSuffix = $char . $longestCommonSuffix; |
|
6184 | + $longestCommonSuffix = $char.$longestCommonSuffix; |
|
6185 | 6185 | } else { |
6186 | 6186 | break; |
6187 | 6187 | } |
@@ -6200,7 +6200,7 @@ discard block |
||
6200 | 6200 | */ |
6201 | 6201 | public static function str_matches_pattern(string $str, string $pattern): bool |
6202 | 6202 | { |
6203 | - if (\preg_match('/' . $pattern . '/u', $str)) { |
|
6203 | + if (\preg_match('/'.$pattern.'/u', $str)) { |
|
6204 | 6204 | return true; |
6205 | 6205 | } |
6206 | 6206 | |
@@ -6290,7 +6290,7 @@ discard block |
||
6290 | 6290 | $pad_type = STR_PAD_BOTH; |
6291 | 6291 | } else { |
6292 | 6292 | throw new \InvalidArgumentException( |
6293 | - 'Pad expects $padType to be "STR_PAD_*" or ' . "to be one of 'left', 'right' or 'both'" |
|
6293 | + 'Pad expects $padType to be "STR_PAD_*" or '."to be one of 'left', 'right' or 'both'" |
|
6294 | 6294 | ); |
6295 | 6295 | } |
6296 | 6296 | } |
@@ -6327,7 +6327,7 @@ discard block |
||
6327 | 6327 | $pre = ''; |
6328 | 6328 | } |
6329 | 6329 | |
6330 | - return $pre . $str . $post; |
|
6330 | + return $pre.$str.$post; |
|
6331 | 6331 | } |
6332 | 6332 | |
6333 | 6333 | return $str; |
@@ -6455,7 +6455,7 @@ discard block |
||
6455 | 6455 | { |
6456 | 6456 | return self::regex_replace( |
6457 | 6457 | $str, |
6458 | - '^' . \preg_quote($search, '/'), |
|
6458 | + '^'.\preg_quote($search, '/'), |
|
6459 | 6459 | self::str_replace('\\', '\\\\', $replacement) |
6460 | 6460 | ); |
6461 | 6461 | } |
@@ -6473,7 +6473,7 @@ discard block |
||
6473 | 6473 | { |
6474 | 6474 | return self::regex_replace( |
6475 | 6475 | $str, |
6476 | - \preg_quote($search, '/') . '$', |
|
6476 | + \preg_quote($search, '/').'$', |
|
6477 | 6477 | self::str_replace('\\', '\\\\', $replacement) |
6478 | 6478 | ); |
6479 | 6479 | } |
@@ -6584,24 +6584,24 @@ discard block |
||
6584 | 6584 | |
6585 | 6585 | $str = (string)\preg_replace_callback( |
6586 | 6586 | '/([\d|A-Z])/u', |
6587 | - function ($matches) use ($encoding) { |
|
6587 | + function($matches) use ($encoding) { |
|
6588 | 6588 | $match = $matches[1]; |
6589 | 6589 | $matchInt = (int)$match; |
6590 | 6590 | |
6591 | 6591 | if ((string)$matchInt == $match) { |
6592 | - return '_' . $match . '_'; |
|
6592 | + return '_'.$match.'_'; |
|
6593 | 6593 | } |
6594 | 6594 | |
6595 | - return '_' . UTF8::strtolower($match, $encoding); |
|
6595 | + return '_'.UTF8::strtolower($match, $encoding); |
|
6596 | 6596 | }, |
6597 | 6597 | $str |
6598 | 6598 | ); |
6599 | 6599 | |
6600 | 6600 | $str = (string)\preg_replace( |
6601 | 6601 | [ |
6602 | - '/\s+/', // convert spaces to "_" |
|
6603 | - '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6604 | - '/_+/', // remove double "_" |
|
6602 | + '/\s+/', // convert spaces to "_" |
|
6603 | + '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6604 | + '/_+/', // remove double "_" |
|
6605 | 6605 | ], |
6606 | 6606 | [ |
6607 | 6607 | '_', |
@@ -6689,7 +6689,7 @@ discard block |
||
6689 | 6689 | $limit = -1; |
6690 | 6690 | } |
6691 | 6691 | |
6692 | - $array = \preg_split('/' . \preg_quote($pattern, '/') . '/u', $str, $limit); |
|
6692 | + $array = \preg_split('/'.\preg_quote($pattern, '/').'/u', $str, $limit); |
|
6693 | 6693 | |
6694 | 6694 | if ($array === false) { |
6695 | 6695 | return []; |
@@ -6977,7 +6977,7 @@ discard block |
||
6977 | 6977 | |
6978 | 6978 | $str = (string)\preg_replace_callback( |
6979 | 6979 | '/([\S]+)/u', |
6980 | - function ($match) use ($ignore, $encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
6980 | + function($match) use ($ignore, $encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
6981 | 6981 | if ($ignore && \in_array($match[0], $ignore, true)) { |
6982 | 6982 | return $match[0]; |
6983 | 6983 | } |
@@ -7058,16 +7058,16 @@ discard block |
||
7058 | 7058 | $str = (string)\preg_replace_callback( |
7059 | 7059 | '~\b (_*) (?: # 1. Leading underscore and |
7060 | 7060 | ( (?<=[ ][/\\\\]) [[:alpha:]]+ [-_[:alpha:]/\\\\]+ | # 2. file path or |
7061 | - [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx . ' ) # URL, domain, or email |
|
7061 | + [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx.' ) # URL, domain, or email |
|
7062 | 7062 | | |
7063 | - ( (?i: ' . $smallWordsRx . ' ) ' . $apostropheRx . ' ) # 3. or small word (case-insensitive) |
|
7063 | + ( (?i: ' . $smallWordsRx.' ) '.$apostropheRx.' ) # 3. or small word (case-insensitive) |
|
7064 | 7064 | | |
7065 | - ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 4. or word w/o internal caps |
|
7065 | + ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 4. or word w/o internal caps |
|
7066 | 7066 | | |
7067 | - ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 5. or some other word |
|
7067 | + ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 5. or some other word |
|
7068 | 7068 | ) (_*) \b # 6. With trailing underscore |
7069 | 7069 | ~ux', |
7070 | - function ($matches) use ($encoding) { |
|
7070 | + function($matches) use ($encoding) { |
|
7071 | 7071 | // Preserve leading underscore |
7072 | 7072 | $str = $matches[1]; |
7073 | 7073 | if ($matches[2]) { |
@@ -7096,21 +7096,21 @@ discard block |
||
7096 | 7096 | '~( \A [[:punct:]]* # start of title... |
7097 | 7097 | | [:.;?!][ ]+ # or of subsentence... |
7098 | 7098 | | [ ][\'"“‘(\[][ ]* ) # or of inserted subphrase... |
7099 | - ( ' . $smallWordsRx . ' ) \b # ...followed by small word |
|
7099 | + ( ' . $smallWordsRx.' ) \b # ...followed by small word |
|
7100 | 7100 | ~uxi', |
7101 | - function ($matches) use ($encoding) { |
|
7102 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7101 | + function($matches) use ($encoding) { |
|
7102 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7103 | 7103 | }, |
7104 | 7104 | $str |
7105 | 7105 | ); |
7106 | 7106 | |
7107 | 7107 | // ...and end of title |
7108 | 7108 | $str = (string)\preg_replace_callback( |
7109 | - '~\b ( ' . $smallWordsRx . ' ) # small word... |
|
7109 | + '~\b ( '.$smallWordsRx.' ) # small word... |
|
7110 | 7110 | (?= [[:punct:]]* \Z # ...at the end of the title... |
7111 | 7111 | | [\'"’”)\]] [ ] ) # ...or of an inserted subphrase? |
7112 | 7112 | ~uxi', |
7113 | - function ($matches) use ($encoding) { |
|
7113 | + function($matches) use ($encoding) { |
|
7114 | 7114 | return static::str_upper_first($matches[1], $encoding); |
7115 | 7115 | }, |
7116 | 7116 | $str |
@@ -7121,10 +7121,10 @@ discard block |
||
7121 | 7121 | $str = (string)\preg_replace_callback( |
7122 | 7122 | '~\b |
7123 | 7123 | (?<! -) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (in-flight) |
7124 | - ( ' . $smallWordsRx . ' ) |
|
7124 | + ( ' . $smallWordsRx.' ) |
|
7125 | 7125 | (?= -[[:alpha:]]+) # lookahead for "-someword" |
7126 | 7126 | ~uxi', |
7127 | - function ($matches) use ($encoding) { |
|
7127 | + function($matches) use ($encoding) { |
|
7128 | 7128 | return static::str_upper_first($matches[1], $encoding); |
7129 | 7129 | }, |
7130 | 7130 | $str |
@@ -7135,11 +7135,11 @@ discard block |
||
7135 | 7135 | '~\b |
7136 | 7136 | (?<!…) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (stand-in) |
7137 | 7137 | ( [[:alpha:]]+- ) # $1 = first word and hyphen, should already be properly capped |
7138 | - ( ' . $smallWordsRx . ' ) # ...followed by small word |
|
7138 | + ( ' . $smallWordsRx.' ) # ...followed by small word |
|
7139 | 7139 | (?! - ) # Negative lookahead for another - |
7140 | 7140 | ~uxi', |
7141 | - function ($matches) use ($encoding) { |
|
7142 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7141 | + function($matches) use ($encoding) { |
|
7142 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7143 | 7143 | }, |
7144 | 7144 | $str |
7145 | 7145 | ); |
@@ -7289,7 +7289,7 @@ discard block |
||
7289 | 7289 | |
7290 | 7290 | $truncated = self::substr($str, 0, $length, $encoding); |
7291 | 7291 | |
7292 | - return $truncated . $substring; |
|
7292 | + return $truncated.$substring; |
|
7293 | 7293 | } |
7294 | 7294 | |
7295 | 7295 | /** |
@@ -7331,7 +7331,7 @@ discard block |
||
7331 | 7331 | } |
7332 | 7332 | } |
7333 | 7333 | |
7334 | - $str = $truncated . $substring; |
|
7334 | + $str = $truncated.$substring; |
|
7335 | 7335 | |
7336 | 7336 | return $str; |
7337 | 7337 | } |
@@ -7486,7 +7486,7 @@ discard block |
||
7486 | 7486 | public static function strcmp(string $str1, string $str2): int |
7487 | 7487 | { |
7488 | 7488 | /** @noinspection PhpUndefinedClassInspection */ |
7489 | - return $str1 . '' === $str2 . '' ? 0 : \strcmp( |
|
7489 | + return $str1.'' === $str2.'' ? 0 : \strcmp( |
|
7490 | 7490 | \Normalizer::normalize($str1, \Normalizer::NFD), |
7491 | 7491 | \Normalizer::normalize($str2, \Normalizer::NFD) |
7492 | 7492 | ); |
@@ -7520,7 +7520,7 @@ discard block |
||
7520 | 7520 | return null; |
7521 | 7521 | } |
7522 | 7522 | |
7523 | - if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
7523 | + if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
7524 | 7524 | return self::strlen($length[1]); |
7525 | 7525 | } |
7526 | 7526 | |
@@ -7757,7 +7757,7 @@ discard block |
||
7757 | 7757 | && |
7758 | 7758 | self::$SUPPORT['mbstring'] === false |
7759 | 7759 | ) { |
7760 | - \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7760 | + \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7761 | 7761 | } |
7762 | 7762 | |
7763 | 7763 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -7779,7 +7779,7 @@ discard block |
||
7779 | 7779 | return \stristr($haystack, $needle, $before_needle); |
7780 | 7780 | } |
7781 | 7781 | |
7782 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
7782 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match); |
|
7783 | 7783 | |
7784 | 7784 | if (!isset($match[1])) { |
7785 | 7785 | return false; |
@@ -7846,7 +7846,7 @@ discard block |
||
7846 | 7846 | && |
7847 | 7847 | self::$SUPPORT['iconv'] === false |
7848 | 7848 | ) { |
7849 | - \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7849 | + \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7850 | 7850 | } |
7851 | 7851 | |
7852 | 7852 | // |
@@ -7972,7 +7972,7 @@ discard block |
||
7972 | 7972 | */ |
7973 | 7973 | public static function strnatcmp(string $str1, string $str2): int |
7974 | 7974 | { |
7975 | - return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7975 | + return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7976 | 7976 | } |
7977 | 7977 | |
7978 | 7978 | /** |
@@ -8037,7 +8037,7 @@ discard block |
||
8037 | 8037 | return false; |
8038 | 8038 | } |
8039 | 8039 | |
8040 | - if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
8040 | + if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
8041 | 8041 | return \substr($haystack, (int)\strpos($haystack, $m[0])); |
8042 | 8042 | } |
8043 | 8043 | |
@@ -8109,7 +8109,7 @@ discard block |
||
8109 | 8109 | && |
8110 | 8110 | self::$SUPPORT['mbstring'] === false |
8111 | 8111 | ) { |
8112 | - \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8112 | + \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8113 | 8113 | } |
8114 | 8114 | |
8115 | 8115 | // |
@@ -8275,7 +8275,7 @@ discard block |
||
8275 | 8275 | && |
8276 | 8276 | self::$SUPPORT['mbstring'] === false |
8277 | 8277 | ) { |
8278 | - \trigger_error('UTF8::strrchr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8278 | + \trigger_error('UTF8::strrchr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8279 | 8279 | } |
8280 | 8280 | |
8281 | 8281 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -8496,7 +8496,7 @@ discard block |
||
8496 | 8496 | && |
8497 | 8497 | self::$SUPPORT['mbstring'] === false |
8498 | 8498 | ) { |
8499 | - \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8499 | + \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8500 | 8500 | } |
8501 | 8501 | |
8502 | 8502 | // |
@@ -8643,7 +8643,7 @@ discard block |
||
8643 | 8643 | && |
8644 | 8644 | self::$SUPPORT['mbstring'] === false |
8645 | 8645 | ) { |
8646 | - \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8646 | + \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8647 | 8647 | } |
8648 | 8648 | |
8649 | 8649 | // |
@@ -8774,7 +8774,7 @@ discard block |
||
8774 | 8774 | return 0; |
8775 | 8775 | } |
8776 | 8776 | |
8777 | - return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8777 | + return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8778 | 8778 | } |
8779 | 8779 | |
8780 | 8780 | /** |
@@ -8830,7 +8830,7 @@ discard block |
||
8830 | 8830 | && |
8831 | 8831 | self::$SUPPORT['mbstring'] === false |
8832 | 8832 | ) { |
8833 | - \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8833 | + \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8834 | 8834 | } |
8835 | 8835 | |
8836 | 8836 | // |
@@ -8868,7 +8868,7 @@ discard block |
||
8868 | 8868 | // fallback via vanilla php |
8869 | 8869 | // |
8870 | 8870 | |
8871 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match); |
|
8871 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match); |
|
8872 | 8872 | |
8873 | 8873 | if (!isset($match[1])) { |
8874 | 8874 | return false; |
@@ -9006,9 +9006,9 @@ discard block |
||
9006 | 9006 | |
9007 | 9007 | if (self::$SUPPORT['intl'] === true) { |
9008 | 9008 | |
9009 | - $langCode = $lang . '-Lower'; |
|
9009 | + $langCode = $lang.'-Lower'; |
|
9010 | 9010 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9011 | - \trigger_error('UTF8::strtolower() cannot handle special language: ' . $lang, E_USER_WARNING); |
|
9011 | + \trigger_error('UTF8::strtolower() cannot handle special language: '.$lang, E_USER_WARNING); |
|
9012 | 9012 | |
9013 | 9013 | $langCode = 'Any-Lower'; |
9014 | 9014 | } |
@@ -9017,7 +9017,7 @@ discard block |
||
9017 | 9017 | return transliterator_transliterate($langCode, $str); |
9018 | 9018 | } |
9019 | 9019 | |
9020 | - \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: ' . $lang, E_USER_WARNING); |
|
9020 | + \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: '.$lang, E_USER_WARNING); |
|
9021 | 9021 | } |
9022 | 9022 | |
9023 | 9023 | // always fallback via symfony polyfill |
@@ -9082,9 +9082,9 @@ discard block |
||
9082 | 9082 | |
9083 | 9083 | if (self::$SUPPORT['intl'] === true) { |
9084 | 9084 | |
9085 | - $langCode = $lang . '-Upper'; |
|
9085 | + $langCode = $lang.'-Upper'; |
|
9086 | 9086 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9087 | - \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
9087 | + \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
9088 | 9088 | |
9089 | 9089 | $langCode = 'Any-Upper'; |
9090 | 9090 | } |
@@ -9093,7 +9093,7 @@ discard block |
||
9093 | 9093 | return transliterator_transliterate($langCode, $str); |
9094 | 9094 | } |
9095 | 9095 | |
9096 | - \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
9096 | + \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
9097 | 9097 | } |
9098 | 9098 | |
9099 | 9099 | // always fallback via symfony polyfill |
@@ -9300,7 +9300,7 @@ discard block |
||
9300 | 9300 | && |
9301 | 9301 | self::$SUPPORT['mbstring'] === false |
9302 | 9302 | ) { |
9303 | - \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9303 | + \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9304 | 9304 | } |
9305 | 9305 | |
9306 | 9306 | // |
@@ -9480,14 +9480,14 @@ discard block |
||
9480 | 9480 | && |
9481 | 9481 | self::$SUPPORT['mbstring'] === false |
9482 | 9482 | ) { |
9483 | - \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9483 | + \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9484 | 9484 | } |
9485 | 9485 | |
9486 | 9486 | if (self::$SUPPORT['mbstring'] === true) { |
9487 | 9487 | return \mb_substr_count($haystack, $needle, $encoding); |
9488 | 9488 | } |
9489 | 9489 | |
9490 | - \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
9490 | + \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
9491 | 9491 | |
9492 | 9492 | return \count($matches); |
9493 | 9493 | } |
@@ -9812,8 +9812,7 @@ discard block |
||
9812 | 9812 | |
9813 | 9813 | if (self::is_ascii($str)) { |
9814 | 9814 | return ($length === null) ? |
9815 | - \substr_replace($str, $replacement, $offset) : |
|
9816 | - \substr_replace($str, $replacement, $offset, $length); |
|
9815 | + \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length); |
|
9817 | 9816 | } |
9818 | 9817 | |
9819 | 9818 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -9839,7 +9838,7 @@ discard block |
||
9839 | 9838 | $length = $string_length - $offset; |
9840 | 9839 | } |
9841 | 9840 | |
9842 | - return self::substr($str, 0, $offset, $encoding) . $replacement . self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9841 | + return self::substr($str, 0, $offset, $encoding).$replacement.self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9843 | 9842 | } |
9844 | 9843 | |
9845 | 9844 | \preg_match_all('/./us', $str, $smatches); |
@@ -10258,9 +10257,9 @@ discard block |
||
10258 | 10257 | |
10259 | 10258 | $string = (string)\preg_replace( |
10260 | 10259 | [ |
10261 | - '/[^' . $fallback_char_escaped . '\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10262 | - '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10263 | - '/[' . $fallback_char_escaped . ']+/', // 3) remove double $fallback_char's |
|
10260 | + '/[^'.$fallback_char_escaped.'\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10261 | + '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10262 | + '/['.$fallback_char_escaped.']+/', // 3) remove double $fallback_char's |
|
10264 | 10263 | ], |
10265 | 10264 | [ |
10266 | 10265 | '', |
@@ -10361,7 +10360,7 @@ discard block |
||
10361 | 10360 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
10362 | 10361 | |
10363 | 10362 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10364 | - $buf .= $c1 . $c2; |
|
10363 | + $buf .= $c1.$c2; |
|
10365 | 10364 | $i++; |
10366 | 10365 | } else { // not valid UTF8 - convert it |
10367 | 10366 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10373,7 +10372,7 @@ discard block |
||
10373 | 10372 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
10374 | 10373 | |
10375 | 10374 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10376 | - $buf .= $c1 . $c2 . $c3; |
|
10375 | + $buf .= $c1.$c2.$c3; |
|
10377 | 10376 | $i += 2; |
10378 | 10377 | } else { // not valid UTF8 - convert it |
10379 | 10378 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10386,7 +10385,7 @@ discard block |
||
10386 | 10385 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
10387 | 10386 | |
10388 | 10387 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10389 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
10388 | + $buf .= $c1.$c2.$c3.$c4; |
|
10390 | 10389 | $i += 3; |
10391 | 10390 | } else { // not valid UTF8 - convert it |
10392 | 10391 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10408,7 +10407,7 @@ discard block |
||
10408 | 10407 | // decode unicode escape sequences |
10409 | 10408 | $buf = \preg_replace_callback( |
10410 | 10409 | '/\\\\u([0-9a-f]{4})/i', |
10411 | - function ($match) { |
|
10410 | + function($match) { |
|
10412 | 10411 | // always fallback via symfony polyfill |
10413 | 10412 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
10414 | 10413 | }, |
@@ -10451,7 +10450,7 @@ discard block |
||
10451 | 10450 | } else { |
10452 | 10451 | $cc1 = self::$CHR[$ordC1 / 64] | "\xC0"; |
10453 | 10452 | $cc2 = ((string)$input & "\x3F") | "\x80"; |
10454 | - $buf .= $cc1 . $cc2; |
|
10453 | + $buf .= $cc1.$cc2; |
|
10455 | 10454 | } |
10456 | 10455 | |
10457 | 10456 | return $buf; |
@@ -10519,7 +10518,7 @@ discard block |
||
10519 | 10518 | $tryToKeepStringLength |
10520 | 10519 | ); |
10521 | 10520 | |
10522 | - return $strPartOne . $strPartTwo; |
|
10521 | + return $strPartOne.$strPartTwo; |
|
10523 | 10522 | } |
10524 | 10523 | |
10525 | 10524 | /** |
@@ -10564,7 +10563,7 @@ discard block |
||
10564 | 10563 | $str = self::clean($str); |
10565 | 10564 | } |
10566 | 10565 | |
10567 | - $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions)); |
|
10566 | + $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions)); |
|
10568 | 10567 | |
10569 | 10568 | if ( |
10570 | 10569 | $usePhpDefaultFunctions === true |
@@ -11068,7 +11067,7 @@ discard block |
||
11068 | 11067 | return ''; |
11069 | 11068 | } |
11070 | 11069 | |
11071 | - \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
11070 | + \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
11072 | 11071 | |
11073 | 11072 | if ( |
11074 | 11073 | !isset($matches[0]) |
@@ -11078,7 +11077,7 @@ discard block |
||
11078 | 11077 | return $str; |
11079 | 11078 | } |
11080 | 11079 | |
11081 | - return self::rtrim($matches[0]) . $strAddOn; |
|
11080 | + return self::rtrim($matches[0]).$strAddOn; |
|
11082 | 11081 | } |
11083 | 11082 | |
11084 | 11083 | /** |
@@ -11149,7 +11148,7 @@ discard block |
||
11149 | 11148 | $strReturn .= $break; |
11150 | 11149 | } |
11151 | 11150 | |
11152 | - return $strReturn . \implode('', $chars); |
|
11151 | + return $strReturn.\implode('', $chars); |
|
11153 | 11152 | } |
11154 | 11153 | |
11155 | 11154 | /** |