@@ -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 []; |
@@ -7068,16 +7068,16 @@ discard block |
||
7068 | 7068 | $str = (string)\preg_replace_callback( |
7069 | 7069 | '~\b (_*) (?: # 1. Leading underscore and |
7070 | 7070 | ( (?<=[ ][/\\\\]) [[:alpha:]]+ [-_[:alpha:]/\\\\]+ | # 2. file path or |
7071 | - [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx . ' ) # URL, domain, or email |
|
7071 | + [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx.' ) # URL, domain, or email |
|
7072 | 7072 | | |
7073 | - ( (?i: ' . $smallWordsRx . ' ) ' . $apostropheRx . ' ) # 3. or small word (case-insensitive) |
|
7073 | + ( (?i: ' . $smallWordsRx.' ) '.$apostropheRx.' ) # 3. or small word (case-insensitive) |
|
7074 | 7074 | | |
7075 | - ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 4. or word w/o internal caps |
|
7075 | + ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 4. or word w/o internal caps |
|
7076 | 7076 | | |
7077 | - ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 5. or some other word |
|
7077 | + ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 5. or some other word |
|
7078 | 7078 | ) (_*) \b # 6. With trailing underscore |
7079 | 7079 | ~ux', |
7080 | - function ($matches) use ($encoding) { |
|
7080 | + function($matches) use ($encoding) { |
|
7081 | 7081 | // Preserve leading underscore |
7082 | 7082 | $str = $matches[1]; |
7083 | 7083 | if ($matches[2]) { |
@@ -7106,21 +7106,21 @@ discard block |
||
7106 | 7106 | '~( \A [[:punct:]]* # start of title... |
7107 | 7107 | | [:.;?!][ ]+ # or of subsentence... |
7108 | 7108 | | [ ][\'"“‘(\[][ ]* ) # or of inserted subphrase... |
7109 | - ( ' . $smallWordsRx . ' ) \b # ...followed by small word |
|
7109 | + ( ' . $smallWordsRx.' ) \b # ...followed by small word |
|
7110 | 7110 | ~uxi', |
7111 | - function ($matches) use ($encoding) { |
|
7112 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7111 | + function($matches) use ($encoding) { |
|
7112 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7113 | 7113 | }, |
7114 | 7114 | $str |
7115 | 7115 | ); |
7116 | 7116 | |
7117 | 7117 | // ...and end of title |
7118 | 7118 | $str = (string)\preg_replace_callback( |
7119 | - '~\b ( ' . $smallWordsRx . ' ) # small word... |
|
7119 | + '~\b ( '.$smallWordsRx.' ) # small word... |
|
7120 | 7120 | (?= [[:punct:]]* \Z # ...at the end of the title... |
7121 | 7121 | | [\'"’”)\]] [ ] ) # ...or of an inserted subphrase? |
7122 | 7122 | ~uxi', |
7123 | - function ($matches) use ($encoding) { |
|
7123 | + function($matches) use ($encoding) { |
|
7124 | 7124 | return static::str_upper_first($matches[1], $encoding); |
7125 | 7125 | }, |
7126 | 7126 | $str |
@@ -7131,10 +7131,10 @@ discard block |
||
7131 | 7131 | $str = (string)\preg_replace_callback( |
7132 | 7132 | '~\b |
7133 | 7133 | (?<! -) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (in-flight) |
7134 | - ( ' . $smallWordsRx . ' ) |
|
7134 | + ( ' . $smallWordsRx.' ) |
|
7135 | 7135 | (?= -[[:alpha:]]+) # lookahead for "-someword" |
7136 | 7136 | ~uxi', |
7137 | - function ($matches) use ($encoding) { |
|
7137 | + function($matches) use ($encoding) { |
|
7138 | 7138 | return static::str_upper_first($matches[1], $encoding); |
7139 | 7139 | }, |
7140 | 7140 | $str |
@@ -7145,11 +7145,11 @@ discard block |
||
7145 | 7145 | '~\b |
7146 | 7146 | (?<!…) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (stand-in) |
7147 | 7147 | ( [[:alpha:]]+- ) # $1 = first word and hyphen, should already be properly capped |
7148 | - ( ' . $smallWordsRx . ' ) # ...followed by small word |
|
7148 | + ( ' . $smallWordsRx.' ) # ...followed by small word |
|
7149 | 7149 | (?! - ) # Negative lookahead for another - |
7150 | 7150 | ~uxi', |
7151 | - function ($matches) use ($encoding) { |
|
7152 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7151 | + function($matches) use ($encoding) { |
|
7152 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7153 | 7153 | }, |
7154 | 7154 | $str |
7155 | 7155 | ); |
@@ -7299,7 +7299,7 @@ discard block |
||
7299 | 7299 | |
7300 | 7300 | $truncated = self::substr($str, 0, $length, $encoding); |
7301 | 7301 | |
7302 | - return $truncated . $substring; |
|
7302 | + return $truncated.$substring; |
|
7303 | 7303 | } |
7304 | 7304 | |
7305 | 7305 | /** |
@@ -7341,7 +7341,7 @@ discard block |
||
7341 | 7341 | } |
7342 | 7342 | } |
7343 | 7343 | |
7344 | - $str = $truncated . $substring; |
|
7344 | + $str = $truncated.$substring; |
|
7345 | 7345 | |
7346 | 7346 | return $str; |
7347 | 7347 | } |
@@ -7496,7 +7496,7 @@ discard block |
||
7496 | 7496 | public static function strcmp(string $str1, string $str2): int |
7497 | 7497 | { |
7498 | 7498 | /** @noinspection PhpUndefinedClassInspection */ |
7499 | - return $str1 . '' === $str2 . '' ? 0 : \strcmp( |
|
7499 | + return $str1.'' === $str2.'' ? 0 : \strcmp( |
|
7500 | 7500 | \Normalizer::normalize($str1, \Normalizer::NFD), |
7501 | 7501 | \Normalizer::normalize($str2, \Normalizer::NFD) |
7502 | 7502 | ); |
@@ -7530,7 +7530,7 @@ discard block |
||
7530 | 7530 | return null; |
7531 | 7531 | } |
7532 | 7532 | |
7533 | - if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
7533 | + if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
7534 | 7534 | return self::strlen($length[1]); |
7535 | 7535 | } |
7536 | 7536 | |
@@ -7767,7 +7767,7 @@ discard block |
||
7767 | 7767 | && |
7768 | 7768 | self::$SUPPORT['mbstring'] === false |
7769 | 7769 | ) { |
7770 | - \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7770 | + \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7771 | 7771 | } |
7772 | 7772 | |
7773 | 7773 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -7789,7 +7789,7 @@ discard block |
||
7789 | 7789 | return \stristr($haystack, $needle, $before_needle); |
7790 | 7790 | } |
7791 | 7791 | |
7792 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
7792 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match); |
|
7793 | 7793 | |
7794 | 7794 | if (!isset($match[1])) { |
7795 | 7795 | return false; |
@@ -7856,7 +7856,7 @@ discard block |
||
7856 | 7856 | && |
7857 | 7857 | self::$SUPPORT['iconv'] === false |
7858 | 7858 | ) { |
7859 | - \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7859 | + \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7860 | 7860 | } |
7861 | 7861 | |
7862 | 7862 | // |
@@ -7982,7 +7982,7 @@ discard block |
||
7982 | 7982 | */ |
7983 | 7983 | public static function strnatcmp(string $str1, string $str2): int |
7984 | 7984 | { |
7985 | - return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7985 | + return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7986 | 7986 | } |
7987 | 7987 | |
7988 | 7988 | /** |
@@ -8047,7 +8047,7 @@ discard block |
||
8047 | 8047 | return false; |
8048 | 8048 | } |
8049 | 8049 | |
8050 | - if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
8050 | + if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
8051 | 8051 | return \substr($haystack, (int)\strpos($haystack, $m[0])); |
8052 | 8052 | } |
8053 | 8053 | |
@@ -8119,7 +8119,7 @@ discard block |
||
8119 | 8119 | && |
8120 | 8120 | self::$SUPPORT['mbstring'] === false |
8121 | 8121 | ) { |
8122 | - \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8122 | + \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8123 | 8123 | } |
8124 | 8124 | |
8125 | 8125 | // |
@@ -8285,7 +8285,7 @@ discard block |
||
8285 | 8285 | && |
8286 | 8286 | self::$SUPPORT['mbstring'] === false |
8287 | 8287 | ) { |
8288 | - \trigger_error('UTF8::strrchr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8288 | + \trigger_error('UTF8::strrchr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8289 | 8289 | } |
8290 | 8290 | |
8291 | 8291 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -8506,7 +8506,7 @@ discard block |
||
8506 | 8506 | && |
8507 | 8507 | self::$SUPPORT['mbstring'] === false |
8508 | 8508 | ) { |
8509 | - \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8509 | + \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8510 | 8510 | } |
8511 | 8511 | |
8512 | 8512 | // |
@@ -8653,7 +8653,7 @@ discard block |
||
8653 | 8653 | && |
8654 | 8654 | self::$SUPPORT['mbstring'] === false |
8655 | 8655 | ) { |
8656 | - \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8656 | + \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8657 | 8657 | } |
8658 | 8658 | |
8659 | 8659 | // |
@@ -8784,7 +8784,7 @@ discard block |
||
8784 | 8784 | return 0; |
8785 | 8785 | } |
8786 | 8786 | |
8787 | - return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8787 | + return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8788 | 8788 | } |
8789 | 8789 | |
8790 | 8790 | /** |
@@ -8840,7 +8840,7 @@ discard block |
||
8840 | 8840 | && |
8841 | 8841 | self::$SUPPORT['mbstring'] === false |
8842 | 8842 | ) { |
8843 | - \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8843 | + \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8844 | 8844 | } |
8845 | 8845 | |
8846 | 8846 | // |
@@ -8878,7 +8878,7 @@ discard block |
||
8878 | 8878 | // fallback via vanilla php |
8879 | 8879 | // |
8880 | 8880 | |
8881 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match); |
|
8881 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match); |
|
8882 | 8882 | |
8883 | 8883 | if (!isset($match[1])) { |
8884 | 8884 | return false; |
@@ -9016,9 +9016,9 @@ discard block |
||
9016 | 9016 | |
9017 | 9017 | if (self::$SUPPORT['intl'] === true) { |
9018 | 9018 | |
9019 | - $langCode = $lang . '-Lower'; |
|
9019 | + $langCode = $lang.'-Lower'; |
|
9020 | 9020 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9021 | - \trigger_error('UTF8::strtolower() cannot handle special language: ' . $lang, E_USER_WARNING); |
|
9021 | + \trigger_error('UTF8::strtolower() cannot handle special language: '.$lang, E_USER_WARNING); |
|
9022 | 9022 | |
9023 | 9023 | $langCode = 'Any-Lower'; |
9024 | 9024 | } |
@@ -9027,7 +9027,7 @@ discard block |
||
9027 | 9027 | return transliterator_transliterate($langCode, $str); |
9028 | 9028 | } |
9029 | 9029 | |
9030 | - \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: ' . $lang, E_USER_WARNING); |
|
9030 | + \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: '.$lang, E_USER_WARNING); |
|
9031 | 9031 | } |
9032 | 9032 | |
9033 | 9033 | // always fallback via symfony polyfill |
@@ -9092,9 +9092,9 @@ discard block |
||
9092 | 9092 | |
9093 | 9093 | if (self::$SUPPORT['intl'] === true) { |
9094 | 9094 | |
9095 | - $langCode = $lang . '-Upper'; |
|
9095 | + $langCode = $lang.'-Upper'; |
|
9096 | 9096 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9097 | - \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
9097 | + \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
9098 | 9098 | |
9099 | 9099 | $langCode = 'Any-Upper'; |
9100 | 9100 | } |
@@ -9103,7 +9103,7 @@ discard block |
||
9103 | 9103 | return transliterator_transliterate($langCode, $str); |
9104 | 9104 | } |
9105 | 9105 | |
9106 | - \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
9106 | + \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
9107 | 9107 | } |
9108 | 9108 | |
9109 | 9109 | // always fallback via symfony polyfill |
@@ -9310,7 +9310,7 @@ discard block |
||
9310 | 9310 | && |
9311 | 9311 | self::$SUPPORT['mbstring'] === false |
9312 | 9312 | ) { |
9313 | - \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9313 | + \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9314 | 9314 | } |
9315 | 9315 | |
9316 | 9316 | // |
@@ -9490,14 +9490,14 @@ discard block |
||
9490 | 9490 | && |
9491 | 9491 | self::$SUPPORT['mbstring'] === false |
9492 | 9492 | ) { |
9493 | - \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9493 | + \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9494 | 9494 | } |
9495 | 9495 | |
9496 | 9496 | if (self::$SUPPORT['mbstring'] === true) { |
9497 | 9497 | return \mb_substr_count($haystack, $needle, $encoding); |
9498 | 9498 | } |
9499 | 9499 | |
9500 | - \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
9500 | + \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
9501 | 9501 | |
9502 | 9502 | return \count($matches); |
9503 | 9503 | } |
@@ -9822,8 +9822,7 @@ discard block |
||
9822 | 9822 | |
9823 | 9823 | if (self::is_ascii($str)) { |
9824 | 9824 | return ($length === null) ? |
9825 | - \substr_replace($str, $replacement, $offset) : |
|
9826 | - \substr_replace($str, $replacement, $offset, $length); |
|
9825 | + \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length); |
|
9827 | 9826 | } |
9828 | 9827 | |
9829 | 9828 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -9849,7 +9848,7 @@ discard block |
||
9849 | 9848 | $length = $string_length - $offset; |
9850 | 9849 | } |
9851 | 9850 | |
9852 | - return self::substr($str, 0, $offset, $encoding) . $replacement . self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9851 | + return self::substr($str, 0, $offset, $encoding).$replacement.self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9853 | 9852 | } |
9854 | 9853 | |
9855 | 9854 | \preg_match_all('/./us', $str, $smatches); |
@@ -10270,9 +10269,9 @@ discard block |
||
10270 | 10269 | |
10271 | 10270 | $string = (string)\preg_replace( |
10272 | 10271 | [ |
10273 | - '/[^' . $fallback_char_escaped . '\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10274 | - '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10275 | - '/[' . $fallback_char_escaped . ']+/', // 3) remove double $fallback_char's |
|
10272 | + '/[^'.$fallback_char_escaped.'\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10273 | + '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10274 | + '/['.$fallback_char_escaped.']+/', // 3) remove double $fallback_char's |
|
10276 | 10275 | ], |
10277 | 10276 | [ |
10278 | 10277 | '', |
@@ -10373,7 +10372,7 @@ discard block |
||
10373 | 10372 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
10374 | 10373 | |
10375 | 10374 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10376 | - $buf .= $c1 . $c2; |
|
10375 | + $buf .= $c1.$c2; |
|
10377 | 10376 | $i++; |
10378 | 10377 | } else { // not valid UTF8 - convert it |
10379 | 10378 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10385,7 +10384,7 @@ discard block |
||
10385 | 10384 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
10386 | 10385 | |
10387 | 10386 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10388 | - $buf .= $c1 . $c2 . $c3; |
|
10387 | + $buf .= $c1.$c2.$c3; |
|
10389 | 10388 | $i += 2; |
10390 | 10389 | } else { // not valid UTF8 - convert it |
10391 | 10390 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10398,7 +10397,7 @@ discard block |
||
10398 | 10397 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
10399 | 10398 | |
10400 | 10399 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10401 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
10400 | + $buf .= $c1.$c2.$c3.$c4; |
|
10402 | 10401 | $i += 3; |
10403 | 10402 | } else { // not valid UTF8 - convert it |
10404 | 10403 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10420,7 +10419,7 @@ discard block |
||
10420 | 10419 | // decode unicode escape sequences |
10421 | 10420 | $buf = \preg_replace_callback( |
10422 | 10421 | '/\\\\u([0-9a-f]{4})/i', |
10423 | - function ($match) { |
|
10422 | + function($match) { |
|
10424 | 10423 | // always fallback via symfony polyfill |
10425 | 10424 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
10426 | 10425 | }, |
@@ -10463,7 +10462,7 @@ discard block |
||
10463 | 10462 | } else { |
10464 | 10463 | $cc1 = self::$CHR[$ordC1 / 64] | "\xC0"; |
10465 | 10464 | $cc2 = ((string)$input & "\x3F") | "\x80"; |
10466 | - $buf .= $cc1 . $cc2; |
|
10465 | + $buf .= $cc1.$cc2; |
|
10467 | 10466 | } |
10468 | 10467 | |
10469 | 10468 | return $buf; |
@@ -10531,7 +10530,7 @@ discard block |
||
10531 | 10530 | $tryToKeepStringLength |
10532 | 10531 | ); |
10533 | 10532 | |
10534 | - return $strPartOne . $strPartTwo; |
|
10533 | + return $strPartOne.$strPartTwo; |
|
10535 | 10534 | } |
10536 | 10535 | |
10537 | 10536 | /** |
@@ -10576,7 +10575,7 @@ discard block |
||
10576 | 10575 | $str = self::clean($str); |
10577 | 10576 | } |
10578 | 10577 | |
10579 | - $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions)); |
|
10578 | + $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions)); |
|
10580 | 10579 | |
10581 | 10580 | if ( |
10582 | 10581 | $usePhpDefaultFunctions === true |
@@ -11080,7 +11079,7 @@ discard block |
||
11080 | 11079 | return ''; |
11081 | 11080 | } |
11082 | 11081 | |
11083 | - \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
11082 | + \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
11084 | 11083 | |
11085 | 11084 | if ( |
11086 | 11085 | !isset($matches[0]) |
@@ -11090,7 +11089,7 @@ discard block |
||
11090 | 11089 | return $str; |
11091 | 11090 | } |
11092 | 11091 | |
11093 | - return self::rtrim($matches[0]) . $strAddOn; |
|
11092 | + return self::rtrim($matches[0]).$strAddOn; |
|
11094 | 11093 | } |
11095 | 11094 | |
11096 | 11095 | /** |
@@ -11161,7 +11160,7 @@ discard block |
||
11161 | 11160 | $strReturn .= $break; |
11162 | 11161 | } |
11163 | 11162 | |
11164 | - return $strReturn . \implode('', $chars); |
|
11163 | + return $strReturn.\implode('', $chars); |
|
11165 | 11164 | } |
11166 | 11165 | |
11167 | 11166 | /** |