@@ -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 | /** |
@@ -1114,7 +1114,7 @@ discard block |
||
1114 | 1114 | && |
1115 | 1115 | self::$SUPPORT['mbstring'] === false |
1116 | 1116 | ) { |
1117 | - \trigger_error('UTF8::encode() without mbstring cannot handle "' . $toEncoding . '" encoding', E_USER_WARNING); |
|
1117 | + \trigger_error('UTF8::encode() without mbstring cannot handle "'.$toEncoding.'" encoding', E_USER_WARNING); |
|
1118 | 1118 | } |
1119 | 1119 | |
1120 | 1120 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -1134,7 +1134,7 @@ discard block |
||
1134 | 1134 | } |
1135 | 1135 | } |
1136 | 1136 | |
1137 | - $return = \iconv($fromEncoding, $toEncoding . '//IGNORE', $str); |
|
1137 | + $return = \iconv($fromEncoding, $toEncoding.'//IGNORE', $str); |
|
1138 | 1138 | if ($return !== false) { |
1139 | 1139 | return $return; |
1140 | 1140 | } |
@@ -1230,7 +1230,7 @@ discard block |
||
1230 | 1230 | return ''; |
1231 | 1231 | } |
1232 | 1232 | |
1233 | - return \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1233 | + return \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1234 | 1234 | } |
1235 | 1235 | |
1236 | 1236 | return $str; |
@@ -1266,14 +1266,14 @@ discard block |
||
1266 | 1266 | if (!$pos_end || $pos_end <= 0) { |
1267 | 1267 | $strSub = self::substr($str, $pos_start, self::strlen($str), $encoding); |
1268 | 1268 | if ($strSub !== false) { |
1269 | - $extract = $replacerForSkippedText . \ltrim($strSub, $trimChars); |
|
1269 | + $extract = $replacerForSkippedText.\ltrim($strSub, $trimChars); |
|
1270 | 1270 | } else { |
1271 | 1271 | $extract = ''; |
1272 | 1272 | } |
1273 | 1273 | } else { |
1274 | 1274 | $strSub = self::substr($str, $pos_start, $pos_end, $encoding); |
1275 | 1275 | if ($strSub !== false) { |
1276 | - $extract = $replacerForSkippedText . \trim($strSub, $trimChars) . $replacerForSkippedText; |
|
1276 | + $extract = $replacerForSkippedText.\trim($strSub, $trimChars).$replacerForSkippedText; |
|
1277 | 1277 | } else { |
1278 | 1278 | $extract = ''; |
1279 | 1279 | } |
@@ -1296,7 +1296,7 @@ discard block |
||
1296 | 1296 | if ($pos_end) { |
1297 | 1297 | $strSub = self::substr($str, 0, $pos_end, $encoding); |
1298 | 1298 | if ($strSub !== false) { |
1299 | - $extract = \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1299 | + $extract = \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1300 | 1300 | } else { |
1301 | 1301 | $extract = ''; |
1302 | 1302 | } |
@@ -1417,7 +1417,7 @@ discard block |
||
1417 | 1417 | { |
1418 | 1418 | $file_content = \file_get_contents($file_path); |
1419 | 1419 | if ($file_content === false) { |
1420 | - throw new \RuntimeException('file_get_contents() returned false for:' . $file_path); |
|
1420 | + throw new \RuntimeException('file_get_contents() returned false for:'.$file_path); |
|
1421 | 1421 | } |
1422 | 1422 | |
1423 | 1423 | return self::string_has_bom($file_content); |
@@ -1477,7 +1477,7 @@ discard block |
||
1477 | 1477 | ) { |
1478 | 1478 | // Prevent leading combining chars |
1479 | 1479 | // for NFC-safe concatenations. |
1480 | - $var = $leading_combining . $var; |
|
1480 | + $var = $leading_combining.$var; |
|
1481 | 1481 | } |
1482 | 1482 | } |
1483 | 1483 | |
@@ -1972,7 +1972,7 @@ discard block |
||
1972 | 1972 | */ |
1973 | 1973 | private static function getData(string $file) |
1974 | 1974 | { |
1975 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
1975 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
1976 | 1976 | if (\file_exists($file)) { |
1977 | 1977 | /** @noinspection PhpIncludeInspection */ |
1978 | 1978 | return require $file; |
@@ -2025,7 +2025,7 @@ discard block |
||
2025 | 2025 | } |
2026 | 2026 | |
2027 | 2027 | $str_info = \unpack("C2chars", $str_info); |
2028 | - $type_code = (int)($str_info['chars1'] . $str_info['chars2']); |
|
2028 | + $type_code = (int)($str_info['chars1'].$str_info['chars2']); |
|
2029 | 2029 | |
2030 | 2030 | // DEBUG |
2031 | 2031 | //var_dump($type_code); |
@@ -2118,16 +2118,16 @@ discard block |
||
2118 | 2118 | */ |
2119 | 2119 | public static function get_unique_string($entropyExtra = '', bool $md5 = true): string |
2120 | 2120 | { |
2121 | - $uniqueHelper = \mt_rand() . |
|
2122 | - \session_id() . |
|
2123 | - ($_SERVER['REMOTE_ADDR'] ?? '') . |
|
2124 | - ($_SERVER['SERVER_ADDR'] ?? '') . |
|
2121 | + $uniqueHelper = \mt_rand(). |
|
2122 | + \session_id(). |
|
2123 | + ($_SERVER['REMOTE_ADDR'] ?? ''). |
|
2124 | + ($_SERVER['SERVER_ADDR'] ?? ''). |
|
2125 | 2125 | $entropyExtra; |
2126 | 2126 | |
2127 | 2127 | $uniqueString = \uniqid($uniqueHelper, true); |
2128 | 2128 | |
2129 | 2129 | if ($md5) { |
2130 | - $uniqueString = \md5($uniqueString . $uniqueHelper); |
|
2130 | + $uniqueString = \md5($uniqueString.$uniqueHelper); |
|
2131 | 2131 | } |
2132 | 2132 | |
2133 | 2133 | return $uniqueString; |
@@ -2272,7 +2272,7 @@ discard block |
||
2272 | 2272 | return \implode( |
2273 | 2273 | '', |
2274 | 2274 | \array_map( |
2275 | - function ($data) use ($keepAsciiChars, $encoding) { |
|
2275 | + function($data) use ($keepAsciiChars, $encoding) { |
|
2276 | 2276 | return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding); |
2277 | 2277 | }, |
2278 | 2278 | self::split($str) |
@@ -2388,7 +2388,7 @@ discard block |
||
2388 | 2388 | && |
2389 | 2389 | self::$SUPPORT['mbstring'] === false |
2390 | 2390 | ) { |
2391 | - \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
2391 | + \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
2392 | 2392 | } |
2393 | 2393 | |
2394 | 2394 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -2411,7 +2411,7 @@ discard block |
||
2411 | 2411 | |
2412 | 2412 | $str = (string)\preg_replace_callback( |
2413 | 2413 | "/&#\d{2,6};/", |
2414 | - function ($matches) use ($encoding) { |
|
2414 | + function($matches) use ($encoding) { |
|
2415 | 2415 | // always fallback via symfony polyfill |
2416 | 2416 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2417 | 2417 | |
@@ -2754,9 +2754,9 @@ discard block |
||
2754 | 2754 | { |
2755 | 2755 | $hex = \dechex($int); |
2756 | 2756 | |
2757 | - $hex = (\strlen($hex) < 4 ? \substr('0000' . $hex, -4) : $hex); |
|
2757 | + $hex = (\strlen($hex) < 4 ? \substr('0000'.$hex, -4) : $hex); |
|
2758 | 2758 | |
2759 | - return $pfix . $hex . ''; |
|
2759 | + return $pfix.$hex.''; |
|
2760 | 2760 | } |
2761 | 2761 | |
2762 | 2762 | /** |
@@ -3693,7 +3693,7 @@ discard block |
||
3693 | 3693 | $cleanUtf8 |
3694 | 3694 | ); |
3695 | 3695 | |
3696 | - return $strPartOne . $strPartTwo; |
|
3696 | + return $strPartOne.$strPartTwo; |
|
3697 | 3697 | } |
3698 | 3698 | |
3699 | 3699 | /** |
@@ -4168,7 +4168,7 @@ discard block |
||
4168 | 4168 | } |
4169 | 4169 | } |
4170 | 4170 | |
4171 | - $cacheKey = $chr_orig . $encoding; |
|
4171 | + $cacheKey = $chr_orig.$encoding; |
|
4172 | 4172 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
4173 | 4173 | return $CHAR_CACHE[$cacheKey]; |
4174 | 4174 | } |
@@ -4421,7 +4421,7 @@ discard block |
||
4421 | 4421 | } |
4422 | 4422 | |
4423 | 4423 | $str = (string)\preg_replace( |
4424 | - $delimiter . $pattern . $delimiter . 'u' . $options, |
|
4424 | + $delimiter.$pattern.$delimiter.'u'.$options, |
|
4425 | 4425 | $replacement, |
4426 | 4426 | $str |
4427 | 4427 | ); |
@@ -4492,7 +4492,7 @@ discard block |
||
4492 | 4492 | if (\is_array($what) === true) { |
4493 | 4493 | /** @noinspection ForeachSourceInspection */ |
4494 | 4494 | foreach ($what as $item) { |
4495 | - $str = (string)\preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str); |
|
4495 | + $str = (string)\preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str); |
|
4496 | 4496 | } |
4497 | 4497 | } |
4498 | 4498 | |
@@ -4740,7 +4740,7 @@ discard block |
||
4740 | 4740 | { |
4741 | 4741 | static $RX_CLASSS_CACHE = []; |
4742 | 4742 | |
4743 | - $cacheKey = $s . $class; |
|
4743 | + $cacheKey = $s.$class; |
|
4744 | 4744 | |
4745 | 4745 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4746 | 4746 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4752,7 +4752,7 @@ discard block |
||
4752 | 4752 | /** @noinspection SuspiciousLoopInspection */ |
4753 | 4753 | foreach (self::str_split($s) as $s) { |
4754 | 4754 | if ('-' === $s) { |
4755 | - $class[0] = '-' . $class[0]; |
|
4755 | + $class[0] = '-'.$class[0]; |
|
4756 | 4756 | } elseif (!isset($s[2])) { |
4757 | 4757 | $class[0] .= \preg_quote($s, '/'); |
4758 | 4758 | } elseif (1 === self::strlen($s)) { |
@@ -4763,13 +4763,13 @@ discard block |
||
4763 | 4763 | } |
4764 | 4764 | |
4765 | 4765 | if ($class[0]) { |
4766 | - $class[0] = '[' . $class[0] . ']'; |
|
4766 | + $class[0] = '['.$class[0].']'; |
|
4767 | 4767 | } |
4768 | 4768 | |
4769 | 4769 | if (1 === \count($class)) { |
4770 | 4770 | $return = $class[0]; |
4771 | 4771 | } else { |
4772 | - $return = '(?:' . \implode('|', $class) . ')'; |
|
4772 | + $return = '(?:'.\implode('|', $class).')'; |
|
4773 | 4773 | } |
4774 | 4774 | |
4775 | 4775 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4788,7 +4788,7 @@ discard block |
||
4788 | 4788 | |
4789 | 4789 | echo '<pre>'; |
4790 | 4790 | foreach (self::$SUPPORT as $key => $value) { |
4791 | - echo $key . ' - ' . \print_r($value, true) . "\n<br>"; |
|
4791 | + echo $key.' - '.\print_r($value, true)."\n<br>"; |
|
4792 | 4792 | } |
4793 | 4793 | echo '</pre>'; |
4794 | 4794 | } |
@@ -4820,7 +4820,7 @@ discard block |
||
4820 | 4820 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4821 | 4821 | } |
4822 | 4822 | |
4823 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4823 | + return '&#'.self::ord($char, $encoding).';'; |
|
4824 | 4824 | } |
4825 | 4825 | |
4826 | 4826 | /** |
@@ -4895,7 +4895,7 @@ discard block |
||
4895 | 4895 | ) { |
4896 | 4896 | |
4897 | 4897 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4898 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4898 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4899 | 4899 | |
4900 | 4900 | $i++; |
4901 | 4901 | } |
@@ -4911,7 +4911,7 @@ discard block |
||
4911 | 4911 | && |
4912 | 4912 | ($str[$i + 2] & "\xC0") === "\x80" |
4913 | 4913 | ) { |
4914 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4914 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4915 | 4915 | |
4916 | 4916 | $i += 2; |
4917 | 4917 | } |
@@ -4929,7 +4929,7 @@ discard block |
||
4929 | 4929 | && |
4930 | 4930 | ($str[$i + 3] & "\xC0") === "\x80" |
4931 | 4931 | ) { |
4932 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4932 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4933 | 4933 | |
4934 | 4934 | $i += 3; |
4935 | 4935 | } |
@@ -4942,7 +4942,7 @@ discard block |
||
4942 | 4942 | $ret = \array_chunk($ret, $length); |
4943 | 4943 | |
4944 | 4944 | return \array_map( |
4945 | - function ($item) { |
|
4945 | + function($item) { |
|
4946 | 4946 | return \implode('', $item); |
4947 | 4947 | }, $ret |
4948 | 4948 | ); |
@@ -4972,7 +4972,7 @@ discard block |
||
4972 | 4972 | |
4973 | 4973 | $str = (string)\preg_replace_callback( |
4974 | 4974 | '/[-_\s]+(.)?/u', |
4975 | - function ($match) use ($encoding) { |
|
4975 | + function($match) use ($encoding) { |
|
4976 | 4976 | if (isset($match[1])) { |
4977 | 4977 | return UTF8::strtoupper($match[1], $encoding); |
4978 | 4978 | } |
@@ -4984,7 +4984,7 @@ discard block |
||
4984 | 4984 | |
4985 | 4985 | $str = (string)\preg_replace_callback( |
4986 | 4986 | '/[\d]+(.)?/u', |
4987 | - function ($match) use ($encoding) { |
|
4987 | + function($match) use ($encoding) { |
|
4988 | 4988 | return UTF8::strtoupper($match[0], $encoding); |
4989 | 4989 | }, |
4990 | 4990 | $str |
@@ -5351,7 +5351,7 @@ discard block |
||
5351 | 5351 | foreach (self::$ENCODINGS as $encodingTmp) { |
5352 | 5352 | # INFO: //IGNORE but still throw notice |
5353 | 5353 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
5354 | - if ((string)@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str) === $str) { |
|
5354 | + if ((string)@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str) === $str) { |
|
5355 | 5355 | return $encodingTmp; |
5356 | 5356 | } |
5357 | 5357 | } |
@@ -5413,7 +5413,7 @@ discard block |
||
5413 | 5413 | public static function str_ensure_left(string $str, string $substring): string |
5414 | 5414 | { |
5415 | 5415 | if (!self::str_starts_with($str, $substring)) { |
5416 | - $str = $substring . $str; |
|
5416 | + $str = $substring.$str; |
|
5417 | 5417 | } |
5418 | 5418 | |
5419 | 5419 | return $str; |
@@ -5622,7 +5622,7 @@ discard block |
||
5622 | 5622 | $start = self::substr($str, 0, $index, $encoding); |
5623 | 5623 | $end = self::substr($str, $index, $len, $encoding); |
5624 | 5624 | |
5625 | - return $start . $substring . $end; |
|
5625 | + return $start.$substring.$end; |
|
5626 | 5626 | } |
5627 | 5627 | |
5628 | 5628 | /** |
@@ -5659,7 +5659,7 @@ discard block |
||
5659 | 5659 | if ('' === $s .= '') { |
5660 | 5660 | $s = '/^(?<=.)$/'; |
5661 | 5661 | } else { |
5662 | - $s = '/' . \preg_quote($s, '/') . '/ui'; |
|
5662 | + $s = '/'.\preg_quote($s, '/').'/ui'; |
|
5663 | 5663 | } |
5664 | 5664 | } |
5665 | 5665 | |
@@ -5942,7 +5942,7 @@ discard block |
||
5942 | 5942 | return $str; |
5943 | 5943 | } |
5944 | 5944 | |
5945 | - return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding) . $strAddOn; |
|
5945 | + return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding).$strAddOn; |
|
5946 | 5946 | } |
5947 | 5947 | |
5948 | 5948 | /** |
@@ -5970,7 +5970,7 @@ discard block |
||
5970 | 5970 | } |
5971 | 5971 | |
5972 | 5972 | if (self::substr($str, $length - 1, 1, $encoding) === ' ') { |
5973 | - return self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
5973 | + return self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
5974 | 5974 | } |
5975 | 5975 | |
5976 | 5976 | $str = (string)self::substr($str, 0, $length, $encoding); |
@@ -5979,9 +5979,9 @@ discard block |
||
5979 | 5979 | $new_str = \implode(' ', $array); |
5980 | 5980 | |
5981 | 5981 | if ($new_str === '') { |
5982 | - $str = self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
5982 | + $str = self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
5983 | 5983 | } else { |
5984 | - $str = $new_str . $strAddOn; |
|
5984 | + $str = $new_str.$strAddOn; |
|
5985 | 5985 | } |
5986 | 5986 | |
5987 | 5987 | return $str; |
@@ -6084,7 +6084,7 @@ discard block |
||
6084 | 6084 | $char = self::substr($str, -$i, 1, $encoding); |
6085 | 6085 | |
6086 | 6086 | if ($char == self::substr($otherStr, -$i, 1, $encoding)) { |
6087 | - $longestCommonSuffix = $char . $longestCommonSuffix; |
|
6087 | + $longestCommonSuffix = $char.$longestCommonSuffix; |
|
6088 | 6088 | } else { |
6089 | 6089 | break; |
6090 | 6090 | } |
@@ -6103,7 +6103,7 @@ discard block |
||
6103 | 6103 | */ |
6104 | 6104 | public static function str_matches_pattern(string $str, string $pattern): bool |
6105 | 6105 | { |
6106 | - if (\preg_match('/' . $pattern . '/u', $str)) { |
|
6106 | + if (\preg_match('/'.$pattern.'/u', $str)) { |
|
6107 | 6107 | return true; |
6108 | 6108 | } |
6109 | 6109 | |
@@ -6193,7 +6193,7 @@ discard block |
||
6193 | 6193 | $pad_type = STR_PAD_BOTH; |
6194 | 6194 | } else { |
6195 | 6195 | throw new \InvalidArgumentException( |
6196 | - 'Pad expects $padType to be "STR_PAD_*" or ' . "to be one of 'left', 'right' or 'both'" |
|
6196 | + 'Pad expects $padType to be "STR_PAD_*" or '."to be one of 'left', 'right' or 'both'" |
|
6197 | 6197 | ); |
6198 | 6198 | } |
6199 | 6199 | } |
@@ -6230,7 +6230,7 @@ discard block |
||
6230 | 6230 | $pre = ''; |
6231 | 6231 | } |
6232 | 6232 | |
6233 | - return $pre . $str . $post; |
|
6233 | + return $pre.$str.$post; |
|
6234 | 6234 | } |
6235 | 6235 | |
6236 | 6236 | return $str; |
@@ -6358,7 +6358,7 @@ discard block |
||
6358 | 6358 | { |
6359 | 6359 | return self::regex_replace( |
6360 | 6360 | $str, |
6361 | - '^' . \preg_quote($search, '/'), |
|
6361 | + '^'.\preg_quote($search, '/'), |
|
6362 | 6362 | self::str_replace('\\', '\\\\', $replacement) |
6363 | 6363 | ); |
6364 | 6364 | } |
@@ -6376,7 +6376,7 @@ discard block |
||
6376 | 6376 | { |
6377 | 6377 | return self::regex_replace( |
6378 | 6378 | $str, |
6379 | - \preg_quote($search, '/') . '$', |
|
6379 | + \preg_quote($search, '/').'$', |
|
6380 | 6380 | self::str_replace('\\', '\\\\', $replacement) |
6381 | 6381 | ); |
6382 | 6382 | } |
@@ -6487,24 +6487,24 @@ discard block |
||
6487 | 6487 | |
6488 | 6488 | $str = (string)\preg_replace_callback( |
6489 | 6489 | '/([\d|A-Z])/u', |
6490 | - function ($matches) use ($encoding) { |
|
6490 | + function($matches) use ($encoding) { |
|
6491 | 6491 | $match = $matches[1]; |
6492 | 6492 | $matchInt = (int)$match; |
6493 | 6493 | |
6494 | 6494 | if ((string)$matchInt == $match) { |
6495 | - return '_' . $match . '_'; |
|
6495 | + return '_'.$match.'_'; |
|
6496 | 6496 | } |
6497 | 6497 | |
6498 | - return '_' . UTF8::strtolower($match, $encoding); |
|
6498 | + return '_'.UTF8::strtolower($match, $encoding); |
|
6499 | 6499 | }, |
6500 | 6500 | $str |
6501 | 6501 | ); |
6502 | 6502 | |
6503 | 6503 | $str = (string)\preg_replace( |
6504 | 6504 | [ |
6505 | - '/\s+/', // convert spaces to "_" |
|
6506 | - '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6507 | - '/_+/', // remove double "_" |
|
6505 | + '/\s+/', // convert spaces to "_" |
|
6506 | + '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6507 | + '/_+/', // remove double "_" |
|
6508 | 6508 | ], |
6509 | 6509 | [ |
6510 | 6510 | '_', |
@@ -6573,7 +6573,7 @@ discard block |
||
6573 | 6573 | } |
6574 | 6574 | |
6575 | 6575 | /** @noinspection NotOptimalRegularExpressionsInspection */ |
6576 | - \preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a); |
|
6576 | + \preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a); |
|
6577 | 6577 | $a = $a[0]; |
6578 | 6578 | |
6579 | 6579 | if ($len === 1) { |
@@ -6626,7 +6626,7 @@ discard block |
||
6626 | 6626 | $limit = -1; |
6627 | 6627 | } |
6628 | 6628 | |
6629 | - $array = \preg_split('/' . \preg_quote($pattern, '/') . '/u', $str, $limit); |
|
6629 | + $array = \preg_split('/'.\preg_quote($pattern, '/').'/u', $str, $limit); |
|
6630 | 6630 | |
6631 | 6631 | if ($array === false) { |
6632 | 6632 | return []; |
@@ -6908,7 +6908,7 @@ discard block |
||
6908 | 6908 | |
6909 | 6909 | $str = (string)\preg_replace_callback( |
6910 | 6910 | '/([\S]+)/u', |
6911 | - function ($match) use ($encoding, $ignore) { |
|
6911 | + function($match) use ($encoding, $ignore) { |
|
6912 | 6912 | if ($ignore && \in_array($match[0], $ignore, true)) { |
6913 | 6913 | return $match[0]; |
6914 | 6914 | } |
@@ -6977,16 +6977,16 @@ discard block |
||
6977 | 6977 | $str = (string)\preg_replace_callback( |
6978 | 6978 | '~\b (_*) (?: # 1. Leading underscore and |
6979 | 6979 | ( (?<=[ ][/\\\\]) [[:alpha:]]+ [-_[:alpha:]/\\\\]+ | # 2. file path or |
6980 | - [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx . ' ) # URL, domain, or email |
|
6980 | + [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx.' ) # URL, domain, or email |
|
6981 | 6981 | | |
6982 | - ( (?i: ' . $smallWordsRx . ' ) ' . $apostropheRx . ' ) # 3. or small word (case-insensitive) |
|
6982 | + ( (?i: ' . $smallWordsRx.' ) '.$apostropheRx.' ) # 3. or small word (case-insensitive) |
|
6983 | 6983 | | |
6984 | - ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 4. or word w/o internal caps |
|
6984 | + ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 4. or word w/o internal caps |
|
6985 | 6985 | | |
6986 | - ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 5. or some other word |
|
6986 | + ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 5. or some other word |
|
6987 | 6987 | ) (_*) \b # 6. With trailing underscore |
6988 | 6988 | ~ux', |
6989 | - function ($matches) use ($encoding) { |
|
6989 | + function($matches) use ($encoding) { |
|
6990 | 6990 | // Preserve leading underscore |
6991 | 6991 | $str = $matches[1]; |
6992 | 6992 | if ($matches[2]) { |
@@ -7015,21 +7015,21 @@ discard block |
||
7015 | 7015 | '~( \A [[:punct:]]* # start of title... |
7016 | 7016 | | [:.;?!][ ]+ # or of subsentence... |
7017 | 7017 | | [ ][\'"“‘(\[][ ]* ) # or of inserted subphrase... |
7018 | - ( ' . $smallWordsRx . ' ) \b # ...followed by small word |
|
7018 | + ( ' . $smallWordsRx.' ) \b # ...followed by small word |
|
7019 | 7019 | ~uxi', |
7020 | - function ($matches) use ($encoding) { |
|
7021 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7020 | + function($matches) use ($encoding) { |
|
7021 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7022 | 7022 | }, |
7023 | 7023 | $str |
7024 | 7024 | ); |
7025 | 7025 | |
7026 | 7026 | // ...and end of title |
7027 | 7027 | $str = (string)\preg_replace_callback( |
7028 | - '~\b ( ' . $smallWordsRx . ' ) # small word... |
|
7028 | + '~\b ( '.$smallWordsRx.' ) # small word... |
|
7029 | 7029 | (?= [[:punct:]]* \Z # ...at the end of the title... |
7030 | 7030 | | [\'"’”)\]] [ ] ) # ...or of an inserted subphrase? |
7031 | 7031 | ~uxi', |
7032 | - function ($matches) use ($encoding) { |
|
7032 | + function($matches) use ($encoding) { |
|
7033 | 7033 | return static::str_upper_first($matches[1], $encoding); |
7034 | 7034 | }, |
7035 | 7035 | $str |
@@ -7040,10 +7040,10 @@ discard block |
||
7040 | 7040 | $str = (string)\preg_replace_callback( |
7041 | 7041 | '~\b |
7042 | 7042 | (?<! -) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (in-flight) |
7043 | - ( ' . $smallWordsRx . ' ) |
|
7043 | + ( ' . $smallWordsRx.' ) |
|
7044 | 7044 | (?= -[[:alpha:]]+) # lookahead for "-someword" |
7045 | 7045 | ~uxi', |
7046 | - function ($matches) use ($encoding) { |
|
7046 | + function($matches) use ($encoding) { |
|
7047 | 7047 | return static::str_upper_first($matches[1], $encoding); |
7048 | 7048 | }, |
7049 | 7049 | $str |
@@ -7054,11 +7054,11 @@ discard block |
||
7054 | 7054 | '~\b |
7055 | 7055 | (?<!…) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (stand-in) |
7056 | 7056 | ( [[:alpha:]]+- ) # $1 = first word and hyphen, should already be properly capped |
7057 | - ( ' . $smallWordsRx . ' ) # ...followed by small word |
|
7057 | + ( ' . $smallWordsRx.' ) # ...followed by small word |
|
7058 | 7058 | (?! - ) # Negative lookahead for another - |
7059 | 7059 | ~uxi', |
7060 | - function ($matches) use ($encoding) { |
|
7061 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7060 | + function($matches) use ($encoding) { |
|
7061 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7062 | 7062 | }, |
7063 | 7063 | $str |
7064 | 7064 | ); |
@@ -7208,7 +7208,7 @@ discard block |
||
7208 | 7208 | |
7209 | 7209 | $truncated = self::substr($str, 0, $length, $encoding); |
7210 | 7210 | |
7211 | - return $truncated . $substring; |
|
7211 | + return $truncated.$substring; |
|
7212 | 7212 | } |
7213 | 7213 | |
7214 | 7214 | /** |
@@ -7250,7 +7250,7 @@ discard block |
||
7250 | 7250 | } |
7251 | 7251 | } |
7252 | 7252 | |
7253 | - $str = $truncated . $substring; |
|
7253 | + $str = $truncated.$substring; |
|
7254 | 7254 | |
7255 | 7255 | return $str; |
7256 | 7256 | } |
@@ -7399,7 +7399,7 @@ discard block |
||
7399 | 7399 | public static function strcmp(string $str1, string $str2): int |
7400 | 7400 | { |
7401 | 7401 | /** @noinspection PhpUndefinedClassInspection */ |
7402 | - return $str1 . '' === $str2 . '' ? 0 : \strcmp( |
|
7402 | + return $str1.'' === $str2.'' ? 0 : \strcmp( |
|
7403 | 7403 | \Normalizer::normalize($str1, \Normalizer::NFD), |
7404 | 7404 | \Normalizer::normalize($str2, \Normalizer::NFD) |
7405 | 7405 | ); |
@@ -7433,7 +7433,7 @@ discard block |
||
7433 | 7433 | return null; |
7434 | 7434 | } |
7435 | 7435 | |
7436 | - if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
7436 | + if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
7437 | 7437 | return self::strlen($length[1]); |
7438 | 7438 | } |
7439 | 7439 | |
@@ -7670,7 +7670,7 @@ discard block |
||
7670 | 7670 | && |
7671 | 7671 | self::$SUPPORT['mbstring'] === false |
7672 | 7672 | ) { |
7673 | - \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7673 | + \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7674 | 7674 | } |
7675 | 7675 | |
7676 | 7676 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -7692,7 +7692,7 @@ discard block |
||
7692 | 7692 | return \stristr($haystack, $needle, $before_needle); |
7693 | 7693 | } |
7694 | 7694 | |
7695 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
7695 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match); |
|
7696 | 7696 | |
7697 | 7697 | if (!isset($match[1])) { |
7698 | 7698 | return false; |
@@ -7759,7 +7759,7 @@ discard block |
||
7759 | 7759 | && |
7760 | 7760 | self::$SUPPORT['iconv'] === false |
7761 | 7761 | ) { |
7762 | - \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7762 | + \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7763 | 7763 | } |
7764 | 7764 | |
7765 | 7765 | // |
@@ -7885,7 +7885,7 @@ discard block |
||
7885 | 7885 | */ |
7886 | 7886 | public static function strnatcmp(string $str1, string $str2): int |
7887 | 7887 | { |
7888 | - return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7888 | + return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
7889 | 7889 | } |
7890 | 7890 | |
7891 | 7891 | /** |
@@ -7950,7 +7950,7 @@ discard block |
||
7950 | 7950 | return false; |
7951 | 7951 | } |
7952 | 7952 | |
7953 | - if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
7953 | + if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
7954 | 7954 | return \substr($haystack, (int)\strpos($haystack, $m[0])); |
7955 | 7955 | } |
7956 | 7956 | |
@@ -8022,7 +8022,7 @@ discard block |
||
8022 | 8022 | && |
8023 | 8023 | self::$SUPPORT['mbstring'] === false |
8024 | 8024 | ) { |
8025 | - \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8025 | + \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8026 | 8026 | } |
8027 | 8027 | |
8028 | 8028 | // |
@@ -8188,7 +8188,7 @@ discard block |
||
8188 | 8188 | && |
8189 | 8189 | self::$SUPPORT['mbstring'] === false |
8190 | 8190 | ) { |
8191 | - \trigger_error('UTF8::strrchr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8191 | + \trigger_error('UTF8::strrchr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8192 | 8192 | } |
8193 | 8193 | |
8194 | 8194 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -8409,7 +8409,7 @@ discard block |
||
8409 | 8409 | && |
8410 | 8410 | self::$SUPPORT['mbstring'] === false |
8411 | 8411 | ) { |
8412 | - \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8412 | + \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8413 | 8413 | } |
8414 | 8414 | |
8415 | 8415 | // |
@@ -8556,7 +8556,7 @@ discard block |
||
8556 | 8556 | && |
8557 | 8557 | self::$SUPPORT['mbstring'] === false |
8558 | 8558 | ) { |
8559 | - \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8559 | + \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8560 | 8560 | } |
8561 | 8561 | |
8562 | 8562 | // |
@@ -8687,7 +8687,7 @@ discard block |
||
8687 | 8687 | return 0; |
8688 | 8688 | } |
8689 | 8689 | |
8690 | - return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8690 | + return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8691 | 8691 | } |
8692 | 8692 | |
8693 | 8693 | /** |
@@ -8743,7 +8743,7 @@ discard block |
||
8743 | 8743 | && |
8744 | 8744 | self::$SUPPORT['mbstring'] === false |
8745 | 8745 | ) { |
8746 | - \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8746 | + \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8747 | 8747 | } |
8748 | 8748 | |
8749 | 8749 | // |
@@ -8781,7 +8781,7 @@ discard block |
||
8781 | 8781 | // fallback via vanilla php |
8782 | 8782 | // |
8783 | 8783 | |
8784 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match); |
|
8784 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match); |
|
8785 | 8785 | |
8786 | 8786 | if (!isset($match[1])) { |
8787 | 8787 | return false; |
@@ -8919,9 +8919,9 @@ discard block |
||
8919 | 8919 | |
8920 | 8920 | if (self::$SUPPORT['intl'] === true) { |
8921 | 8921 | |
8922 | - $langCode = $lang . '-Lower'; |
|
8922 | + $langCode = $lang.'-Lower'; |
|
8923 | 8923 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
8924 | - \trigger_error('UTF8::strtolower() cannot handle special language: ' . $lang, E_USER_WARNING); |
|
8924 | + \trigger_error('UTF8::strtolower() cannot handle special language: '.$lang, E_USER_WARNING); |
|
8925 | 8925 | |
8926 | 8926 | $langCode = 'Any-Lower'; |
8927 | 8927 | } |
@@ -8930,7 +8930,7 @@ discard block |
||
8930 | 8930 | return transliterator_transliterate($langCode, $str); |
8931 | 8931 | } |
8932 | 8932 | |
8933 | - \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: ' . $lang, E_USER_WARNING); |
|
8933 | + \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: '.$lang, E_USER_WARNING); |
|
8934 | 8934 | } |
8935 | 8935 | |
8936 | 8936 | // always fallback via symfony polyfill |
@@ -8995,9 +8995,9 @@ discard block |
||
8995 | 8995 | |
8996 | 8996 | if (self::$SUPPORT['intl'] === true) { |
8997 | 8997 | |
8998 | - $langCode = $lang . '-Upper'; |
|
8998 | + $langCode = $lang.'-Upper'; |
|
8999 | 8999 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9000 | - \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
9000 | + \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
9001 | 9001 | |
9002 | 9002 | $langCode = 'Any-Upper'; |
9003 | 9003 | } |
@@ -9006,7 +9006,7 @@ discard block |
||
9006 | 9006 | return transliterator_transliterate($langCode, $str); |
9007 | 9007 | } |
9008 | 9008 | |
9009 | - \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
9009 | + \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
9010 | 9010 | } |
9011 | 9011 | |
9012 | 9012 | // always fallback via symfony polyfill |
@@ -9210,7 +9210,7 @@ discard block |
||
9210 | 9210 | && |
9211 | 9211 | self::$SUPPORT['mbstring'] === false |
9212 | 9212 | ) { |
9213 | - \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9213 | + \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9214 | 9214 | } |
9215 | 9215 | |
9216 | 9216 | // |
@@ -9390,14 +9390,14 @@ discard block |
||
9390 | 9390 | && |
9391 | 9391 | self::$SUPPORT['mbstring'] === false |
9392 | 9392 | ) { |
9393 | - \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9393 | + \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9394 | 9394 | } |
9395 | 9395 | |
9396 | 9396 | if (self::$SUPPORT['mbstring'] === true) { |
9397 | 9397 | return \mb_substr_count($haystack, $needle, $encoding); |
9398 | 9398 | } |
9399 | 9399 | |
9400 | - \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
9400 | + \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
9401 | 9401 | |
9402 | 9402 | return \count($matches); |
9403 | 9403 | } |
@@ -9721,8 +9721,7 @@ discard block |
||
9721 | 9721 | |
9722 | 9722 | if (self::is_ascii($str)) { |
9723 | 9723 | return ($length === null) ? |
9724 | - \substr_replace($str, $replacement, $offset) : |
|
9725 | - \substr_replace($str, $replacement, $offset, $length); |
|
9724 | + \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length); |
|
9726 | 9725 | } |
9727 | 9726 | |
9728 | 9727 | \preg_match_all('/./us', $str, $smatches); |
@@ -10208,7 +10207,7 @@ discard block |
||
10208 | 10207 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
10209 | 10208 | |
10210 | 10209 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10211 | - $buf .= $c1 . $c2; |
|
10210 | + $buf .= $c1.$c2; |
|
10212 | 10211 | $i++; |
10213 | 10212 | } else { // not valid UTF8 - convert it |
10214 | 10213 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10220,7 +10219,7 @@ discard block |
||
10220 | 10219 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
10221 | 10220 | |
10222 | 10221 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10223 | - $buf .= $c1 . $c2 . $c3; |
|
10222 | + $buf .= $c1.$c2.$c3; |
|
10224 | 10223 | $i += 2; |
10225 | 10224 | } else { // not valid UTF8 - convert it |
10226 | 10225 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10233,7 +10232,7 @@ discard block |
||
10233 | 10232 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
10234 | 10233 | |
10235 | 10234 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10236 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
10235 | + $buf .= $c1.$c2.$c3.$c4; |
|
10237 | 10236 | $i += 3; |
10238 | 10237 | } else { // not valid UTF8 - convert it |
10239 | 10238 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10255,7 +10254,7 @@ discard block |
||
10255 | 10254 | // decode unicode escape sequences |
10256 | 10255 | $buf = \preg_replace_callback( |
10257 | 10256 | '/\\\\u([0-9a-f]{4})/i', |
10258 | - function ($match) { |
|
10257 | + function($match) { |
|
10259 | 10258 | // always fallback via symfony polyfill |
10260 | 10259 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
10261 | 10260 | }, |
@@ -10298,7 +10297,7 @@ discard block |
||
10298 | 10297 | } else { |
10299 | 10298 | $cc1 = self::$CHR[$ordC1 / 64] | "\xC0"; |
10300 | 10299 | $cc2 = ((string)$input & "\x3F") | "\x80"; |
10301 | - $buf .= $cc1 . $cc2; |
|
10300 | + $buf .= $cc1.$cc2; |
|
10302 | 10301 | } |
10303 | 10302 | |
10304 | 10303 | return $buf; |
@@ -10362,7 +10361,7 @@ discard block |
||
10362 | 10361 | $cleanUtf8 |
10363 | 10362 | ); |
10364 | 10363 | |
10365 | - return $strPartOne . $strPartTwo; |
|
10364 | + return $strPartOne.$strPartTwo; |
|
10366 | 10365 | } |
10367 | 10366 | |
10368 | 10367 | /** |
@@ -10407,7 +10406,7 @@ discard block |
||
10407 | 10406 | $str = self::clean($str); |
10408 | 10407 | } |
10409 | 10408 | |
10410 | - $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions)); |
|
10409 | + $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions)); |
|
10411 | 10410 | |
10412 | 10411 | if ( |
10413 | 10412 | $usePhpDefaultFunctions === true |
@@ -10911,7 +10910,7 @@ discard block |
||
10911 | 10910 | return ''; |
10912 | 10911 | } |
10913 | 10912 | |
10914 | - \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
10913 | + \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
10915 | 10914 | |
10916 | 10915 | if ( |
10917 | 10916 | !isset($matches[0]) |
@@ -10921,7 +10920,7 @@ discard block |
||
10921 | 10920 | return $str; |
10922 | 10921 | } |
10923 | 10922 | |
10924 | - return self::rtrim($matches[0]) . $strAddOn; |
|
10923 | + return self::rtrim($matches[0]).$strAddOn; |
|
10925 | 10924 | } |
10926 | 10925 | |
10927 | 10926 | /** |
@@ -10992,7 +10991,7 @@ discard block |
||
10992 | 10991 | $strReturn .= $break; |
10993 | 10992 | } |
10994 | 10993 | |
10995 | - return $strReturn . \implode('', $chars); |
|
10994 | + return $strReturn.\implode('', $chars); |
|
10996 | 10995 | } |
10997 | 10996 | |
10998 | 10997 | /** |