@@ -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 | /** |
@@ -4240,7 +4240,7 @@ discard block |
||
4240 | 4240 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4241 | 4241 | } |
4242 | 4242 | |
4243 | - $cacheKey = $chr_orig . $encoding; |
|
4243 | + $cacheKey = $chr_orig.$encoding; |
|
4244 | 4244 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
4245 | 4245 | return $CHAR_CACHE[$cacheKey]; |
4246 | 4246 | } |
@@ -4506,7 +4506,7 @@ discard block |
||
4506 | 4506 | } |
4507 | 4507 | |
4508 | 4508 | $str = (string)\preg_replace( |
4509 | - $delimiter . $pattern . $delimiter . 'u' . $options, |
|
4509 | + $delimiter.$pattern.$delimiter.'u'.$options, |
|
4510 | 4510 | $replacement, |
4511 | 4511 | $str |
4512 | 4512 | ); |
@@ -4577,7 +4577,7 @@ discard block |
||
4577 | 4577 | if (\is_array($what) === true) { |
4578 | 4578 | /** @noinspection ForeachSourceInspection */ |
4579 | 4579 | foreach ($what as $item) { |
4580 | - $str = (string)\preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str); |
|
4580 | + $str = (string)\preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str); |
|
4581 | 4581 | } |
4582 | 4582 | } |
4583 | 4583 | |
@@ -4825,7 +4825,7 @@ discard block |
||
4825 | 4825 | { |
4826 | 4826 | static $RX_CLASSS_CACHE = []; |
4827 | 4827 | |
4828 | - $cacheKey = $s . $class; |
|
4828 | + $cacheKey = $s.$class; |
|
4829 | 4829 | |
4830 | 4830 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4831 | 4831 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4837,7 +4837,7 @@ discard block |
||
4837 | 4837 | /** @noinspection SuspiciousLoopInspection */ |
4838 | 4838 | foreach (self::str_split($s) as $s) { |
4839 | 4839 | if ('-' === $s) { |
4840 | - $class[0] = '-' . $class[0]; |
|
4840 | + $class[0] = '-'.$class[0]; |
|
4841 | 4841 | } elseif (!isset($s[2])) { |
4842 | 4842 | $class[0] .= \preg_quote($s, '/'); |
4843 | 4843 | } elseif (1 === self::strlen($s)) { |
@@ -4848,13 +4848,13 @@ discard block |
||
4848 | 4848 | } |
4849 | 4849 | |
4850 | 4850 | if ($class[0]) { |
4851 | - $class[0] = '[' . $class[0] . ']'; |
|
4851 | + $class[0] = '['.$class[0].']'; |
|
4852 | 4852 | } |
4853 | 4853 | |
4854 | 4854 | if (1 === \count($class)) { |
4855 | 4855 | $return = $class[0]; |
4856 | 4856 | } else { |
4857 | - $return = '(?:' . \implode('|', $class) . ')'; |
|
4857 | + $return = '(?:'.\implode('|', $class).')'; |
|
4858 | 4858 | } |
4859 | 4859 | |
4860 | 4860 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4873,7 +4873,7 @@ discard block |
||
4873 | 4873 | |
4874 | 4874 | echo '<pre>'; |
4875 | 4875 | foreach (self::$SUPPORT as $key => $value) { |
4876 | - echo $key . ' - ' . \print_r($value, true) . "\n<br>"; |
|
4876 | + echo $key.' - '.\print_r($value, true)."\n<br>"; |
|
4877 | 4877 | } |
4878 | 4878 | echo '</pre>'; |
4879 | 4879 | } |
@@ -4905,7 +4905,7 @@ discard block |
||
4905 | 4905 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4906 | 4906 | } |
4907 | 4907 | |
4908 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4908 | + return '&#'.self::ord($char, $encoding).';'; |
|
4909 | 4909 | } |
4910 | 4910 | |
4911 | 4911 | /** |
@@ -4992,7 +4992,7 @@ discard block |
||
4992 | 4992 | ) { |
4993 | 4993 | |
4994 | 4994 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4995 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4995 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4996 | 4996 | |
4997 | 4997 | $i++; |
4998 | 4998 | } |
@@ -5008,7 +5008,7 @@ discard block |
||
5008 | 5008 | && |
5009 | 5009 | ($str[$i + 2] & "\xC0") === "\x80" |
5010 | 5010 | ) { |
5011 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
5011 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
5012 | 5012 | |
5013 | 5013 | $i += 2; |
5014 | 5014 | } |
@@ -5026,7 +5026,7 @@ discard block |
||
5026 | 5026 | && |
5027 | 5027 | ($str[$i + 3] & "\xC0") === "\x80" |
5028 | 5028 | ) { |
5029 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
5029 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
5030 | 5030 | |
5031 | 5031 | $i += 3; |
5032 | 5032 | } |
@@ -5039,7 +5039,7 @@ discard block |
||
5039 | 5039 | $ret = \array_chunk($ret, $length); |
5040 | 5040 | |
5041 | 5041 | return \array_map( |
5042 | - function ($item) { |
|
5042 | + function($item) { |
|
5043 | 5043 | return \implode('', $item); |
5044 | 5044 | }, $ret |
5045 | 5045 | ); |
@@ -5072,7 +5072,7 @@ discard block |
||
5072 | 5072 | |
5073 | 5073 | $str = (string)\preg_replace_callback( |
5074 | 5074 | '/[-_\s]+(.)?/u', |
5075 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5075 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5076 | 5076 | if (isset($match[1])) { |
5077 | 5077 | return UTF8::strtoupper($match[1], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5078 | 5078 | } |
@@ -5084,7 +5084,7 @@ discard block |
||
5084 | 5084 | |
5085 | 5085 | $str = (string)\preg_replace_callback( |
5086 | 5086 | '/[\d]+(.)?/u', |
5087 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5087 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5088 | 5088 | return UTF8::strtoupper($match[0], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5089 | 5089 | }, |
5090 | 5090 | $str |
@@ -5463,7 +5463,7 @@ discard block |
||
5463 | 5463 | foreach (self::$ENCODINGS as $encodingTmp) { |
5464 | 5464 | # INFO: //IGNORE but still throw notice |
5465 | 5465 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
5466 | - if ((string)@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str) === $str) { |
|
5466 | + if ((string)@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str) === $str) { |
|
5467 | 5467 | return $encodingTmp; |
5468 | 5468 | } |
5469 | 5469 | } |
@@ -5525,7 +5525,7 @@ discard block |
||
5525 | 5525 | public static function str_ensure_left(string $str, string $substring): string |
5526 | 5526 | { |
5527 | 5527 | if (!self::str_starts_with($str, $substring)) { |
5528 | - $str = $substring . $str; |
|
5528 | + $str = $substring.$str; |
|
5529 | 5529 | } |
5530 | 5530 | |
5531 | 5531 | return $str; |
@@ -5734,7 +5734,7 @@ discard block |
||
5734 | 5734 | $start = self::substr($str, 0, $index, $encoding); |
5735 | 5735 | $end = self::substr($str, $index, $len, $encoding); |
5736 | 5736 | |
5737 | - return $start . $substring . $end; |
|
5737 | + return $start.$substring.$end; |
|
5738 | 5738 | } |
5739 | 5739 | |
5740 | 5740 | /** |
@@ -5772,7 +5772,7 @@ discard block |
||
5772 | 5772 | if ('' === $s) { |
5773 | 5773 | $s = '/^(?<=.)$/'; |
5774 | 5774 | } else { |
5775 | - $s = '/' . \preg_quote($s, '/') . '/ui'; |
|
5775 | + $s = '/'.\preg_quote($s, '/').'/ui'; |
|
5776 | 5776 | } |
5777 | 5777 | } |
5778 | 5778 | |
@@ -6055,7 +6055,7 @@ discard block |
||
6055 | 6055 | return $str; |
6056 | 6056 | } |
6057 | 6057 | |
6058 | - return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding) . $strAddOn; |
|
6058 | + return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding).$strAddOn; |
|
6059 | 6059 | } |
6060 | 6060 | |
6061 | 6061 | /** |
@@ -6083,7 +6083,7 @@ discard block |
||
6083 | 6083 | } |
6084 | 6084 | |
6085 | 6085 | if (self::substr($str, $length - 1, 1, $encoding) === ' ') { |
6086 | - return self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6086 | + return self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6087 | 6087 | } |
6088 | 6088 | |
6089 | 6089 | $str = (string)self::substr($str, 0, $length, $encoding); |
@@ -6092,9 +6092,9 @@ discard block |
||
6092 | 6092 | $new_str = \implode(' ', $array); |
6093 | 6093 | |
6094 | 6094 | if ($new_str === '') { |
6095 | - $str = self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6095 | + $str = self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6096 | 6096 | } else { |
6097 | - $str = $new_str . $strAddOn; |
|
6097 | + $str = $new_str.$strAddOn; |
|
6098 | 6098 | } |
6099 | 6099 | |
6100 | 6100 | return $str; |
@@ -6197,7 +6197,7 @@ discard block |
||
6197 | 6197 | $char = self::substr($str, -$i, 1, $encoding); |
6198 | 6198 | |
6199 | 6199 | if ($char == self::substr($otherStr, -$i, 1, $encoding)) { |
6200 | - $longestCommonSuffix = $char . $longestCommonSuffix; |
|
6200 | + $longestCommonSuffix = $char.$longestCommonSuffix; |
|
6201 | 6201 | } else { |
6202 | 6202 | break; |
6203 | 6203 | } |
@@ -6216,7 +6216,7 @@ discard block |
||
6216 | 6216 | */ |
6217 | 6217 | public static function str_matches_pattern(string $str, string $pattern): bool |
6218 | 6218 | { |
6219 | - if (\preg_match('/' . $pattern . '/u', $str)) { |
|
6219 | + if (\preg_match('/'.$pattern.'/u', $str)) { |
|
6220 | 6220 | return true; |
6221 | 6221 | } |
6222 | 6222 | |
@@ -6306,7 +6306,7 @@ discard block |
||
6306 | 6306 | $pad_type = STR_PAD_BOTH; |
6307 | 6307 | } else { |
6308 | 6308 | throw new \InvalidArgumentException( |
6309 | - 'Pad expects $padType to be "STR_PAD_*" or ' . "to be one of 'left', 'right' or 'both'" |
|
6309 | + 'Pad expects $padType to be "STR_PAD_*" or '."to be one of 'left', 'right' or 'both'" |
|
6310 | 6310 | ); |
6311 | 6311 | } |
6312 | 6312 | } |
@@ -6343,7 +6343,7 @@ discard block |
||
6343 | 6343 | $pre = ''; |
6344 | 6344 | } |
6345 | 6345 | |
6346 | - return $pre . $str . $post; |
|
6346 | + return $pre.$str.$post; |
|
6347 | 6347 | } |
6348 | 6348 | |
6349 | 6349 | return $str; |
@@ -6471,7 +6471,7 @@ discard block |
||
6471 | 6471 | { |
6472 | 6472 | return self::regex_replace( |
6473 | 6473 | $str, |
6474 | - '^' . \preg_quote($search, '/'), |
|
6474 | + '^'.\preg_quote($search, '/'), |
|
6475 | 6475 | self::str_replace('\\', '\\\\', $replacement) |
6476 | 6476 | ); |
6477 | 6477 | } |
@@ -6489,7 +6489,7 @@ discard block |
||
6489 | 6489 | { |
6490 | 6490 | return self::regex_replace( |
6491 | 6491 | $str, |
6492 | - \preg_quote($search, '/') . '$', |
|
6492 | + \preg_quote($search, '/').'$', |
|
6493 | 6493 | self::str_replace('\\', '\\\\', $replacement) |
6494 | 6494 | ); |
6495 | 6495 | } |
@@ -6600,24 +6600,24 @@ discard block |
||
6600 | 6600 | |
6601 | 6601 | $str = (string)\preg_replace_callback( |
6602 | 6602 | '/([\d|A-Z])/u', |
6603 | - function ($matches) use ($encoding) { |
|
6603 | + function($matches) use ($encoding) { |
|
6604 | 6604 | $match = $matches[1]; |
6605 | 6605 | $matchInt = (int)$match; |
6606 | 6606 | |
6607 | 6607 | if ((string)$matchInt == $match) { |
6608 | - return '_' . $match . '_'; |
|
6608 | + return '_'.$match.'_'; |
|
6609 | 6609 | } |
6610 | 6610 | |
6611 | - return '_' . UTF8::strtolower($match, $encoding); |
|
6611 | + return '_'.UTF8::strtolower($match, $encoding); |
|
6612 | 6612 | }, |
6613 | 6613 | $str |
6614 | 6614 | ); |
6615 | 6615 | |
6616 | 6616 | $str = (string)\preg_replace( |
6617 | 6617 | [ |
6618 | - '/\s+/', // convert spaces to "_" |
|
6619 | - '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6620 | - '/_+/', // remove double "_" |
|
6618 | + '/\s+/', // convert spaces to "_" |
|
6619 | + '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6620 | + '/_+/', // remove double "_" |
|
6621 | 6621 | ], |
6622 | 6622 | [ |
6623 | 6623 | '_', |
@@ -6705,7 +6705,7 @@ discard block |
||
6705 | 6705 | $limit = -1; |
6706 | 6706 | } |
6707 | 6707 | |
6708 | - $array = \preg_split('/' . \preg_quote($pattern, '/') . '/u', $str, $limit); |
|
6708 | + $array = \preg_split('/'.\preg_quote($pattern, '/').'/u', $str, $limit); |
|
6709 | 6709 | |
6710 | 6710 | if ($array === false) { |
6711 | 6711 | return []; |
@@ -7084,16 +7084,16 @@ discard block |
||
7084 | 7084 | $str = (string)\preg_replace_callback( |
7085 | 7085 | '~\b (_*) (?: # 1. Leading underscore and |
7086 | 7086 | ( (?<=[ ][/\\\\]) [[:alpha:]]+ [-_[:alpha:]/\\\\]+ | # 2. file path or |
7087 | - [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx . ' ) # URL, domain, or email |
|
7087 | + [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx.' ) # URL, domain, or email |
|
7088 | 7088 | | |
7089 | - ( (?i: ' . $smallWordsRx . ' ) ' . $apostropheRx . ' ) # 3. or small word (case-insensitive) |
|
7089 | + ( (?i: ' . $smallWordsRx.' ) '.$apostropheRx.' ) # 3. or small word (case-insensitive) |
|
7090 | 7090 | | |
7091 | - ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 4. or word w/o internal caps |
|
7091 | + ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 4. or word w/o internal caps |
|
7092 | 7092 | | |
7093 | - ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 5. or some other word |
|
7093 | + ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 5. or some other word |
|
7094 | 7094 | ) (_*) \b # 6. With trailing underscore |
7095 | 7095 | ~ux', |
7096 | - function ($matches) use ($encoding) { |
|
7096 | + function($matches) use ($encoding) { |
|
7097 | 7097 | // Preserve leading underscore |
7098 | 7098 | $str = $matches[1]; |
7099 | 7099 | if ($matches[2]) { |
@@ -7122,21 +7122,21 @@ discard block |
||
7122 | 7122 | '~( \A [[:punct:]]* # start of title... |
7123 | 7123 | | [:.;?!][ ]+ # or of subsentence... |
7124 | 7124 | | [ ][\'"“‘(\[][ ]* ) # or of inserted subphrase... |
7125 | - ( ' . $smallWordsRx . ' ) \b # ...followed by small word |
|
7125 | + ( ' . $smallWordsRx.' ) \b # ...followed by small word |
|
7126 | 7126 | ~uxi', |
7127 | - function ($matches) use ($encoding) { |
|
7128 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7127 | + function($matches) use ($encoding) { |
|
7128 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7129 | 7129 | }, |
7130 | 7130 | $str |
7131 | 7131 | ); |
7132 | 7132 | |
7133 | 7133 | // ...and end of title |
7134 | 7134 | $str = (string)\preg_replace_callback( |
7135 | - '~\b ( ' . $smallWordsRx . ' ) # small word... |
|
7135 | + '~\b ( '.$smallWordsRx.' ) # small word... |
|
7136 | 7136 | (?= [[:punct:]]* \Z # ...at the end of the title... |
7137 | 7137 | | [\'"’”)\]] [ ] ) # ...or of an inserted subphrase? |
7138 | 7138 | ~uxi', |
7139 | - function ($matches) use ($encoding) { |
|
7139 | + function($matches) use ($encoding) { |
|
7140 | 7140 | return static::str_upper_first($matches[1], $encoding); |
7141 | 7141 | }, |
7142 | 7142 | $str |
@@ -7147,10 +7147,10 @@ discard block |
||
7147 | 7147 | $str = (string)\preg_replace_callback( |
7148 | 7148 | '~\b |
7149 | 7149 | (?<! -) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (in-flight) |
7150 | - ( ' . $smallWordsRx . ' ) |
|
7150 | + ( ' . $smallWordsRx.' ) |
|
7151 | 7151 | (?= -[[:alpha:]]+) # lookahead for "-someword" |
7152 | 7152 | ~uxi', |
7153 | - function ($matches) use ($encoding) { |
|
7153 | + function($matches) use ($encoding) { |
|
7154 | 7154 | return static::str_upper_first($matches[1], $encoding); |
7155 | 7155 | }, |
7156 | 7156 | $str |
@@ -7161,11 +7161,11 @@ discard block |
||
7161 | 7161 | '~\b |
7162 | 7162 | (?<!…) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (stand-in) |
7163 | 7163 | ( [[:alpha:]]+- ) # $1 = first word and hyphen, should already be properly capped |
7164 | - ( ' . $smallWordsRx . ' ) # ...followed by small word |
|
7164 | + ( ' . $smallWordsRx.' ) # ...followed by small word |
|
7165 | 7165 | (?! - ) # Negative lookahead for another - |
7166 | 7166 | ~uxi', |
7167 | - function ($matches) use ($encoding) { |
|
7168 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7167 | + function($matches) use ($encoding) { |
|
7168 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7169 | 7169 | }, |
7170 | 7170 | $str |
7171 | 7171 | ); |
@@ -7315,7 +7315,7 @@ discard block |
||
7315 | 7315 | |
7316 | 7316 | $truncated = self::substr($str, 0, $length, $encoding); |
7317 | 7317 | |
7318 | - return $truncated . $substring; |
|
7318 | + return $truncated.$substring; |
|
7319 | 7319 | } |
7320 | 7320 | |
7321 | 7321 | /** |
@@ -7357,7 +7357,7 @@ discard block |
||
7357 | 7357 | } |
7358 | 7358 | } |
7359 | 7359 | |
7360 | - $str = $truncated . $substring; |
|
7360 | + $str = $truncated.$substring; |
|
7361 | 7361 | |
7362 | 7362 | return $str; |
7363 | 7363 | } |
@@ -7512,7 +7512,7 @@ discard block |
||
7512 | 7512 | public static function strcmp(string $str1, string $str2): int |
7513 | 7513 | { |
7514 | 7514 | /** @noinspection PhpUndefinedClassInspection */ |
7515 | - return $str1 . '' === $str2 . '' ? 0 : \strcmp( |
|
7515 | + return $str1.'' === $str2.'' ? 0 : \strcmp( |
|
7516 | 7516 | \Normalizer::normalize($str1, \Normalizer::NFD), |
7517 | 7517 | \Normalizer::normalize($str2, \Normalizer::NFD) |
7518 | 7518 | ); |
@@ -7546,7 +7546,7 @@ discard block |
||
7546 | 7546 | return null; |
7547 | 7547 | } |
7548 | 7548 | |
7549 | - if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
7549 | + if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
7550 | 7550 | return self::strlen($length[1]); |
7551 | 7551 | } |
7552 | 7552 | |
@@ -7783,7 +7783,7 @@ discard block |
||
7783 | 7783 | && |
7784 | 7784 | self::$SUPPORT['mbstring'] === false |
7785 | 7785 | ) { |
7786 | - \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7786 | + \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7787 | 7787 | } |
7788 | 7788 | |
7789 | 7789 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -7805,7 +7805,7 @@ discard block |
||
7805 | 7805 | return \stristr($haystack, $needle, $before_needle); |
7806 | 7806 | } |
7807 | 7807 | |
7808 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
7808 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match); |
|
7809 | 7809 | |
7810 | 7810 | if (!isset($match[1])) { |
7811 | 7811 | return false; |
@@ -7872,7 +7872,7 @@ discard block |
||
7872 | 7872 | && |
7873 | 7873 | self::$SUPPORT['iconv'] === false |
7874 | 7874 | ) { |
7875 | - \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
7875 | + \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
7876 | 7876 | } |
7877 | 7877 | |
7878 | 7878 | // |
@@ -7998,7 +7998,7 @@ discard block |
||
7998 | 7998 | */ |
7999 | 7999 | public static function strnatcmp(string $str1, string $str2): int |
8000 | 8000 | { |
8001 | - return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
8001 | + return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
8002 | 8002 | } |
8003 | 8003 | |
8004 | 8004 | /** |
@@ -8063,7 +8063,7 @@ discard block |
||
8063 | 8063 | return false; |
8064 | 8064 | } |
8065 | 8065 | |
8066 | - if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
8066 | + if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
8067 | 8067 | return \substr($haystack, (int)\strpos($haystack, $m[0])); |
8068 | 8068 | } |
8069 | 8069 | |
@@ -8135,7 +8135,7 @@ discard block |
||
8135 | 8135 | && |
8136 | 8136 | self::$SUPPORT['mbstring'] === false |
8137 | 8137 | ) { |
8138 | - \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8138 | + \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8139 | 8139 | } |
8140 | 8140 | |
8141 | 8141 | // |
@@ -8301,7 +8301,7 @@ discard block |
||
8301 | 8301 | && |
8302 | 8302 | self::$SUPPORT['mbstring'] === false |
8303 | 8303 | ) { |
8304 | - \trigger_error('UTF8::strrchr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8304 | + \trigger_error('UTF8::strrchr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8305 | 8305 | } |
8306 | 8306 | |
8307 | 8307 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -8522,7 +8522,7 @@ discard block |
||
8522 | 8522 | && |
8523 | 8523 | self::$SUPPORT['mbstring'] === false |
8524 | 8524 | ) { |
8525 | - \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8525 | + \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8526 | 8526 | } |
8527 | 8527 | |
8528 | 8528 | // |
@@ -8669,7 +8669,7 @@ discard block |
||
8669 | 8669 | && |
8670 | 8670 | self::$SUPPORT['mbstring'] === false |
8671 | 8671 | ) { |
8672 | - \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8672 | + \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8673 | 8673 | } |
8674 | 8674 | |
8675 | 8675 | // |
@@ -8800,7 +8800,7 @@ discard block |
||
8800 | 8800 | return 0; |
8801 | 8801 | } |
8802 | 8802 | |
8803 | - return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8803 | + return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8804 | 8804 | } |
8805 | 8805 | |
8806 | 8806 | /** |
@@ -8856,7 +8856,7 @@ discard block |
||
8856 | 8856 | && |
8857 | 8857 | self::$SUPPORT['mbstring'] === false |
8858 | 8858 | ) { |
8859 | - \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
8859 | + \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
8860 | 8860 | } |
8861 | 8861 | |
8862 | 8862 | // |
@@ -8894,7 +8894,7 @@ discard block |
||
8894 | 8894 | // fallback via vanilla php |
8895 | 8895 | // |
8896 | 8896 | |
8897 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match); |
|
8897 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match); |
|
8898 | 8898 | |
8899 | 8899 | if (!isset($match[1])) { |
8900 | 8900 | return false; |
@@ -9032,9 +9032,9 @@ discard block |
||
9032 | 9032 | |
9033 | 9033 | if (self::$SUPPORT['intl'] === true) { |
9034 | 9034 | |
9035 | - $langCode = $lang . '-Lower'; |
|
9035 | + $langCode = $lang.'-Lower'; |
|
9036 | 9036 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9037 | - \trigger_error('UTF8::strtolower() cannot handle special language: ' . $lang, E_USER_WARNING); |
|
9037 | + \trigger_error('UTF8::strtolower() cannot handle special language: '.$lang, E_USER_WARNING); |
|
9038 | 9038 | |
9039 | 9039 | $langCode = 'Any-Lower'; |
9040 | 9040 | } |
@@ -9043,7 +9043,7 @@ discard block |
||
9043 | 9043 | return transliterator_transliterate($langCode, $str); |
9044 | 9044 | } |
9045 | 9045 | |
9046 | - \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: ' . $lang, E_USER_WARNING); |
|
9046 | + \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: '.$lang, E_USER_WARNING); |
|
9047 | 9047 | } |
9048 | 9048 | |
9049 | 9049 | // always fallback via symfony polyfill |
@@ -9108,9 +9108,9 @@ discard block |
||
9108 | 9108 | |
9109 | 9109 | if (self::$SUPPORT['intl'] === true) { |
9110 | 9110 | |
9111 | - $langCode = $lang . '-Upper'; |
|
9111 | + $langCode = $lang.'-Upper'; |
|
9112 | 9112 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9113 | - \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
9113 | + \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
9114 | 9114 | |
9115 | 9115 | $langCode = 'Any-Upper'; |
9116 | 9116 | } |
@@ -9119,7 +9119,7 @@ discard block |
||
9119 | 9119 | return transliterator_transliterate($langCode, $str); |
9120 | 9120 | } |
9121 | 9121 | |
9122 | - \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
9122 | + \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
9123 | 9123 | } |
9124 | 9124 | |
9125 | 9125 | // always fallback via symfony polyfill |
@@ -9326,7 +9326,7 @@ discard block |
||
9326 | 9326 | && |
9327 | 9327 | self::$SUPPORT['mbstring'] === false |
9328 | 9328 | ) { |
9329 | - \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9329 | + \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9330 | 9330 | } |
9331 | 9331 | |
9332 | 9332 | // |
@@ -9506,14 +9506,14 @@ discard block |
||
9506 | 9506 | && |
9507 | 9507 | self::$SUPPORT['mbstring'] === false |
9508 | 9508 | ) { |
9509 | - \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
9509 | + \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
9510 | 9510 | } |
9511 | 9511 | |
9512 | 9512 | if (self::$SUPPORT['mbstring'] === true) { |
9513 | 9513 | return \mb_substr_count($haystack, $needle, $encoding); |
9514 | 9514 | } |
9515 | 9515 | |
9516 | - \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
9516 | + \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
9517 | 9517 | |
9518 | 9518 | return \count($matches); |
9519 | 9519 | } |
@@ -9838,8 +9838,7 @@ discard block |
||
9838 | 9838 | |
9839 | 9839 | if (self::is_ascii($str)) { |
9840 | 9840 | return ($length === null) ? |
9841 | - \substr_replace($str, $replacement, $offset) : |
|
9842 | - \substr_replace($str, $replacement, $offset, $length); |
|
9841 | + \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length); |
|
9843 | 9842 | } |
9844 | 9843 | |
9845 | 9844 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -9865,7 +9864,7 @@ discard block |
||
9865 | 9864 | $length = $string_length - $offset; |
9866 | 9865 | } |
9867 | 9866 | |
9868 | - return self::substr($str, 0, $offset, $encoding) . $replacement . self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9867 | + return self::substr($str, 0, $offset, $encoding).$replacement.self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9869 | 9868 | } |
9870 | 9869 | |
9871 | 9870 | \preg_match_all('/./us', $str, $smatches); |
@@ -10286,9 +10285,9 @@ discard block |
||
10286 | 10285 | |
10287 | 10286 | $string = (string)\preg_replace( |
10288 | 10287 | [ |
10289 | - '/[^' . $fallback_char_escaped . '\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10290 | - '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10291 | - '/[' . $fallback_char_escaped . ']+/', // 3) remove double $fallback_char's |
|
10288 | + '/[^'.$fallback_char_escaped.'\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10289 | + '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10290 | + '/['.$fallback_char_escaped.']+/', // 3) remove double $fallback_char's |
|
10292 | 10291 | ], |
10293 | 10292 | [ |
10294 | 10293 | '', |
@@ -10389,7 +10388,7 @@ discard block |
||
10389 | 10388 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
10390 | 10389 | |
10391 | 10390 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10392 | - $buf .= $c1 . $c2; |
|
10391 | + $buf .= $c1.$c2; |
|
10393 | 10392 | $i++; |
10394 | 10393 | } else { // not valid UTF8 - convert it |
10395 | 10394 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10401,7 +10400,7 @@ discard block |
||
10401 | 10400 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
10402 | 10401 | |
10403 | 10402 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10404 | - $buf .= $c1 . $c2 . $c3; |
|
10403 | + $buf .= $c1.$c2.$c3; |
|
10405 | 10404 | $i += 2; |
10406 | 10405 | } else { // not valid UTF8 - convert it |
10407 | 10406 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10414,7 +10413,7 @@ discard block |
||
10414 | 10413 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
10415 | 10414 | |
10416 | 10415 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10417 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
10416 | + $buf .= $c1.$c2.$c3.$c4; |
|
10418 | 10417 | $i += 3; |
10419 | 10418 | } else { // not valid UTF8 - convert it |
10420 | 10419 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10436,7 +10435,7 @@ discard block |
||
10436 | 10435 | // decode unicode escape sequences |
10437 | 10436 | $buf = \preg_replace_callback( |
10438 | 10437 | '/\\\\u([0-9a-f]{4})/i', |
10439 | - function ($match) { |
|
10438 | + function($match) { |
|
10440 | 10439 | // always fallback via symfony polyfill |
10441 | 10440 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
10442 | 10441 | }, |
@@ -10479,7 +10478,7 @@ discard block |
||
10479 | 10478 | } else { |
10480 | 10479 | $cc1 = self::$CHR[$ordC1 / 64] | "\xC0"; |
10481 | 10480 | $cc2 = ((string)$input & "\x3F") | "\x80"; |
10482 | - $buf .= $cc1 . $cc2; |
|
10481 | + $buf .= $cc1.$cc2; |
|
10483 | 10482 | } |
10484 | 10483 | |
10485 | 10484 | return $buf; |
@@ -10547,7 +10546,7 @@ discard block |
||
10547 | 10546 | $tryToKeepStringLength |
10548 | 10547 | ); |
10549 | 10548 | |
10550 | - return $strPartOne . $strPartTwo; |
|
10549 | + return $strPartOne.$strPartTwo; |
|
10551 | 10550 | } |
10552 | 10551 | |
10553 | 10552 | /** |
@@ -10592,7 +10591,7 @@ discard block |
||
10592 | 10591 | $str = self::clean($str); |
10593 | 10592 | } |
10594 | 10593 | |
10595 | - $usePhpDefaultFunctions = !(bool)($charlist . \implode('', $exceptions)); |
|
10594 | + $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions)); |
|
10596 | 10595 | |
10597 | 10596 | if ( |
10598 | 10597 | $usePhpDefaultFunctions === true |
@@ -11096,7 +11095,7 @@ discard block |
||
11096 | 11095 | return ''; |
11097 | 11096 | } |
11098 | 11097 | |
11099 | - \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
11098 | + \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
11100 | 11099 | |
11101 | 11100 | if ( |
11102 | 11101 | !isset($matches[0]) |
@@ -11106,7 +11105,7 @@ discard block |
||
11106 | 11105 | return $str; |
11107 | 11106 | } |
11108 | 11107 | |
11109 | - return self::rtrim($matches[0]) . $strAddOn; |
|
11108 | + return self::rtrim($matches[0]).$strAddOn; |
|
11110 | 11109 | } |
11111 | 11110 | |
11112 | 11111 | /** |
@@ -11177,7 +11176,7 @@ discard block |
||
11177 | 11176 | $strReturn .= $break; |
11178 | 11177 | } |
11179 | 11178 | |
11180 | - return $strReturn . \implode('', $chars); |
|
11179 | + return $strReturn.\implode('', $chars); |
|
11181 | 11180 | } |
11182 | 11181 | |
11183 | 11182 | /** |