@@ -573,16 +573,16 @@ discard block |
||
573 | 573 | $chr = self::$CHR[$code_point]; |
574 | 574 | } elseif ($code_point <= 0x7FF) { |
575 | 575 | $chr = self::$CHR[($code_point >> 6) + 0xC0] . |
576 | - self::$CHR[($code_point & 0x3F) + 0x80]; |
|
576 | + self::$CHR[($code_point & 0x3F) + 0x80]; |
|
577 | 577 | } elseif ($code_point <= 0xFFFF) { |
578 | 578 | $chr = self::$CHR[($code_point >> 12) + 0xE0] . |
579 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
580 | - self::$CHR[($code_point & 0x3F) + 0x80]; |
|
579 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
580 | + self::$CHR[($code_point & 0x3F) + 0x80]; |
|
581 | 581 | } else { |
582 | 582 | $chr = self::$CHR[($code_point >> 18) + 0xF0] . |
583 | - self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] . |
|
584 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
585 | - self::$CHR[($code_point & 0x3F) + 0x80]; |
|
583 | + self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] . |
|
584 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
585 | + self::$CHR[($code_point & 0x3F) + 0x80]; |
|
586 | 586 | } |
587 | 587 | |
588 | 588 | if ($encoding !== 'UTF-8') { |
@@ -3189,10 +3189,10 @@ discard block |
||
3189 | 3189 | |
3190 | 3190 | /** @noinspection PhpComposerExtensionStubsInspection */ |
3191 | 3191 | return ( |
3192 | - \is_object($json) === true |
|
3192 | + \is_object($json) === true |
|
3193 | 3193 | || |
3194 | 3194 | \is_array($json) === true |
3195 | - ) |
|
3195 | + ) |
|
3196 | 3196 | && |
3197 | 3197 | \json_last_error() === \JSON_ERROR_NONE; |
3198 | 3198 | } |
@@ -243,7 +243,7 @@ discard block |
||
243 | 243 | return ''; |
244 | 244 | } |
245 | 245 | |
246 | - return (string) self::substr($str, $pos, 1); |
|
246 | + return (string)self::substr($str, $pos, 1); |
|
247 | 247 | } |
248 | 248 | |
249 | 249 | /** |
@@ -258,7 +258,7 @@ discard block |
||
258 | 258 | public static function add_bom_to_string(string $str): string |
259 | 259 | { |
260 | 260 | if (self::string_has_bom($str) === false) { |
261 | - $str = self::bom() . $str; |
|
261 | + $str = self::bom().$str; |
|
262 | 262 | } |
263 | 263 | |
264 | 264 | return $str; |
@@ -428,7 +428,7 @@ discard block |
||
428 | 428 | */ |
429 | 429 | public static function char_at(string $str, int $index, string $encoding = 'UTF-8'): string |
430 | 430 | { |
431 | - return (string) self::substr($str, $index, 1, $encoding); |
|
431 | + return (string)self::substr($str, $index, 1, $encoding); |
|
432 | 432 | } |
433 | 433 | |
434 | 434 | /** |
@@ -524,10 +524,10 @@ discard block |
||
524 | 524 | && |
525 | 525 | self::$SUPPORT['mbstring'] === false |
526 | 526 | ) { |
527 | - \trigger_error('UTF8::chr() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
527 | + \trigger_error('UTF8::chr() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
528 | 528 | } |
529 | 529 | |
530 | - $cacheKey = $code_point . $encoding; |
|
530 | + $cacheKey = $code_point.$encoding; |
|
531 | 531 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
532 | 532 | return $CHAR_CACHE[$cacheKey]; |
533 | 533 | } |
@@ -537,7 +537,7 @@ discard block |
||
537 | 537 | if (self::$CHR === null) { |
538 | 538 | $chrTmp = self::getData('chr'); |
539 | 539 | if ($chrTmp) { |
540 | - self::$CHR = (array) $chrTmp; |
|
540 | + self::$CHR = (array)$chrTmp; |
|
541 | 541 | } |
542 | 542 | } |
543 | 543 | |
@@ -564,24 +564,24 @@ discard block |
||
564 | 564 | if (self::$CHR === null) { |
565 | 565 | $chrTmp = self::getData('chr'); |
566 | 566 | if ($chrTmp) { |
567 | - self::$CHR = (array) $chrTmp; |
|
567 | + self::$CHR = (array)$chrTmp; |
|
568 | 568 | } |
569 | 569 | } |
570 | 570 | |
571 | - $code_point = (int) $code_point; |
|
571 | + $code_point = (int)$code_point; |
|
572 | 572 | if ($code_point <= 0x7F) { |
573 | 573 | $chr = self::$CHR[$code_point]; |
574 | 574 | } elseif ($code_point <= 0x7FF) { |
575 | - $chr = self::$CHR[($code_point >> 6) + 0xC0] . |
|
575 | + $chr = self::$CHR[($code_point >> 6) + 0xC0]. |
|
576 | 576 | self::$CHR[($code_point & 0x3F) + 0x80]; |
577 | 577 | } elseif ($code_point <= 0xFFFF) { |
578 | - $chr = self::$CHR[($code_point >> 12) + 0xE0] . |
|
579 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
578 | + $chr = self::$CHR[($code_point >> 12) + 0xE0]. |
|
579 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80]. |
|
580 | 580 | self::$CHR[($code_point & 0x3F) + 0x80]; |
581 | 581 | } else { |
582 | - $chr = self::$CHR[($code_point >> 18) + 0xF0] . |
|
583 | - self::$CHR[(($code_point >> 12) & 0x3F) + 0x80] . |
|
584 | - self::$CHR[(($code_point >> 6) & 0x3F) + 0x80] . |
|
582 | + $chr = self::$CHR[($code_point >> 18) + 0xF0]. |
|
583 | + self::$CHR[(($code_point >> 12) & 0x3F) + 0x80]. |
|
584 | + self::$CHR[(($code_point >> 6) & 0x3F) + 0x80]. |
|
585 | 585 | self::$CHR[($code_point & 0x3F) + 0x80]; |
586 | 586 | } |
587 | 587 | |
@@ -633,7 +633,7 @@ discard block |
||
633 | 633 | |
634 | 634 | if (self::$SUPPORT['mbstring_func_overload'] === true) { |
635 | 635 | return \array_map( |
636 | - function ($data) { |
|
636 | + function($data) { |
|
637 | 637 | return self::strlen_in_byte($data); |
638 | 638 | }, |
639 | 639 | $strSplit |
@@ -774,7 +774,7 @@ discard block |
||
774 | 774 | | ( [\x80-\xBF] ) # invalid byte in range 10000000 - 10111111 |
775 | 775 | | ( [\xC0-\xFF] ) # invalid byte in range 11000000 - 11111111 |
776 | 776 | /x'; |
777 | - $str = (string) \preg_replace($regx, '$1', $str); |
|
777 | + $str = (string)\preg_replace($regx, '$1', $str); |
|
778 | 778 | |
779 | 779 | if ($replace_diamond_question_mark === true) { |
780 | 780 | $str = self::replace_diamond_question_mark($str, ''); |
@@ -809,7 +809,7 @@ discard block |
||
809 | 809 | public static function cleanup($str): string |
810 | 810 | { |
811 | 811 | // init |
812 | - $str = (string) $str; |
|
812 | + $str = (string)$str; |
|
813 | 813 | |
814 | 814 | if ($str === '') { |
815 | 815 | return ''; |
@@ -918,7 +918,7 @@ discard block |
||
918 | 918 | */ |
919 | 919 | public static function css_stripe_media_queries(string $str): string |
920 | 920 | { |
921 | - return (string) \preg_replace( |
|
921 | + return (string)\preg_replace( |
|
922 | 922 | '#@media\\s+(?:only\\s)?(?:[\\s{\\(]|screen|all)\\s?[^{]+{.*}\\s*}\\s*#misU', |
923 | 923 | '', |
924 | 924 | $str |
@@ -945,7 +945,7 @@ discard block |
||
945 | 945 | */ |
946 | 946 | public static function decimal_to_chr($int): string |
947 | 947 | { |
948 | - return self::html_entity_decode('&#' . $int . ';', \ENT_QUOTES | \ENT_HTML5); |
|
948 | + return self::html_entity_decode('&#'.$int.';', \ENT_QUOTES | \ENT_HTML5); |
|
949 | 949 | } |
950 | 950 | |
951 | 951 | /** |
@@ -1101,7 +1101,7 @@ discard block |
||
1101 | 1101 | && |
1102 | 1102 | self::$SUPPORT['mbstring'] === false |
1103 | 1103 | ) { |
1104 | - \trigger_error('UTF8::encode() without mbstring cannot handle "' . $toEncoding . '" encoding', \E_USER_WARNING); |
|
1104 | + \trigger_error('UTF8::encode() without mbstring cannot handle "'.$toEncoding.'" encoding', \E_USER_WARNING); |
|
1105 | 1105 | } |
1106 | 1106 | |
1107 | 1107 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -1190,7 +1190,7 @@ discard block |
||
1190 | 1190 | $trimChars = "\t\r\n -_()!~?=+/*\\,.:;\"'[]{}`&"; |
1191 | 1191 | |
1192 | 1192 | if ($length === null) { |
1193 | - $length = (int) \round(self::strlen($str, $encoding) / 2, 0); |
|
1193 | + $length = (int)\round(self::strlen($str, $encoding) / 2, 0); |
|
1194 | 1194 | } |
1195 | 1195 | |
1196 | 1196 | if (empty($search)) { |
@@ -1202,7 +1202,7 @@ discard block |
||
1202 | 1202 | $end = 0; |
1203 | 1203 | } |
1204 | 1204 | |
1205 | - $pos = (int) \min( |
|
1205 | + $pos = (int)\min( |
|
1206 | 1206 | self::strpos($str, ' ', $end, $encoding), |
1207 | 1207 | self::strpos($str, '.', $end, $encoding) |
1208 | 1208 | ); |
@@ -1213,20 +1213,20 @@ discard block |
||
1213 | 1213 | return ''; |
1214 | 1214 | } |
1215 | 1215 | |
1216 | - return \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1216 | + return \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1217 | 1217 | } |
1218 | 1218 | |
1219 | 1219 | return $str; |
1220 | 1220 | } |
1221 | 1221 | |
1222 | 1222 | $wordPos = self::stripos($str, $search, 0, $encoding); |
1223 | - $halfSide = (int) ($wordPos - $length / 2 + self::strlen($search, $encoding) / 2); |
|
1223 | + $halfSide = (int)($wordPos - $length / 2 + self::strlen($search, $encoding) / 2); |
|
1224 | 1224 | |
1225 | 1225 | $pos_start = 0; |
1226 | 1226 | if ($halfSide > 0) { |
1227 | 1227 | $halfText = self::substr($str, 0, $halfSide, $encoding); |
1228 | 1228 | if ($halfText !== false) { |
1229 | - $pos_start = (int) \max( |
|
1229 | + $pos_start = (int)\max( |
|
1230 | 1230 | self::strrpos($halfText, ' ', 0, $encoding), |
1231 | 1231 | self::strrpos($halfText, '.', 0, $encoding) |
1232 | 1232 | ); |
@@ -1241,7 +1241,7 @@ discard block |
||
1241 | 1241 | $l = $realLength; |
1242 | 1242 | } |
1243 | 1243 | |
1244 | - $pos_end = (int) \min( |
|
1244 | + $pos_end = (int)\min( |
|
1245 | 1245 | self::strpos($str, ' ', $l, $encoding), |
1246 | 1246 | self::strpos($str, '.', $l, $encoding) |
1247 | 1247 | ) - $pos_start; |
@@ -1249,14 +1249,14 @@ discard block |
||
1249 | 1249 | if (!$pos_end || $pos_end <= 0) { |
1250 | 1250 | $strSub = self::substr($str, $pos_start, self::strlen($str), $encoding); |
1251 | 1251 | if ($strSub !== false) { |
1252 | - $extract = $replacerForSkippedText . \ltrim($strSub, $trimChars); |
|
1252 | + $extract = $replacerForSkippedText.\ltrim($strSub, $trimChars); |
|
1253 | 1253 | } else { |
1254 | 1254 | $extract = ''; |
1255 | 1255 | } |
1256 | 1256 | } else { |
1257 | 1257 | $strSub = self::substr($str, $pos_start, $pos_end, $encoding); |
1258 | 1258 | if ($strSub !== false) { |
1259 | - $extract = $replacerForSkippedText . \trim($strSub, $trimChars) . $replacerForSkippedText; |
|
1259 | + $extract = $replacerForSkippedText.\trim($strSub, $trimChars).$replacerForSkippedText; |
|
1260 | 1260 | } else { |
1261 | 1261 | $extract = ''; |
1262 | 1262 | } |
@@ -1277,7 +1277,7 @@ discard block |
||
1277 | 1277 | if ($pos_end) { |
1278 | 1278 | $strSub = self::substr($str, 0, $pos_end, $encoding); |
1279 | 1279 | if ($strSub !== false) { |
1280 | - $extract = \rtrim($strSub, $trimChars) . $replacerForSkippedText; |
|
1280 | + $extract = \rtrim($strSub, $trimChars).$replacerForSkippedText; |
|
1281 | 1281 | } else { |
1282 | 1282 | $extract = ''; |
1283 | 1283 | } |
@@ -1397,7 +1397,7 @@ discard block |
||
1397 | 1397 | { |
1398 | 1398 | $file_content = \file_get_contents($file_path); |
1399 | 1399 | if ($file_content === false) { |
1400 | - throw new \RuntimeException('file_get_contents() returned false for:' . $file_path); |
|
1400 | + throw new \RuntimeException('file_get_contents() returned false for:'.$file_path); |
|
1401 | 1401 | } |
1402 | 1402 | |
1403 | 1403 | return self::string_has_bom($file_content); |
@@ -1459,7 +1459,7 @@ discard block |
||
1459 | 1459 | ) { |
1460 | 1460 | // Prevent leading combining chars |
1461 | 1461 | // for NFC-safe concatenations. |
1462 | - $var = $leading_combining . $var; |
|
1462 | + $var = $leading_combining.$var; |
|
1463 | 1463 | } |
1464 | 1464 | } |
1465 | 1465 | |
@@ -1727,13 +1727,13 @@ discard block |
||
1727 | 1727 | $lower = self::$COMMON_CASE_FOLD['lower']; |
1728 | 1728 | |
1729 | 1729 | if ($useLower === true) { |
1730 | - $str = (string) \str_replace( |
|
1730 | + $str = (string)\str_replace( |
|
1731 | 1731 | $upper, |
1732 | 1732 | $lower, |
1733 | 1733 | $str |
1734 | 1734 | ); |
1735 | 1735 | } else { |
1736 | - $str = (string) \str_replace( |
|
1736 | + $str = (string)\str_replace( |
|
1737 | 1737 | $lower, |
1738 | 1738 | $upper, |
1739 | 1739 | $str |
@@ -1747,9 +1747,9 @@ discard block |
||
1747 | 1747 | } |
1748 | 1748 | |
1749 | 1749 | if ($useLower === true) { |
1750 | - $str = (string) \str_replace($FULL_CASE_FOLD[0], $FULL_CASE_FOLD[1], $str); |
|
1750 | + $str = (string)\str_replace($FULL_CASE_FOLD[0], $FULL_CASE_FOLD[1], $str); |
|
1751 | 1751 | } else { |
1752 | - $str = (string) \str_replace($FULL_CASE_FOLD[1], $FULL_CASE_FOLD[0], $str); |
|
1752 | + $str = (string)\str_replace($FULL_CASE_FOLD[1], $FULL_CASE_FOLD[0], $str); |
|
1753 | 1753 | } |
1754 | 1754 | } |
1755 | 1755 | |
@@ -1809,7 +1809,7 @@ discard block |
||
1809 | 1809 | return $str; |
1810 | 1810 | } |
1811 | 1811 | |
1812 | - $str = (string) $str; |
|
1812 | + $str = (string)$str; |
|
1813 | 1813 | $last = ''; |
1814 | 1814 | while ($last !== $str) { |
1815 | 1815 | $last = $str; |
@@ -1948,7 +1948,7 @@ discard block |
||
1948 | 1948 | */ |
1949 | 1949 | private static function getData(string $file) |
1950 | 1950 | { |
1951 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
1951 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
1952 | 1952 | if (\file_exists($file)) { |
1953 | 1953 | /** @noinspection PhpIncludeInspection */ |
1954 | 1954 | return require $file; |
@@ -2012,7 +2012,7 @@ discard block |
||
2012 | 2012 | } |
2013 | 2013 | |
2014 | 2014 | $str_info = \unpack('C2chars', $str_info); |
2015 | - $type_code = (int) ($str_info['chars1'] . $str_info['chars2']); |
|
2015 | + $type_code = (int)($str_info['chars1'].$str_info['chars2']); |
|
2016 | 2016 | |
2017 | 2017 | // DEBUG |
2018 | 2018 | //var_dump($type_code); |
@@ -2125,16 +2125,16 @@ discard block |
||
2125 | 2125 | */ |
2126 | 2126 | public static function get_unique_string($entropyExtra = '', bool $md5 = true): string |
2127 | 2127 | { |
2128 | - $uniqueHelper = \mt_rand() . |
|
2129 | - \session_id() . |
|
2130 | - ($_SERVER['REMOTE_ADDR'] ?? '') . |
|
2131 | - ($_SERVER['SERVER_ADDR'] ?? '') . |
|
2128 | + $uniqueHelper = \mt_rand(). |
|
2129 | + \session_id(). |
|
2130 | + ($_SERVER['REMOTE_ADDR'] ?? ''). |
|
2131 | + ($_SERVER['SERVER_ADDR'] ?? ''). |
|
2132 | 2132 | $entropyExtra; |
2133 | 2133 | |
2134 | 2134 | $uniqueString = \uniqid($uniqueHelper, true); |
2135 | 2135 | |
2136 | 2136 | if ($md5) { |
2137 | - $uniqueString = \md5($uniqueString . $uniqueHelper); |
|
2137 | + $uniqueString = \md5($uniqueString.$uniqueHelper); |
|
2138 | 2138 | } |
2139 | 2139 | |
2140 | 2140 | return $uniqueString; |
@@ -2204,7 +2204,7 @@ discard block |
||
2204 | 2204 | public static function hex_to_int($hexDec) |
2205 | 2205 | { |
2206 | 2206 | // init |
2207 | - $hexDec = (string) $hexDec; |
|
2207 | + $hexDec = (string)$hexDec; |
|
2208 | 2208 | |
2209 | 2209 | if ($hexDec === '') { |
2210 | 2210 | return false; |
@@ -2279,7 +2279,7 @@ discard block |
||
2279 | 2279 | return \implode( |
2280 | 2280 | '', |
2281 | 2281 | \array_map( |
2282 | - function ($chr) use ($keepAsciiChars, $encoding) { |
|
2282 | + function($chr) use ($keepAsciiChars, $encoding) { |
|
2283 | 2283 | return self::single_chr_html_encode($chr, $keepAsciiChars, $encoding); |
2284 | 2284 | }, |
2285 | 2285 | self::split($str) |
@@ -2395,7 +2395,7 @@ discard block |
||
2395 | 2395 | && |
2396 | 2396 | self::$SUPPORT['mbstring'] === false |
2397 | 2397 | ) { |
2398 | - \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
2398 | + \trigger_error('UTF8::html_entity_decode() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
2399 | 2399 | } |
2400 | 2400 | |
2401 | 2401 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -2413,9 +2413,9 @@ discard block |
||
2413 | 2413 | $encoding |
2414 | 2414 | ); |
2415 | 2415 | } else { |
2416 | - $str = (string) \preg_replace_callback( |
|
2416 | + $str = (string)\preg_replace_callback( |
|
2417 | 2417 | "/&#\d{2,6};/", |
2418 | - function ($matches) use ($encoding) { |
|
2418 | + function($matches) use ($encoding) { |
|
2419 | 2419 | // always fallback via symfony polyfill |
2420 | 2420 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2421 | 2421 | |
@@ -2468,7 +2468,7 @@ discard block |
||
2468 | 2468 | */ |
2469 | 2469 | public static function html_stripe_empty_tags(string $str): string |
2470 | 2470 | { |
2471 | - return (string) \preg_replace( |
|
2471 | + return (string)\preg_replace( |
|
2472 | 2472 | "/<[^\/>]*>(([\s]?)*|)<\/[^>]*>/iu", |
2473 | 2473 | '', |
2474 | 2474 | $str |
@@ -2755,9 +2755,9 @@ discard block |
||
2755 | 2755 | { |
2756 | 2756 | $hex = \dechex($int); |
2757 | 2757 | |
2758 | - $hex = (\strlen($hex) < 4 ? \substr('0000' . $hex, -4) : $hex); |
|
2758 | + $hex = (\strlen($hex) < 4 ? \substr('0000'.$hex, -4) : $hex); |
|
2759 | 2759 | |
2760 | - return $pfix . $hex . ''; |
|
2760 | + return $pfix.$hex.''; |
|
2761 | 2761 | } |
2762 | 2762 | |
2763 | 2763 | /** |
@@ -2995,7 +2995,7 @@ discard block |
||
2995 | 2995 | return false; |
2996 | 2996 | } |
2997 | 2997 | |
2998 | - $base64String = (string) \base64_decode($str, true); |
|
2998 | + $base64String = (string)\base64_decode($str, true); |
|
2999 | 2999 | |
3000 | 3000 | return $base64String && \base64_encode($base64String) === $str; |
3001 | 3001 | } |
@@ -3010,7 +3010,7 @@ discard block |
||
3010 | 3010 | */ |
3011 | 3011 | public static function is_binary($input, bool $strict = false): bool |
3012 | 3012 | { |
3013 | - $input = (string) $input; |
|
3013 | + $input = (string)$input; |
|
3014 | 3014 | if ($input === '') { |
3015 | 3015 | return false; |
3016 | 3016 | } |
@@ -3259,7 +3259,7 @@ discard block |
||
3259 | 3259 | public static function is_utf16($str, $checkIfStringIsBinary = true) |
3260 | 3260 | { |
3261 | 3261 | // init |
3262 | - $str = (string) $str; |
|
3262 | + $str = (string)$str; |
|
3263 | 3263 | $strChars = []; |
3264 | 3264 | |
3265 | 3265 | if ( |
@@ -3335,7 +3335,7 @@ discard block |
||
3335 | 3335 | public static function is_utf32($str, $checkIfStringIsBinary = true) |
3336 | 3336 | { |
3337 | 3337 | // init |
3338 | - $str = (string) $str; |
|
3338 | + $str = (string)$str; |
|
3339 | 3339 | $strChars = []; |
3340 | 3340 | |
3341 | 3341 | if ( |
@@ -3457,7 +3457,7 @@ discard block |
||
3457 | 3457 | self::$ORD = self::getData('ord'); |
3458 | 3458 | } |
3459 | 3459 | |
3460 | - $len = self::strlen_in_byte((string) $str); |
|
3460 | + $len = self::strlen_in_byte((string)$str); |
|
3461 | 3461 | /** @noinspection ForeachInvariantsInspection */ |
3462 | 3462 | for ($i = 0; $i < $len; $i++) { |
3463 | 3463 | $in = self::$ORD[$str[$i]]; |
@@ -3692,14 +3692,14 @@ discard block |
||
3692 | 3692 | } |
3693 | 3693 | |
3694 | 3694 | $strPartOne = self::strtolower( |
3695 | - (string) self::substr($str, 0, 1, $encoding, $cleanUtf8), |
|
3695 | + (string)self::substr($str, 0, 1, $encoding, $cleanUtf8), |
|
3696 | 3696 | $encoding, |
3697 | 3697 | $cleanUtf8, |
3698 | 3698 | $lang, |
3699 | 3699 | $tryToKeepStringLength |
3700 | 3700 | ); |
3701 | 3701 | |
3702 | - return $strPartOne . $strPartTwo; |
|
3702 | + return $strPartOne.$strPartTwo; |
|
3703 | 3703 | } |
3704 | 3704 | |
3705 | 3705 | /** |
@@ -3867,7 +3867,7 @@ discard block |
||
3867 | 3867 | { |
3868 | 3868 | $bytes = self::chr_size_list($str); |
3869 | 3869 | if (\count($bytes) > 0) { |
3870 | - return (int) \max($bytes); |
|
3870 | + return (int)\max($bytes); |
|
3871 | 3871 | } |
3872 | 3872 | |
3873 | 3873 | return 0; |
@@ -3961,7 +3961,7 @@ discard block |
||
3961 | 3961 | static $STATIC_NORMALIZE_ENCODING_CACHE = []; |
3962 | 3962 | |
3963 | 3963 | // init |
3964 | - $encoding = (string) $encoding; |
|
3964 | + $encoding = (string)$encoding; |
|
3965 | 3965 | |
3966 | 3966 | if ( |
3967 | 3967 | !$encoding |
@@ -4099,7 +4099,7 @@ discard block |
||
4099 | 4099 | */ |
4100 | 4100 | public static function normalize_line_ending(string $str): string |
4101 | 4101 | { |
4102 | - return (string) \str_replace(["\r\n", "\r"], "\n", $str); |
|
4102 | + return (string)\str_replace(["\r\n", "\r"], "\n", $str); |
|
4103 | 4103 | } |
4104 | 4104 | |
4105 | 4105 | /** |
@@ -4147,7 +4147,7 @@ discard block |
||
4147 | 4147 | } |
4148 | 4148 | |
4149 | 4149 | static $WHITESPACE_CACHE = []; |
4150 | - $cacheKey = (int) $keepNonBreakingSpace; |
|
4150 | + $cacheKey = (int)$keepNonBreakingSpace; |
|
4151 | 4151 | |
4152 | 4152 | if (!isset($WHITESPACE_CACHE[$cacheKey])) { |
4153 | 4153 | $WHITESPACE_CACHE[$cacheKey] = self::$WHITESPACE_TABLE; |
@@ -4187,7 +4187,7 @@ discard block |
||
4187 | 4187 | public static function ord($chr, string $encoding = 'UTF-8'): int |
4188 | 4188 | { |
4189 | 4189 | // init |
4190 | - $chr = (string) $chr; |
|
4190 | + $chr = (string)$chr; |
|
4191 | 4191 | |
4192 | 4192 | static $CHAR_CACHE = []; |
4193 | 4193 | |
@@ -4198,7 +4198,7 @@ discard block |
||
4198 | 4198 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4199 | 4199 | } |
4200 | 4200 | |
4201 | - $cacheKey = $chr_orig . $encoding; |
|
4201 | + $cacheKey = $chr_orig.$encoding; |
|
4202 | 4202 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
4203 | 4203 | return $CHAR_CACHE[$cacheKey]; |
4204 | 4204 | } |
@@ -4229,22 +4229,22 @@ discard block |
||
4229 | 4229 | } |
4230 | 4230 | |
4231 | 4231 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
4232 | - $chr = \unpack('C*', (string) self::substr($chr, 0, 4, 'CP850')); |
|
4232 | + $chr = \unpack('C*', (string)self::substr($chr, 0, 4, 'CP850')); |
|
4233 | 4233 | $code = $chr ? $chr[1] : 0; |
4234 | 4234 | |
4235 | 4235 | if ($code >= 0xF0 && isset($chr[4])) { |
4236 | 4236 | /** @noinspection UnnecessaryCastingInspection */ |
4237 | - return $CHAR_CACHE[$cacheKey] = (int) ((($code - 0xF0) << 18) + (($chr[2] - 0x80) << 12) + (($chr[3] - 0x80) << 6) + $chr[4] - 0x80); |
|
4237 | + return $CHAR_CACHE[$cacheKey] = (int)((($code - 0xF0) << 18) + (($chr[2] - 0x80) << 12) + (($chr[3] - 0x80) << 6) + $chr[4] - 0x80); |
|
4238 | 4238 | } |
4239 | 4239 | |
4240 | 4240 | if ($code >= 0xE0 && isset($chr[3])) { |
4241 | 4241 | /** @noinspection UnnecessaryCastingInspection */ |
4242 | - return $CHAR_CACHE[$cacheKey] = (int) ((($code - 0xE0) << 12) + (($chr[2] - 0x80) << 6) + $chr[3] - 0x80); |
|
4242 | + return $CHAR_CACHE[$cacheKey] = (int)((($code - 0xE0) << 12) + (($chr[2] - 0x80) << 6) + $chr[3] - 0x80); |
|
4243 | 4243 | } |
4244 | 4244 | |
4245 | 4245 | if ($code >= 0xC0 && isset($chr[2])) { |
4246 | 4246 | /** @noinspection UnnecessaryCastingInspection */ |
4247 | - return $CHAR_CACHE[$cacheKey] = (int) ((($code - 0xC0) << 6) + $chr[2] - 0x80); |
|
4247 | + return $CHAR_CACHE[$cacheKey] = (int)((($code - 0xC0) << 6) + $chr[2] - 0x80); |
|
4248 | 4248 | } |
4249 | 4249 | |
4250 | 4250 | return $CHAR_CACHE[$cacheKey] = $code; |
@@ -4297,7 +4297,7 @@ discard block |
||
4297 | 4297 | public static function pcre_utf8_support(): bool |
4298 | 4298 | { |
4299 | 4299 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
4300 | - return (bool) @\preg_match('//u', ''); |
|
4300 | + return (bool)@\preg_match('//u', ''); |
|
4301 | 4301 | } |
4302 | 4302 | |
4303 | 4303 | /** |
@@ -4323,10 +4323,10 @@ discard block |
||
4323 | 4323 | } |
4324 | 4324 | |
4325 | 4325 | /** @noinspection PhpComposerExtensionStubsInspection */ |
4326 | - if (\ctype_digit((string) $var1)) { |
|
4327 | - $start = (int) $var1; |
|
4326 | + if (\ctype_digit((string)$var1)) { |
|
4327 | + $start = (int)$var1; |
|
4328 | 4328 | } /** @noinspection PhpComposerExtensionStubsInspection */ elseif (\ctype_xdigit($var1)) { |
4329 | - $start = (int) self::hex_to_int($var1); |
|
4329 | + $start = (int)self::hex_to_int($var1); |
|
4330 | 4330 | } else { |
4331 | 4331 | $start = self::ord($var1); |
4332 | 4332 | } |
@@ -4336,10 +4336,10 @@ discard block |
||
4336 | 4336 | } |
4337 | 4337 | |
4338 | 4338 | /** @noinspection PhpComposerExtensionStubsInspection */ |
4339 | - if (\ctype_digit((string) $var2)) { |
|
4340 | - $end = (int) $var2; |
|
4339 | + if (\ctype_digit((string)$var2)) { |
|
4340 | + $end = (int)$var2; |
|
4341 | 4341 | } /** @noinspection PhpComposerExtensionStubsInspection */ elseif (\ctype_xdigit($var2)) { |
4342 | - $end = (int) self::hex_to_int($var2); |
|
4342 | + $end = (int)self::hex_to_int($var2); |
|
4343 | 4343 | } else { |
4344 | 4344 | $end = self::ord($var2); |
4345 | 4345 | } |
@@ -4384,7 +4384,7 @@ discard block |
||
4384 | 4384 | |
4385 | 4385 | $pattern = '/%u([0-9a-f]{3,4})/i'; |
4386 | 4386 | if (\preg_match($pattern, $str)) { |
4387 | - $str = (string) \preg_replace($pattern, '&#x\\1;', \rawurldecode($str)); |
|
4387 | + $str = (string)\preg_replace($pattern, '&#x\\1;', \rawurldecode($str)); |
|
4388 | 4388 | } |
4389 | 4389 | |
4390 | 4390 | $flags = \ENT_QUOTES | \ENT_HTML5; |
@@ -4462,8 +4462,8 @@ discard block |
||
4462 | 4462 | $delimiter = '/'; |
4463 | 4463 | } |
4464 | 4464 | |
4465 | - return (string) \preg_replace( |
|
4466 | - $delimiter . $pattern . $delimiter . 'u' . $options, |
|
4465 | + return (string)\preg_replace( |
|
4466 | + $delimiter.$pattern.$delimiter.'u'.$options, |
|
4467 | 4467 | $replacement, |
4468 | 4468 | $str |
4469 | 4469 | ); |
@@ -4508,7 +4508,7 @@ discard block |
||
4508 | 4508 | |
4509 | 4509 | $strLength -= $bomByteLength; |
4510 | 4510 | |
4511 | - $str = (string) $strTmp; |
|
4511 | + $str = (string)$strTmp; |
|
4512 | 4512 | } |
4513 | 4513 | } |
4514 | 4514 | |
@@ -4532,7 +4532,7 @@ discard block |
||
4532 | 4532 | if (\is_array($what) === true) { |
4533 | 4533 | /** @noinspection ForeachSourceInspection */ |
4534 | 4534 | foreach ($what as $item) { |
4535 | - $str = (string) \preg_replace('/(' . \preg_quote($item, '/') . ')+/', $item, $str); |
|
4535 | + $str = (string)\preg_replace('/('.\preg_quote($item, '/').')+/', $item, $str); |
|
4536 | 4536 | } |
4537 | 4537 | } |
4538 | 4538 | |
@@ -4564,7 +4564,7 @@ discard block |
||
4564 | 4564 | */ |
4565 | 4565 | public static function remove_html_breaks(string $str, string $replacement = ''): string |
4566 | 4566 | { |
4567 | - return (string) \preg_replace("#/\r\n|\r|\n|<br.*/?>#isU", $replacement, $str); |
|
4567 | + return (string)\preg_replace("#/\r\n|\r|\n|<br.*/?>#isU", $replacement, $str); |
|
4568 | 4568 | } |
4569 | 4569 | |
4570 | 4570 | /** |
@@ -4595,7 +4595,7 @@ discard block |
||
4595 | 4595 | $non_displayables[] = '/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]+/S'; // 00-08, 11, 12, 14-31, 127 |
4596 | 4596 | |
4597 | 4597 | do { |
4598 | - $str = (string) \preg_replace($non_displayables, $replacement, $str, -1, $count); |
|
4598 | + $str = (string)\preg_replace($non_displayables, $replacement, $str, -1, $count); |
|
4599 | 4599 | } while ($count !== 0); |
4600 | 4600 | |
4601 | 4601 | return $str; |
@@ -4613,7 +4613,7 @@ discard block |
||
4613 | 4613 | public static function remove_left(string $str, string $substring, string $encoding = 'UTF-8'): string |
4614 | 4614 | { |
4615 | 4615 | if (self::str_starts_with($str, $substring)) { |
4616 | - return (string) self::substr( |
|
4616 | + return (string)self::substr( |
|
4617 | 4617 | $str, |
4618 | 4618 | self::strlen($substring, $encoding), |
4619 | 4619 | null, |
@@ -4636,7 +4636,7 @@ discard block |
||
4636 | 4636 | public static function remove_right(string $str, string $substring, string $encoding = 'UTF-8'): string |
4637 | 4637 | { |
4638 | 4638 | if (self::str_ends_with($str, $substring)) { |
4639 | - return (string) self::substr( |
|
4639 | + return (string)self::substr( |
|
4640 | 4640 | $str, |
4641 | 4641 | 0, |
4642 | 4642 | self::strlen($str, $encoding) - self::strlen($substring, $encoding) |
@@ -4778,7 +4778,7 @@ discard block |
||
4778 | 4778 | { |
4779 | 4779 | static $RX_CLASSS_CACHE = []; |
4780 | 4780 | |
4781 | - $cacheKey = $s . $class; |
|
4781 | + $cacheKey = $s.$class; |
|
4782 | 4782 | |
4783 | 4783 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4784 | 4784 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4790,7 +4790,7 @@ discard block |
||
4790 | 4790 | /** @noinspection SuspiciousLoopInspection */ |
4791 | 4791 | foreach (self::str_split($s) as $s) { |
4792 | 4792 | if ($s === '-') { |
4793 | - $class[0] = '-' . $class[0]; |
|
4793 | + $class[0] = '-'.$class[0]; |
|
4794 | 4794 | } elseif (!isset($s[2])) { |
4795 | 4795 | $class[0] .= \preg_quote($s, '/'); |
4796 | 4796 | } elseif (self::strlen($s) === 1) { |
@@ -4801,13 +4801,13 @@ discard block |
||
4801 | 4801 | } |
4802 | 4802 | |
4803 | 4803 | if ($class[0]) { |
4804 | - $class[0] = '[' . $class[0] . ']'; |
|
4804 | + $class[0] = '['.$class[0].']'; |
|
4805 | 4805 | } |
4806 | 4806 | |
4807 | 4807 | if (\count($class) === 1) { |
4808 | 4808 | $return = $class[0]; |
4809 | 4809 | } else { |
4810 | - $return = '(?:' . \implode('|', $class) . ')'; |
|
4810 | + $return = '(?:'.\implode('|', $class).')'; |
|
4811 | 4811 | } |
4812 | 4812 | |
4813 | 4813 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4826,7 +4826,7 @@ discard block |
||
4826 | 4826 | |
4827 | 4827 | echo '<pre>'; |
4828 | 4828 | foreach (self::$SUPPORT as $key => $value) { |
4829 | - echo $key . ' - ' . \print_r($value, true) . "\n<br>"; |
|
4829 | + echo $key.' - '.\print_r($value, true)."\n<br>"; |
|
4830 | 4830 | } |
4831 | 4831 | echo '</pre>'; |
4832 | 4832 | } |
@@ -4858,7 +4858,7 @@ discard block |
||
4858 | 4858 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4859 | 4859 | } |
4860 | 4860 | |
4861 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4861 | + return '&#'.self::ord($char, $encoding).';'; |
|
4862 | 4862 | } |
4863 | 4863 | |
4864 | 4864 | /** |
@@ -4896,7 +4896,7 @@ discard block |
||
4896 | 4896 | } |
4897 | 4897 | |
4898 | 4898 | // init |
4899 | - $str = (string) $str; |
|
4899 | + $str = (string)$str; |
|
4900 | 4900 | |
4901 | 4901 | if ($str === '') { |
4902 | 4902 | return []; |
@@ -4939,7 +4939,7 @@ discard block |
||
4939 | 4939 | ($str[$i] & "\xE0") === "\xC0" |
4940 | 4940 | ) { |
4941 | 4941 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4942 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4942 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4943 | 4943 | |
4944 | 4944 | $i++; |
4945 | 4945 | } |
@@ -4953,7 +4953,7 @@ discard block |
||
4953 | 4953 | && |
4954 | 4954 | ($str[$i + 2] & "\xC0") === "\x80" |
4955 | 4955 | ) { |
4956 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4956 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4957 | 4957 | |
4958 | 4958 | $i += 2; |
4959 | 4959 | } |
@@ -4969,7 +4969,7 @@ discard block |
||
4969 | 4969 | && |
4970 | 4970 | ($str[$i + 3] & "\xC0") === "\x80" |
4971 | 4971 | ) { |
4972 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4972 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4973 | 4973 | |
4974 | 4974 | $i += 3; |
4975 | 4975 | } |
@@ -4981,7 +4981,7 @@ discard block |
||
4981 | 4981 | $ret = \array_chunk($ret, $length); |
4982 | 4982 | |
4983 | 4983 | return \array_map( |
4984 | - function ($item) { |
|
4984 | + function($item) { |
|
4985 | 4985 | return \implode('', $item); |
4986 | 4986 | }, |
4987 | 4987 | $ret |
@@ -5011,11 +5011,11 @@ discard block |
||
5011 | 5011 | public static function str_camelize(string $str, string $encoding = 'UTF-8', bool $cleanUtf8 = false, string $lang = null, bool $tryToKeepStringLength = false): string |
5012 | 5012 | { |
5013 | 5013 | $str = self::lcfirst(self::trim($str), $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5014 | - $str = (string) \preg_replace('/^[-_]+/', '', $str); |
|
5014 | + $str = (string)\preg_replace('/^[-_]+/', '', $str); |
|
5015 | 5015 | |
5016 | - $str = (string) \preg_replace_callback( |
|
5016 | + $str = (string)\preg_replace_callback( |
|
5017 | 5017 | '/[-_\s]+(.)?/u', |
5018 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5018 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5019 | 5019 | if (isset($match[1])) { |
5020 | 5020 | return self::strtoupper($match[1], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5021 | 5021 | } |
@@ -5025,9 +5025,9 @@ discard block |
||
5025 | 5025 | $str |
5026 | 5026 | ); |
5027 | 5027 | |
5028 | - $str = (string) \preg_replace_callback( |
|
5028 | + $str = (string)\preg_replace_callback( |
|
5029 | 5029 | '/[\d]+(.)?/u', |
5030 | - function ($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5030 | + function($match) use ($encoding, $cleanUtf8, $lang, $tryToKeepStringLength) { |
|
5031 | 5031 | return self::strtoupper($match[0], $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5032 | 5032 | }, |
5033 | 5033 | $str |
@@ -5162,7 +5162,7 @@ discard block |
||
5162 | 5162 | |
5163 | 5163 | // only a fallback to prevent BC in the api ... |
5164 | 5164 | if ($caseSensitive !== false && $caseSensitive !== true) { |
5165 | - $encoding = (string) $caseSensitive; |
|
5165 | + $encoding = (string)$caseSensitive; |
|
5166 | 5166 | } |
5167 | 5167 | |
5168 | 5168 | if ($caseSensitive) { |
@@ -5196,7 +5196,7 @@ discard block |
||
5196 | 5196 | |
5197 | 5197 | // only a fallback to prevent BC in the api ... |
5198 | 5198 | if ($caseSensitive !== false && $caseSensitive !== true) { |
5199 | - $encoding = (string) $caseSensitive; |
|
5199 | + $encoding = (string)$caseSensitive; |
|
5200 | 5200 | } |
5201 | 5201 | |
5202 | 5202 | foreach ($needles as $needle) { |
@@ -5278,11 +5278,11 @@ discard block |
||
5278 | 5278 | ): string { |
5279 | 5279 | $str = self::trim($str); |
5280 | 5280 | |
5281 | - $str = (string) \preg_replace('/\B([A-Z])/u', '-\1', $str); |
|
5281 | + $str = (string)\preg_replace('/\B([A-Z])/u', '-\1', $str); |
|
5282 | 5282 | |
5283 | 5283 | $str = self::strtolower($str, $encoding, $cleanUtf8, $lang, $tryToKeepStringLength); |
5284 | 5284 | |
5285 | - return (string) \preg_replace('/[-_\s]+/u', $delimiter, $str); |
|
5285 | + return (string)\preg_replace('/[-_\s]+/u', $delimiter, $str); |
|
5286 | 5286 | } |
5287 | 5287 | |
5288 | 5288 | /** |
@@ -5297,7 +5297,7 @@ discard block |
||
5297 | 5297 | public static function str_detect_encoding($str) |
5298 | 5298 | { |
5299 | 5299 | // init |
5300 | - $str = (string) $str; |
|
5300 | + $str = (string)$str; |
|
5301 | 5301 | |
5302 | 5302 | // |
5303 | 5303 | // 1.) check binary strings (010001001...) like UTF-16 / UTF-32 / PDF / Images / ... |
@@ -5403,7 +5403,7 @@ discard block |
||
5403 | 5403 | foreach (self::$ENCODINGS as $encodingTmp) { |
5404 | 5404 | // INFO: //IGNORE but still throw notice |
5405 | 5405 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
5406 | - if ((string) @\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str) === $str) { |
|
5406 | + if ((string)@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str) === $str) { |
|
5407 | 5407 | return $encodingTmp; |
5408 | 5408 | } |
5409 | 5409 | } |
@@ -5465,7 +5465,7 @@ discard block |
||
5465 | 5465 | public static function str_ensure_left(string $str, string $substring): string |
5466 | 5466 | { |
5467 | 5467 | if (!self::str_starts_with($str, $substring)) { |
5468 | - $str = $substring . $str; |
|
5468 | + $str = $substring.$str; |
|
5469 | 5469 | } |
5470 | 5470 | |
5471 | 5471 | return $str; |
@@ -5674,7 +5674,7 @@ discard block |
||
5674 | 5674 | $start = self::substr($str, 0, $index, $encoding); |
5675 | 5675 | $end = self::substr($str, $index, $len, $encoding); |
5676 | 5676 | |
5677 | - return $start . $substring . $end; |
|
5677 | + return $start.$substring.$end; |
|
5678 | 5678 | } |
5679 | 5679 | |
5680 | 5680 | /** |
@@ -5704,15 +5704,15 @@ discard block |
||
5704 | 5704 | */ |
5705 | 5705 | public static function str_ireplace($search, $replace, $subject, &$count = null) |
5706 | 5706 | { |
5707 | - $search = (array) $search; |
|
5707 | + $search = (array)$search; |
|
5708 | 5708 | |
5709 | 5709 | /** @noinspection AlterInForeachInspection */ |
5710 | 5710 | foreach ($search as &$s) { |
5711 | - $s = (string) $s; |
|
5711 | + $s = (string)$s; |
|
5712 | 5712 | if ($s === '') { |
5713 | 5713 | $s = '/^(?<=.)$/'; |
5714 | 5714 | } else { |
5715 | - $s = '/' . \preg_quote($s, '/') . '/ui'; |
|
5715 | + $s = '/'.\preg_quote($s, '/').'/ui'; |
|
5716 | 5716 | } |
5717 | 5717 | } |
5718 | 5718 | |
@@ -5744,11 +5744,11 @@ discard block |
||
5744 | 5744 | } |
5745 | 5745 | |
5746 | 5746 | if ($search === '') { |
5747 | - return $str . $replacement; |
|
5747 | + return $str.$replacement; |
|
5748 | 5748 | } |
5749 | 5749 | |
5750 | 5750 | if (\stripos($str, $search) === 0) { |
5751 | - return $replacement . \substr($str, \strlen($search)); |
|
5751 | + return $replacement.\substr($str, \strlen($search)); |
|
5752 | 5752 | } |
5753 | 5753 | |
5754 | 5754 | return $str; |
@@ -5776,11 +5776,11 @@ discard block |
||
5776 | 5776 | } |
5777 | 5777 | |
5778 | 5778 | if ($search === '') { |
5779 | - return $str . $replacement; |
|
5779 | + return $str.$replacement; |
|
5780 | 5780 | } |
5781 | 5781 | |
5782 | 5782 | if (\stripos($str, $search, \strlen($str) - \strlen($search)) !== false) { |
5783 | - $str = \substr($str, 0, -\strlen($search)) . $replacement; |
|
5783 | + $str = \substr($str, 0, -\strlen($search)).$replacement; |
|
5784 | 5784 | } |
5785 | 5785 | |
5786 | 5786 | return $str; |
@@ -5860,7 +5860,7 @@ discard block |
||
5860 | 5860 | return ''; |
5861 | 5861 | } |
5862 | 5862 | |
5863 | - return (string) self::substr( |
|
5863 | + return (string)self::substr( |
|
5864 | 5864 | $str, |
5865 | 5865 | $offset + self::strlen($separator, $encoding), |
5866 | 5866 | null, |
@@ -5892,7 +5892,7 @@ discard block |
||
5892 | 5892 | return ''; |
5893 | 5893 | } |
5894 | 5894 | |
5895 | - return (string) self::substr( |
|
5895 | + return (string)self::substr( |
|
5896 | 5896 | $str, |
5897 | 5897 | $offset + self::strlen($separator, $encoding), |
5898 | 5898 | null, |
@@ -5924,7 +5924,7 @@ discard block |
||
5924 | 5924 | return ''; |
5925 | 5925 | } |
5926 | 5926 | |
5927 | - return (string) self::substr($str, 0, $offset, $encoding); |
|
5927 | + return (string)self::substr($str, 0, $offset, $encoding); |
|
5928 | 5928 | } |
5929 | 5929 | |
5930 | 5930 | /** |
@@ -5951,7 +5951,7 @@ discard block |
||
5951 | 5951 | return ''; |
5952 | 5952 | } |
5953 | 5953 | |
5954 | - return (string) self::substr($str, 0, $offset, $encoding); |
|
5954 | + return (string)self::substr($str, 0, $offset, $encoding); |
|
5955 | 5955 | } |
5956 | 5956 | |
5957 | 5957 | /** |
@@ -6059,7 +6059,7 @@ discard block |
||
6059 | 6059 | return $str; |
6060 | 6060 | } |
6061 | 6061 | |
6062 | - return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding) . $strAddOn; |
|
6062 | + return self::substr($str, 0, $length - self::strlen($strAddOn), $encoding).$strAddOn; |
|
6063 | 6063 | } |
6064 | 6064 | |
6065 | 6065 | /** |
@@ -6087,18 +6087,18 @@ discard block |
||
6087 | 6087 | } |
6088 | 6088 | |
6089 | 6089 | if (self::substr($str, $length - 1, 1, $encoding) === ' ') { |
6090 | - return self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6090 | + return self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6091 | 6091 | } |
6092 | 6092 | |
6093 | - $str = (string) self::substr($str, 0, $length, $encoding); |
|
6093 | + $str = (string)self::substr($str, 0, $length, $encoding); |
|
6094 | 6094 | $array = \explode(' ', $str); |
6095 | 6095 | \array_pop($array); |
6096 | 6096 | $new_str = \implode(' ', $array); |
6097 | 6097 | |
6098 | 6098 | if ($new_str === '') { |
6099 | - $str = self::substr($str, 0, $length - 1, $encoding) . $strAddOn; |
|
6099 | + $str = self::substr($str, 0, $length - 1, $encoding).$strAddOn; |
|
6100 | 6100 | } else { |
6101 | - $str = $new_str . $strAddOn; |
|
6101 | + $str = $new_str.$strAddOn; |
|
6102 | 6102 | } |
6103 | 6103 | |
6104 | 6104 | return $str; |
@@ -6201,7 +6201,7 @@ discard block |
||
6201 | 6201 | $char = self::substr($str, -$i, 1, $encoding); |
6202 | 6202 | |
6203 | 6203 | if ($char === self::substr($otherStr, -$i, 1, $encoding)) { |
6204 | - $longestCommonSuffix = $char . $longestCommonSuffix; |
|
6204 | + $longestCommonSuffix = $char.$longestCommonSuffix; |
|
6205 | 6205 | } else { |
6206 | 6206 | break; |
6207 | 6207 | } |
@@ -6220,7 +6220,7 @@ discard block |
||
6220 | 6220 | */ |
6221 | 6221 | public static function str_matches_pattern(string $str, string $pattern): bool |
6222 | 6222 | { |
6223 | - if (\preg_match('/' . $pattern . '/u', $str)) { |
|
6223 | + if (\preg_match('/'.$pattern.'/u', $str)) { |
|
6224 | 6224 | return true; |
6225 | 6225 | } |
6226 | 6226 | |
@@ -6300,7 +6300,7 @@ discard block |
||
6300 | 6300 | return ''; |
6301 | 6301 | } |
6302 | 6302 | |
6303 | - if ($pad_type !== (int) $pad_type) { |
|
6303 | + if ($pad_type !== (int)$pad_type) { |
|
6304 | 6304 | if ($pad_type === 'left') { |
6305 | 6305 | $pad_type = \STR_PAD_LEFT; |
6306 | 6306 | } elseif ($pad_type === 'right') { |
@@ -6309,7 +6309,7 @@ discard block |
||
6309 | 6309 | $pad_type = \STR_PAD_BOTH; |
6310 | 6310 | } else { |
6311 | 6311 | throw new \InvalidArgumentException( |
6312 | - 'Pad expects $padType to be "STR_PAD_*" or ' . "to be one of 'left', 'right' or 'both'" |
|
6312 | + 'Pad expects $padType to be "STR_PAD_*" or '."to be one of 'left', 'right' or 'both'" |
|
6313 | 6313 | ); |
6314 | 6314 | } |
6315 | 6315 | } |
@@ -6327,28 +6327,28 @@ discard block |
||
6327 | 6327 | |
6328 | 6328 | switch ($pad_type) { |
6329 | 6329 | case \STR_PAD_LEFT: |
6330 | - $pre = \str_repeat($pad_string, (int) \ceil($diff / $ps_length)); |
|
6331 | - $pre = (string) self::substr($pre, 0, $diff, $encoding); |
|
6330 | + $pre = \str_repeat($pad_string, (int)\ceil($diff / $ps_length)); |
|
6331 | + $pre = (string)self::substr($pre, 0, $diff, $encoding); |
|
6332 | 6332 | $post = ''; |
6333 | 6333 | |
6334 | 6334 | break; |
6335 | 6335 | |
6336 | 6336 | case \STR_PAD_BOTH: |
6337 | - $pre = \str_repeat($pad_string, (int) \ceil($diff / $ps_length / 2)); |
|
6338 | - $pre = (string) self::substr($pre, 0, (int) \floor($diff / 2), $encoding); |
|
6339 | - $post = \str_repeat($pad_string, (int) \ceil($diff / $ps_length / 2)); |
|
6340 | - $post = (string) self::substr($post, 0, (int) \ceil($diff / 2), $encoding); |
|
6337 | + $pre = \str_repeat($pad_string, (int)\ceil($diff / $ps_length / 2)); |
|
6338 | + $pre = (string)self::substr($pre, 0, (int)\floor($diff / 2), $encoding); |
|
6339 | + $post = \str_repeat($pad_string, (int)\ceil($diff / $ps_length / 2)); |
|
6340 | + $post = (string)self::substr($post, 0, (int)\ceil($diff / 2), $encoding); |
|
6341 | 6341 | |
6342 | 6342 | break; |
6343 | 6343 | |
6344 | 6344 | case \STR_PAD_RIGHT: |
6345 | 6345 | default: |
6346 | - $post = \str_repeat($pad_string, (int) \ceil($diff / $ps_length)); |
|
6347 | - $post = (string) self::substr($post, 0, $diff, $encoding); |
|
6346 | + $post = \str_repeat($pad_string, (int)\ceil($diff / $ps_length)); |
|
6347 | + $post = (string)self::substr($post, 0, $diff, $encoding); |
|
6348 | 6348 | $pre = ''; |
6349 | 6349 | } |
6350 | 6350 | |
6351 | - return $pre . $str . $post; |
|
6351 | + return $pre.$str.$post; |
|
6352 | 6352 | } |
6353 | 6353 | |
6354 | 6354 | return $str; |
@@ -6369,7 +6369,7 @@ discard block |
||
6369 | 6369 | { |
6370 | 6370 | $padding = $length - self::strlen($str, $encoding); |
6371 | 6371 | |
6372 | - return self::apply_padding($str, (int) \floor($padding / 2), (int) \ceil($padding / 2), $padStr, $encoding); |
|
6372 | + return self::apply_padding($str, (int)\floor($padding / 2), (int)\ceil($padding / 2), $padStr, $encoding); |
|
6373 | 6373 | } |
6374 | 6374 | |
6375 | 6375 | /** |
@@ -6485,11 +6485,11 @@ discard block |
||
6485 | 6485 | } |
6486 | 6486 | |
6487 | 6487 | if ($search === '') { |
6488 | - return $str . $replacement; |
|
6488 | + return $str.$replacement; |
|
6489 | 6489 | } |
6490 | 6490 | |
6491 | 6491 | if (\strpos($str, $search) === 0) { |
6492 | - return $replacement . \substr($str, \strlen($search)); |
|
6492 | + return $replacement.\substr($str, \strlen($search)); |
|
6493 | 6493 | } |
6494 | 6494 | |
6495 | 6495 | return $str; |
@@ -6517,11 +6517,11 @@ discard block |
||
6517 | 6517 | } |
6518 | 6518 | |
6519 | 6519 | if ($search === '') { |
6520 | - return $str . $replacement; |
|
6520 | + return $str.$replacement; |
|
6521 | 6521 | } |
6522 | 6522 | |
6523 | 6523 | if (\strpos($str, $search, \strlen($str) - \strlen($search)) !== false) { |
6524 | - $str = \substr($str, 0, -\strlen($search)) . $replacement; |
|
6524 | + $str = \substr($str, 0, -\strlen($search)).$replacement; |
|
6525 | 6525 | } |
6526 | 6526 | |
6527 | 6527 | return $str; |
@@ -6631,26 +6631,26 @@ discard block |
||
6631 | 6631 | $str = self::normalize_whitespace($str); |
6632 | 6632 | $str = \str_replace('-', '_', $str); |
6633 | 6633 | |
6634 | - $str = (string) \preg_replace_callback( |
|
6634 | + $str = (string)\preg_replace_callback( |
|
6635 | 6635 | '/([\d|A-Z])/u', |
6636 | - function ($matches) use ($encoding) { |
|
6636 | + function($matches) use ($encoding) { |
|
6637 | 6637 | $match = $matches[1]; |
6638 | - $matchInt = (int) $match; |
|
6638 | + $matchInt = (int)$match; |
|
6639 | 6639 | |
6640 | - if ((string) $matchInt === $match) { |
|
6641 | - return '_' . $match . '_'; |
|
6640 | + if ((string)$matchInt === $match) { |
|
6641 | + return '_'.$match.'_'; |
|
6642 | 6642 | } |
6643 | 6643 | |
6644 | - return '_' . self::strtolower($match, $encoding); |
|
6644 | + return '_'.self::strtolower($match, $encoding); |
|
6645 | 6645 | }, |
6646 | 6646 | $str |
6647 | 6647 | ); |
6648 | 6648 | |
6649 | - $str = (string) \preg_replace( |
|
6649 | + $str = (string)\preg_replace( |
|
6650 | 6650 | [ |
6651 | - '/\s+/', // convert spaces to "_" |
|
6652 | - '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6653 | - '/_+/', // remove double "_" |
|
6651 | + '/\s+/', // convert spaces to "_" |
|
6652 | + '/^\s+|\s+$/', // trim leading & trailing spaces |
|
6653 | + '/_+/', // remove double "_" |
|
6654 | 6654 | ], |
6655 | 6655 | [ |
6656 | 6656 | '_', |
@@ -6737,7 +6737,7 @@ discard block |
||
6737 | 6737 | $limit = -1; |
6738 | 6738 | } |
6739 | 6739 | |
6740 | - $array = \preg_split('/' . \preg_quote($pattern, '/') . '/u', $str, $limit); |
|
6740 | + $array = \preg_split('/'.\preg_quote($pattern, '/').'/u', $str, $limit); |
|
6741 | 6741 | |
6742 | 6742 | if ($array === false) { |
6743 | 6743 | return []; |
@@ -6824,7 +6824,7 @@ discard block |
||
6824 | 6824 | return ''; |
6825 | 6825 | } |
6826 | 6826 | |
6827 | - return (string) self::substr( |
|
6827 | + return (string)self::substr( |
|
6828 | 6828 | $str, |
6829 | 6829 | $offset + self::strlen($separator, $encoding), |
6830 | 6830 | null, |
@@ -6856,7 +6856,7 @@ discard block |
||
6856 | 6856 | return ''; |
6857 | 6857 | } |
6858 | 6858 | |
6859 | - return (string) self::substr( |
|
6859 | + return (string)self::substr( |
|
6860 | 6860 | $str, |
6861 | 6861 | $offset + self::strlen($separator, $encoding), |
6862 | 6862 | null, |
@@ -6888,7 +6888,7 @@ discard block |
||
6888 | 6888 | return ''; |
6889 | 6889 | } |
6890 | 6890 | |
6891 | - return (string) self::substr( |
|
6891 | + return (string)self::substr( |
|
6892 | 6892 | $str, |
6893 | 6893 | 0, |
6894 | 6894 | $offset, |
@@ -6920,7 +6920,7 @@ discard block |
||
6920 | 6920 | return ''; |
6921 | 6921 | } |
6922 | 6922 | |
6923 | - return (string) self::substr( |
|
6923 | + return (string)self::substr( |
|
6924 | 6924 | $str, |
6925 | 6925 | 0, |
6926 | 6926 | $offset, |
@@ -7111,19 +7111,19 @@ discard block |
||
7111 | 7111 | } |
7112 | 7112 | |
7113 | 7113 | // The main substitutions |
7114 | - $str = (string) \preg_replace_callback( |
|
7114 | + $str = (string)\preg_replace_callback( |
|
7115 | 7115 | '~\b (_*) (?: # 1. Leading underscore and |
7116 | 7116 | ( (?<=[ ][/\\\\]) [[:alpha:]]+ [-_[:alpha:]/\\\\]+ | # 2. file path or |
7117 | - [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx . ' ) # URL, domain, or email |
|
7117 | + [-_[:alpha:]]+ [@.:] [-_[:alpha:]@.:/]+ ' . $apostropheRx.' ) # URL, domain, or email |
|
7118 | 7118 | | |
7119 | - ( (?i: ' . $smallWordsRx . ' ) ' . $apostropheRx . ' ) # 3. or small word (case-insensitive) |
|
7119 | + ( (?i: ' . $smallWordsRx.' ) '.$apostropheRx.' ) # 3. or small word (case-insensitive) |
|
7120 | 7120 | | |
7121 | - ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 4. or word w/o internal caps |
|
7121 | + ( [[:alpha:]] [[:lower:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 4. or word w/o internal caps |
|
7122 | 7122 | | |
7123 | - ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx . ' ) # 5. or some other word |
|
7123 | + ( [[:alpha:]] [[:alpha:]\'’()\[\]{}]* ' . $apostropheRx.' ) # 5. or some other word |
|
7124 | 7124 | ) (_*) \b # 6. With trailing underscore |
7125 | 7125 | ~ux', |
7126 | - function ($matches) use ($encoding) { |
|
7126 | + function($matches) use ($encoding) { |
|
7127 | 7127 | // Preserve leading underscore |
7128 | 7128 | $str = $matches[1]; |
7129 | 7129 | if ($matches[2]) { |
@@ -7148,25 +7148,25 @@ discard block |
||
7148 | 7148 | ); |
7149 | 7149 | |
7150 | 7150 | // Exceptions for small words: capitalize at start of title... |
7151 | - $str = (string) \preg_replace_callback( |
|
7151 | + $str = (string)\preg_replace_callback( |
|
7152 | 7152 | '~( \A [[:punct:]]* # start of title... |
7153 | 7153 | | [:.;?!][ ]+ # or of subsentence... |
7154 | 7154 | | [ ][\'"“‘(\[][ ]* ) # or of inserted subphrase... |
7155 | - ( ' . $smallWordsRx . ' ) \b # ...followed by small word |
|
7155 | + ( ' . $smallWordsRx.' ) \b # ...followed by small word |
|
7156 | 7156 | ~uxi', |
7157 | - function ($matches) use ($encoding) { |
|
7158 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7157 | + function($matches) use ($encoding) { |
|
7158 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7159 | 7159 | }, |
7160 | 7160 | $str |
7161 | 7161 | ); |
7162 | 7162 | |
7163 | 7163 | // ...and end of title |
7164 | - $str = (string) \preg_replace_callback( |
|
7165 | - '~\b ( ' . $smallWordsRx . ' ) # small word... |
|
7164 | + $str = (string)\preg_replace_callback( |
|
7165 | + '~\b ( '.$smallWordsRx.' ) # small word... |
|
7166 | 7166 | (?= [[:punct:]]* \Z # ...at the end of the title... |
7167 | 7167 | | [\'"’”)\]] [ ] ) # ...or of an inserted subphrase? |
7168 | 7168 | ~uxi', |
7169 | - function ($matches) use ($encoding) { |
|
7169 | + function($matches) use ($encoding) { |
|
7170 | 7170 | return static::str_upper_first($matches[1], $encoding); |
7171 | 7171 | }, |
7172 | 7172 | $str |
@@ -7174,28 +7174,28 @@ discard block |
||
7174 | 7174 | |
7175 | 7175 | // Exceptions for small words in hyphenated compound words |
7176 | 7176 | // e.g. "in-flight" -> In-Flight |
7177 | - $str = (string) \preg_replace_callback( |
|
7177 | + $str = (string)\preg_replace_callback( |
|
7178 | 7178 | '~\b |
7179 | 7179 | (?<! -) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (in-flight) |
7180 | - ( ' . $smallWordsRx . ' ) |
|
7180 | + ( ' . $smallWordsRx.' ) |
|
7181 | 7181 | (?= -[[:alpha:]]+) # lookahead for "-someword" |
7182 | 7182 | ~uxi', |
7183 | - function ($matches) use ($encoding) { |
|
7183 | + function($matches) use ($encoding) { |
|
7184 | 7184 | return static::str_upper_first($matches[1], $encoding); |
7185 | 7185 | }, |
7186 | 7186 | $str |
7187 | 7187 | ); |
7188 | 7188 | |
7189 | 7189 | // e.g. "Stand-in" -> "Stand-In" (Stand is already capped at this point) |
7190 | - $str = (string) \preg_replace_callback( |
|
7190 | + $str = (string)\preg_replace_callback( |
|
7191 | 7191 | '~\b |
7192 | 7192 | (?<!…) # Negative lookbehind for a hyphen; we do not want to match man-in-the-middle but do want (stand-in) |
7193 | 7193 | ( [[:alpha:]]+- ) # $1 = first word and hyphen, should already be properly capped |
7194 | - ( ' . $smallWordsRx . ' ) # ...followed by small word |
|
7194 | + ( ' . $smallWordsRx.' ) # ...followed by small word |
|
7195 | 7195 | (?! - ) # Negative lookahead for another - |
7196 | 7196 | ~uxi', |
7197 | - function ($matches) use ($encoding) { |
|
7198 | - return $matches[1] . static::str_upper_first($matches[2], $encoding); |
|
7197 | + function($matches) use ($encoding) { |
|
7198 | + return $matches[1].static::str_upper_first($matches[2], $encoding); |
|
7199 | 7199 | }, |
7200 | 7200 | $str |
7201 | 7201 | ); |
@@ -7290,7 +7290,7 @@ discard block |
||
7290 | 7290 | ); |
7291 | 7291 | |
7292 | 7292 | foreach ($tmpReturn as &$item) { |
7293 | - $item = (string) $item; |
|
7293 | + $item = (string)$item; |
|
7294 | 7294 | } |
7295 | 7295 | |
7296 | 7296 | return $tmpReturn; |
@@ -7327,7 +7327,7 @@ discard block |
||
7327 | 7327 | public static function str_truncate($str, int $length, string $substring = '', string $encoding = 'UTF-8'): string |
7328 | 7328 | { |
7329 | 7329 | // init |
7330 | - $str = (string) $str; |
|
7330 | + $str = (string)$str; |
|
7331 | 7331 | |
7332 | 7332 | if ($str === '') { |
7333 | 7333 | return ''; |
@@ -7343,7 +7343,7 @@ discard block |
||
7343 | 7343 | |
7344 | 7344 | $truncated = self::substr($str, 0, $length, $encoding); |
7345 | 7345 | |
7346 | - return $truncated . $substring; |
|
7346 | + return $truncated.$substring; |
|
7347 | 7347 | } |
7348 | 7348 | |
7349 | 7349 | /** |
@@ -7381,11 +7381,11 @@ discard block |
||
7381 | 7381 | $lastPos = self::strrpos($truncated, ' ', 0, $encoding); |
7382 | 7382 | |
7383 | 7383 | if ($lastPos !== false || $strPosSpace !== false) { |
7384 | - $truncated = self::substr($truncated, 0, (int) $lastPos, $encoding); |
|
7384 | + $truncated = self::substr($truncated, 0, (int)$lastPos, $encoding); |
|
7385 | 7385 | } |
7386 | 7386 | } |
7387 | 7387 | |
7388 | - return $truncated . $substring; |
|
7388 | + return $truncated.$substring; |
|
7389 | 7389 | } |
7390 | 7390 | |
7391 | 7391 | /** |
@@ -7471,7 +7471,7 @@ discard block |
||
7471 | 7471 | $offset += self::strlen($strParts[$i]) + self::strlen($strParts[$i + 1]); |
7472 | 7472 | } |
7473 | 7473 | } else { |
7474 | - $numberOfWords = (int) (($len - 1) / 2); |
|
7474 | + $numberOfWords = (int)(($len - 1) / 2); |
|
7475 | 7475 | } |
7476 | 7476 | |
7477 | 7477 | return $numberOfWords; |
@@ -7531,7 +7531,7 @@ discard block |
||
7531 | 7531 | public static function strcmp(string $str1, string $str2): int |
7532 | 7532 | { |
7533 | 7533 | /** @noinspection PhpUndefinedClassInspection */ |
7534 | - return $str1 . '' === $str2 . '' ? 0 : \strcmp( |
|
7534 | + return $str1.'' === $str2.'' ? 0 : \strcmp( |
|
7535 | 7535 | \Normalizer::normalize($str1, \Normalizer::NFD), |
7536 | 7536 | \Normalizer::normalize($str2, \Normalizer::NFD) |
7537 | 7537 | ); |
@@ -7565,7 +7565,7 @@ discard block |
||
7565 | 7565 | return null; |
7566 | 7566 | } |
7567 | 7567 | |
7568 | - if (\preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
7568 | + if (\preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
7569 | 7569 | return self::strlen($length[1]); |
7570 | 7570 | } |
7571 | 7571 | |
@@ -7681,7 +7681,7 @@ discard block |
||
7681 | 7681 | return ''; |
7682 | 7682 | } |
7683 | 7683 | |
7684 | - return (string) \preg_replace('/[[:space:]]+/u', '', $str); |
|
7684 | + return (string)\preg_replace('/[[:space:]]+/u', '', $str); |
|
7685 | 7685 | } |
7686 | 7686 | |
7687 | 7687 | /** |
@@ -7802,7 +7802,7 @@ discard block |
||
7802 | 7802 | && |
7803 | 7803 | self::$SUPPORT['mbstring'] === false |
7804 | 7804 | ) { |
7805 | - \trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
7805 | + \trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
7806 | 7806 | } |
7807 | 7807 | |
7808 | 7808 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -7824,7 +7824,7 @@ discard block |
||
7824 | 7824 | return \stristr($haystack, $needle, $before_needle); |
7825 | 7825 | } |
7826 | 7826 | |
7827 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
7827 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/usi', $haystack, $match); |
|
7828 | 7828 | |
7829 | 7829 | if (!isset($match[1])) { |
7830 | 7830 | return false; |
@@ -7892,7 +7892,7 @@ discard block |
||
7892 | 7892 | && |
7893 | 7893 | self::$SUPPORT['iconv'] === false |
7894 | 7894 | ) { |
7895 | - \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
7895 | + \trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
7896 | 7896 | } |
7897 | 7897 | |
7898 | 7898 | // |
@@ -8018,7 +8018,7 @@ discard block |
||
8018 | 8018 | */ |
8019 | 8019 | public static function strnatcmp(string $str1, string $str2): int |
8020 | 8020 | { |
8021 | - return $str1 . '' === $str2 . '' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
8021 | + return $str1.'' === $str2.'' ? 0 : \strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
8022 | 8022 | } |
8023 | 8023 | |
8024 | 8024 | /** |
@@ -8061,8 +8061,8 @@ discard block |
||
8061 | 8061 | */ |
8062 | 8062 | public static function strncmp(string $str1, string $str2, int $len): int |
8063 | 8063 | { |
8064 | - $str1 = (string) self::substr($str1, 0, $len); |
|
8065 | - $str2 = (string) self::substr($str2, 0, $len); |
|
8064 | + $str1 = (string)self::substr($str1, 0, $len); |
|
8065 | + $str2 = (string)self::substr($str2, 0, $len); |
|
8066 | 8066 | |
8067 | 8067 | return self::strcmp($str1, $str2); |
8068 | 8068 | } |
@@ -8083,8 +8083,8 @@ discard block |
||
8083 | 8083 | return false; |
8084 | 8084 | } |
8085 | 8085 | |
8086 | - if (\preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
8087 | - return \substr($haystack, (int) \strpos($haystack, $m[0])); |
|
8086 | + if (\preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
8087 | + return \substr($haystack, (int)\strpos($haystack, $m[0])); |
|
8088 | 8088 | } |
8089 | 8089 | |
8090 | 8090 | return false; |
@@ -8112,10 +8112,10 @@ discard block |
||
8112 | 8112 | } |
8113 | 8113 | |
8114 | 8114 | // iconv and mbstring do not support integer $needle |
8115 | - if ((int) $needle === $needle && $needle >= 0) { |
|
8116 | - $needle = (string) self::chr($needle); |
|
8115 | + if ((int)$needle === $needle && $needle >= 0) { |
|
8116 | + $needle = (string)self::chr($needle); |
|
8117 | 8117 | } |
8118 | - $needle = (string) $needle; |
|
8118 | + $needle = (string)$needle; |
|
8119 | 8119 | |
8120 | 8120 | if ($needle === '') { |
8121 | 8121 | return false; |
@@ -8155,7 +8155,7 @@ discard block |
||
8155 | 8155 | && |
8156 | 8156 | self::$SUPPORT['mbstring'] === false |
8157 | 8157 | ) { |
8158 | - \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
8158 | + \trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
8159 | 8159 | } |
8160 | 8160 | |
8161 | 8161 | // |
@@ -8223,7 +8223,7 @@ discard block |
||
8223 | 8223 | if ($haystackTmp === false) { |
8224 | 8224 | $haystackTmp = ''; |
8225 | 8225 | } |
8226 | - $haystack = (string) $haystackTmp; |
|
8226 | + $haystack = (string)$haystackTmp; |
|
8227 | 8227 | |
8228 | 8228 | if ($offset < 0) { |
8229 | 8229 | $offset = 0; |
@@ -8321,7 +8321,7 @@ discard block |
||
8321 | 8321 | && |
8322 | 8322 | self::$SUPPORT['mbstring'] === false |
8323 | 8323 | ) { |
8324 | - \trigger_error('UTF8::strrchr() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
8324 | + \trigger_error('UTF8::strrchr() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
8325 | 8325 | } |
8326 | 8326 | |
8327 | 8327 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -8353,7 +8353,7 @@ discard block |
||
8353 | 8353 | if ($needleTmp === false) { |
8354 | 8354 | return false; |
8355 | 8355 | } |
8356 | - $needle = (string) $needleTmp; |
|
8356 | + $needle = (string)$needleTmp; |
|
8357 | 8357 | |
8358 | 8358 | $pos = \iconv_strrpos($haystack, $needle, $encoding); |
8359 | 8359 | if ($pos === false) { |
@@ -8375,7 +8375,7 @@ discard block |
||
8375 | 8375 | if ($needleTmp === false) { |
8376 | 8376 | return false; |
8377 | 8377 | } |
8378 | - $needle = (string) $needleTmp; |
|
8378 | + $needle = (string)$needleTmp; |
|
8379 | 8379 | |
8380 | 8380 | $pos = self::strrpos($haystack, $needle, null, $encoding); |
8381 | 8381 | if ($pos === false) { |
@@ -8468,7 +8468,7 @@ discard block |
||
8468 | 8468 | if ($needleTmp === false) { |
8469 | 8469 | return false; |
8470 | 8470 | } |
8471 | - $needle = (string) $needleTmp; |
|
8471 | + $needle = (string)$needleTmp; |
|
8472 | 8472 | |
8473 | 8473 | $pos = self::strripos($haystack, $needle, 0, $encoding); |
8474 | 8474 | if ($pos === false) { |
@@ -8502,10 +8502,10 @@ discard block |
||
8502 | 8502 | } |
8503 | 8503 | |
8504 | 8504 | // iconv and mbstring do not support integer $needle |
8505 | - if ((int) $needle === $needle && $needle >= 0) { |
|
8506 | - $needle = (string) self::chr($needle); |
|
8505 | + if ((int)$needle === $needle && $needle >= 0) { |
|
8506 | + $needle = (string)self::chr($needle); |
|
8507 | 8507 | } |
8508 | - $needle = (string) $needle; |
|
8508 | + $needle = (string)$needle; |
|
8509 | 8509 | |
8510 | 8510 | if ($needle === '') { |
8511 | 8511 | return false; |
@@ -8542,7 +8542,7 @@ discard block |
||
8542 | 8542 | && |
8543 | 8543 | self::$SUPPORT['mbstring'] === false |
8544 | 8544 | ) { |
8545 | - \trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
8545 | + \trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
8546 | 8546 | } |
8547 | 8547 | |
8548 | 8548 | // |
@@ -8649,10 +8649,10 @@ discard block |
||
8649 | 8649 | } |
8650 | 8650 | |
8651 | 8651 | // iconv and mbstring do not support integer $needle |
8652 | - if ((int) $needle === $needle && $needle >= 0) { |
|
8653 | - $needle = (string) self::chr($needle); |
|
8652 | + if ((int)$needle === $needle && $needle >= 0) { |
|
8653 | + $needle = (string)self::chr($needle); |
|
8654 | 8654 | } |
8655 | - $needle = (string) $needle; |
|
8655 | + $needle = (string)$needle; |
|
8656 | 8656 | |
8657 | 8657 | if ($needle === '') { |
8658 | 8658 | return false; |
@@ -8689,7 +8689,7 @@ discard block |
||
8689 | 8689 | && |
8690 | 8690 | self::$SUPPORT['mbstring'] === false |
8691 | 8691 | ) { |
8692 | - \trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
8692 | + \trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
8693 | 8693 | } |
8694 | 8694 | |
8695 | 8695 | // |
@@ -8749,7 +8749,7 @@ discard block |
||
8749 | 8749 | if ($haystackTmp === false) { |
8750 | 8750 | $haystackTmp = ''; |
8751 | 8751 | } |
8752 | - $haystack = (string) $haystackTmp; |
|
8752 | + $haystack = (string)$haystackTmp; |
|
8753 | 8753 | } |
8754 | 8754 | |
8755 | 8755 | $pos = self::strrpos_in_byte($haystack, $needle); |
@@ -8813,14 +8813,14 @@ discard block |
||
8813 | 8813 | if ($strTmp === false) { |
8814 | 8814 | $strTmp = ''; |
8815 | 8815 | } |
8816 | - $str = (string) $strTmp; |
|
8816 | + $str = (string)$strTmp; |
|
8817 | 8817 | } |
8818 | 8818 | |
8819 | 8819 | if ($str === '' || $mask === '') { |
8820 | 8820 | return 0; |
8821 | 8821 | } |
8822 | 8822 | |
8823 | - return \preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8823 | + return \preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
8824 | 8824 | } |
8825 | 8825 | |
8826 | 8826 | /** |
@@ -8876,7 +8876,7 @@ discard block |
||
8876 | 8876 | && |
8877 | 8877 | self::$SUPPORT['mbstring'] === false |
8878 | 8878 | ) { |
8879 | - \trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
8879 | + \trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
8880 | 8880 | } |
8881 | 8881 | |
8882 | 8882 | // |
@@ -8914,7 +8914,7 @@ discard block |
||
8914 | 8914 | // fallback via vanilla php |
8915 | 8915 | // |
8916 | 8916 | |
8917 | - \preg_match('/^(.*?)' . \preg_quote($needle, '/') . '/us', $haystack, $match); |
|
8917 | + \preg_match('/^(.*?)'.\preg_quote($needle, '/').'/us', $haystack, $match); |
|
8918 | 8918 | |
8919 | 8919 | if (!isset($match[1])) { |
8920 | 8920 | return false; |
@@ -9022,7 +9022,7 @@ discard block |
||
9022 | 9022 | public static function strtolower($str, string $encoding = 'UTF-8', bool $cleanUtf8 = false, string $lang = null, bool $tryToKeepStringLength = false): string |
9023 | 9023 | { |
9024 | 9024 | // init |
9025 | - $str = (string) $str; |
|
9025 | + $str = (string)$str; |
|
9026 | 9026 | |
9027 | 9027 | if ($str === '') { |
9028 | 9028 | return ''; |
@@ -9049,9 +9049,9 @@ discard block |
||
9049 | 9049 | } |
9050 | 9050 | |
9051 | 9051 | if (self::$SUPPORT['intl'] === true) { |
9052 | - $langCode = $lang . '-Lower'; |
|
9052 | + $langCode = $lang.'-Lower'; |
|
9053 | 9053 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9054 | - \trigger_error('UTF8::strtolower() cannot handle special language: ' . $lang, \E_USER_WARNING); |
|
9054 | + \trigger_error('UTF8::strtolower() cannot handle special language: '.$lang, \E_USER_WARNING); |
|
9055 | 9055 | |
9056 | 9056 | $langCode = 'Any-Lower'; |
9057 | 9057 | } |
@@ -9060,7 +9060,7 @@ discard block |
||
9060 | 9060 | return \transliterator_transliterate($langCode, $str); |
9061 | 9061 | } |
9062 | 9062 | |
9063 | - \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: ' . $lang, \E_USER_WARNING); |
|
9063 | + \trigger_error('UTF8::strtolower() without intl cannot handle the "lang" parameter: '.$lang, \E_USER_WARNING); |
|
9064 | 9064 | } |
9065 | 9065 | |
9066 | 9066 | // always fallback via symfony polyfill |
@@ -9096,7 +9096,7 @@ discard block |
||
9096 | 9096 | public static function strtoupper($str, string $encoding = 'UTF-8', bool $cleanUtf8 = false, string $lang = null, bool $tryToKeepStringLength = false): string |
9097 | 9097 | { |
9098 | 9098 | // init |
9099 | - $str = (string) $str; |
|
9099 | + $str = (string)$str; |
|
9100 | 9100 | |
9101 | 9101 | if ($str === '') { |
9102 | 9102 | return ''; |
@@ -9123,9 +9123,9 @@ discard block |
||
9123 | 9123 | } |
9124 | 9124 | |
9125 | 9125 | if (self::$SUPPORT['intl'] === true) { |
9126 | - $langCode = $lang . '-Upper'; |
|
9126 | + $langCode = $lang.'-Upper'; |
|
9127 | 9127 | if (!\in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
9128 | - \trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, \E_USER_WARNING); |
|
9128 | + \trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, \E_USER_WARNING); |
|
9129 | 9129 | |
9130 | 9130 | $langCode = 'Any-Upper'; |
9131 | 9131 | } |
@@ -9134,7 +9134,7 @@ discard block |
||
9134 | 9134 | return \transliterator_transliterate($langCode, $str); |
9135 | 9135 | } |
9136 | 9136 | |
9137 | - \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, \E_USER_WARNING); |
|
9137 | + \trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, \E_USER_WARNING); |
|
9138 | 9138 | } |
9139 | 9139 | |
9140 | 9140 | // always fallback via symfony polyfill |
@@ -9232,7 +9232,7 @@ discard block |
||
9232 | 9232 | } |
9233 | 9233 | |
9234 | 9234 | $wide = 0; |
9235 | - $str = (string) \preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $str, -1, $wide); |
|
9235 | + $str = (string)\preg_replace('/[\x{1100}-\x{115F}\x{2329}\x{232A}\x{2E80}-\x{303E}\x{3040}-\x{A4CF}\x{AC00}-\x{D7A3}\x{F900}-\x{FAFF}\x{FE10}-\x{FE19}\x{FE30}-\x{FE6F}\x{FF00}-\x{FF60}\x{FFE0}-\x{FFE6}\x{20000}-\x{2FFFD}\x{30000}-\x{3FFFD}]/u', '', $str, -1, $wide); |
|
9236 | 9236 | |
9237 | 9237 | return ($wide << 1) + self::strlen($str, 'UTF-8'); |
9238 | 9238 | } |
@@ -9330,9 +9330,9 @@ discard block |
||
9330 | 9330 | } |
9331 | 9331 | |
9332 | 9332 | if ($length === null) { |
9333 | - $length = (int) $str_length; |
|
9333 | + $length = (int)$str_length; |
|
9334 | 9334 | } else { |
9335 | - $length = (int) $length; |
|
9335 | + $length = (int)$length; |
|
9336 | 9336 | } |
9337 | 9337 | |
9338 | 9338 | if ( |
@@ -9340,7 +9340,7 @@ discard block |
||
9340 | 9340 | && |
9341 | 9341 | self::$SUPPORT['mbstring'] === false |
9342 | 9342 | ) { |
9343 | - \trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
9343 | + \trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
9344 | 9344 | } |
9345 | 9345 | |
9346 | 9346 | // |
@@ -9423,13 +9423,13 @@ discard block |
||
9423 | 9423 | if ($str1Tmp === false) { |
9424 | 9424 | $str1Tmp = ''; |
9425 | 9425 | } |
9426 | - $str1 = (string) $str1Tmp; |
|
9426 | + $str1 = (string)$str1Tmp; |
|
9427 | 9427 | |
9428 | 9428 | $str2Tmp = self::substr($str2, 0, self::strlen($str1)); |
9429 | 9429 | if ($str2Tmp === false) { |
9430 | 9430 | $str2Tmp = ''; |
9431 | 9431 | } |
9432 | - $str2 = (string) $str2Tmp; |
|
9432 | + $str2 = (string)$str2Tmp; |
|
9433 | 9433 | } |
9434 | 9434 | |
9435 | 9435 | if ($case_insensitivity === true) { |
@@ -9475,7 +9475,7 @@ discard block |
||
9475 | 9475 | if ($lengthTmp === false) { |
9476 | 9476 | return false; |
9477 | 9477 | } |
9478 | - $length = (int) $lengthTmp; |
|
9478 | + $length = (int)$lengthTmp; |
|
9479 | 9479 | } |
9480 | 9480 | |
9481 | 9481 | if ( |
@@ -9496,7 +9496,7 @@ discard block |
||
9496 | 9496 | if ($haystackTmp === false) { |
9497 | 9497 | $haystackTmp = ''; |
9498 | 9498 | } |
9499 | - $haystack = (string) $haystackTmp; |
|
9499 | + $haystack = (string)$haystackTmp; |
|
9500 | 9500 | } |
9501 | 9501 | |
9502 | 9502 | if ($encoding !== 'UTF-8' && $encoding !== 'CP850') { |
@@ -9519,14 +9519,14 @@ discard block |
||
9519 | 9519 | && |
9520 | 9520 | self::$SUPPORT['mbstring'] === false |
9521 | 9521 | ) { |
9522 | - \trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', \E_USER_WARNING); |
|
9522 | + \trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', \E_USER_WARNING); |
|
9523 | 9523 | } |
9524 | 9524 | |
9525 | 9525 | if (self::$SUPPORT['mbstring'] === true) { |
9526 | 9526 | return \mb_substr_count($haystack, $needle, $encoding); |
9527 | 9527 | } |
9528 | 9528 | |
9529 | - \preg_match_all('/' . \preg_quote($needle, '/') . '/us', $haystack, $matches, \PREG_SET_ORDER); |
|
9529 | + \preg_match_all('/'.\preg_quote($needle, '/').'/us', $haystack, $matches, \PREG_SET_ORDER); |
|
9530 | 9530 | |
9531 | 9531 | return \count($matches); |
9532 | 9532 | } |
@@ -9573,7 +9573,7 @@ discard block |
||
9573 | 9573 | if ($lengthTmp === false) { |
9574 | 9574 | return false; |
9575 | 9575 | } |
9576 | - $length = (int) $lengthTmp; |
|
9576 | + $length = (int)$lengthTmp; |
|
9577 | 9577 | } |
9578 | 9578 | |
9579 | 9579 | if ( |
@@ -9594,7 +9594,7 @@ discard block |
||
9594 | 9594 | if ($haystackTmp === false) { |
9595 | 9595 | $haystackTmp = ''; |
9596 | 9596 | } |
9597 | - $haystack = (string) $haystackTmp; |
|
9597 | + $haystack = (string)$haystackTmp; |
|
9598 | 9598 | } |
9599 | 9599 | |
9600 | 9600 | if (self::$SUPPORT['mbstring_func_overload'] === true) { |
@@ -9625,7 +9625,7 @@ discard block |
||
9625 | 9625 | |
9626 | 9626 | // only a fallback to prevent BC in the api ... |
9627 | 9627 | if ($caseSensitive !== false && $caseSensitive !== true) { |
9628 | - $encoding = (string) $caseSensitive; |
|
9628 | + $encoding = (string)$caseSensitive; |
|
9629 | 9629 | } |
9630 | 9630 | |
9631 | 9631 | if (!$caseSensitive) { |
@@ -9633,7 +9633,7 @@ discard block |
||
9633 | 9633 | $substring = self::strtocasefold($substring, true, false, $encoding, null, false); |
9634 | 9634 | } |
9635 | 9635 | |
9636 | - return (int) self::substr_count($str, $substring, 0, null, $encoding); |
|
9636 | + return (int)self::substr_count($str, $substring, 0, null, $encoding); |
|
9637 | 9637 | } |
9638 | 9638 | |
9639 | 9639 | /** |
@@ -9659,7 +9659,7 @@ discard block |
||
9659 | 9659 | if ($haystackTmp === false) { |
9660 | 9660 | $haystackTmp = ''; |
9661 | 9661 | } |
9662 | - $haystack = (string) $haystackTmp; |
|
9662 | + $haystack = (string)$haystackTmp; |
|
9663 | 9663 | } |
9664 | 9664 | |
9665 | 9665 | return $haystack; |
@@ -9728,7 +9728,7 @@ discard block |
||
9728 | 9728 | if ($haystackTmp === false) { |
9729 | 9729 | $haystackTmp = ''; |
9730 | 9730 | } |
9731 | - $haystack = (string) $haystackTmp; |
|
9731 | + $haystack = (string)$haystackTmp; |
|
9732 | 9732 | } |
9733 | 9733 | |
9734 | 9734 | return $haystack; |
@@ -9757,7 +9757,7 @@ discard block |
||
9757 | 9757 | if ($haystackTmp === false) { |
9758 | 9758 | $haystackTmp = ''; |
9759 | 9759 | } |
9760 | - $haystack = (string) $haystackTmp; |
|
9760 | + $haystack = (string)$haystackTmp; |
|
9761 | 9761 | } |
9762 | 9762 | |
9763 | 9763 | return $haystack; |
@@ -9804,7 +9804,7 @@ discard block |
||
9804 | 9804 | if (\is_array($offset) === true) { |
9805 | 9805 | $offset = \array_slice($offset, 0, $num); |
9806 | 9806 | foreach ($offset as &$valueTmp) { |
9807 | - $valueTmp = (int) $valueTmp === $valueTmp ? $valueTmp : 0; |
|
9807 | + $valueTmp = (int)$valueTmp === $valueTmp ? $valueTmp : 0; |
|
9808 | 9808 | } |
9809 | 9809 | unset($valueTmp); |
9810 | 9810 | } else { |
@@ -9818,7 +9818,7 @@ discard block |
||
9818 | 9818 | $length = \array_slice($length, 0, $num); |
9819 | 9819 | foreach ($length as &$valueTmpV2) { |
9820 | 9820 | if ($valueTmpV2 !== null) { |
9821 | - $valueTmpV2 = (int) $valueTmpV2 === $valueTmpV2 ? $valueTmpV2 : $num; |
|
9821 | + $valueTmpV2 = (int)$valueTmpV2 === $valueTmpV2 ? $valueTmpV2 : $num; |
|
9822 | 9822 | } else { |
9823 | 9823 | $valueTmpV2 = 0; |
9824 | 9824 | } |
@@ -9841,8 +9841,8 @@ discard block |
||
9841 | 9841 | } |
9842 | 9842 | |
9843 | 9843 | // init |
9844 | - $str = (string) $str; |
|
9845 | - $replacement = (string) $replacement; |
|
9844 | + $str = (string)$str; |
|
9845 | + $replacement = (string)$replacement; |
|
9846 | 9846 | |
9847 | 9847 | if ($str === '') { |
9848 | 9848 | return $replacement; |
@@ -9850,8 +9850,7 @@ discard block |
||
9850 | 9850 | |
9851 | 9851 | if (self::is_ascii($str)) { |
9852 | 9852 | return ($length === null) ? |
9853 | - \substr_replace($str, $replacement, $offset) : |
|
9854 | - \substr_replace($str, $replacement, $offset, $length); |
|
9853 | + \substr_replace($str, $replacement, $offset) : \substr_replace($str, $replacement, $offset, $length); |
|
9855 | 9854 | } |
9856 | 9855 | |
9857 | 9856 | if (!isset(self::$SUPPORT['already_checked_via_portable_utf8'])) { |
@@ -9877,7 +9876,7 @@ discard block |
||
9877 | 9876 | $length = $string_length - $offset; |
9878 | 9877 | } |
9879 | 9878 | |
9880 | - return self::substr($str, 0, $offset, $encoding) . $replacement . self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9879 | + return self::substr($str, 0, $offset, $encoding).$replacement.self::substr($str, $offset + $length, $string_length - $offset - $length, $encoding); |
|
9881 | 9880 | } |
9882 | 9881 | |
9883 | 9882 | \preg_match_all('/./us', $str, $smatches); |
@@ -9889,7 +9888,7 @@ discard block |
||
9889 | 9888 | // e.g.: non mbstring support + invalid chars |
9890 | 9889 | return ''; |
9891 | 9890 | } |
9892 | - $length = (int) $lengthTmp; |
|
9891 | + $length = (int)$lengthTmp; |
|
9893 | 9892 | } |
9894 | 9893 | |
9895 | 9894 | \array_splice($smatches[0], $offset, $length, $rmatches[0]); |
@@ -9920,7 +9919,7 @@ discard block |
||
9920 | 9919 | if ($haystackTmp === false) { |
9921 | 9920 | $haystackTmp = ''; |
9922 | 9921 | } |
9923 | - $haystack = (string) $haystackTmp; |
|
9922 | + $haystack = (string)$haystackTmp; |
|
9924 | 9923 | } |
9925 | 9924 | |
9926 | 9925 | return $haystack; |
@@ -9951,7 +9950,7 @@ discard block |
||
9951 | 9950 | $str = self::clean($str); |
9952 | 9951 | } |
9953 | 9952 | |
9954 | - return (string) (self::strtolower($str, $encoding) ^ self::strtoupper($str, $encoding) ^ $str); |
|
9953 | + return (string)(self::strtolower($str, $encoding) ^ self::strtoupper($str, $encoding) ^ $str); |
|
9955 | 9954 | } |
9956 | 9955 | |
9957 | 9956 | /** |
@@ -10245,7 +10244,7 @@ discard block |
||
10245 | 10244 | public static function to_boolean($str): bool |
10246 | 10245 | { |
10247 | 10246 | // init |
10248 | - $str = (string) $str; |
|
10247 | + $str = (string)$str; |
|
10249 | 10248 | |
10250 | 10249 | if ($str === '') { |
10251 | 10250 | return false; |
@@ -10271,10 +10270,10 @@ discard block |
||
10271 | 10270 | |
10272 | 10271 | /** @noinspection CallableParameterUseCaseInTypeContextInspection */ |
10273 | 10272 | if (\is_numeric($str)) { |
10274 | - return ((float) $str + 0) > 0; |
|
10273 | + return ((float)$str + 0) > 0; |
|
10275 | 10274 | } |
10276 | 10275 | |
10277 | - return (bool) self::trim($str); |
|
10276 | + return (bool)self::trim($str); |
|
10278 | 10277 | } |
10279 | 10278 | |
10280 | 10279 | /** |
@@ -10295,11 +10294,11 @@ discard block |
||
10295 | 10294 | |
10296 | 10295 | $fallback_char_escaped = \preg_quote($fallback_char, '/'); |
10297 | 10296 | |
10298 | - $string = (string) \preg_replace( |
|
10297 | + $string = (string)\preg_replace( |
|
10299 | 10298 | [ |
10300 | - '/[^' . $fallback_char_escaped . '\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10301 | - '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10302 | - '/[' . $fallback_char_escaped . ']+/', // 3) remove double $fallback_char's |
|
10299 | + '/[^'.$fallback_char_escaped.'\.\-a-zA-Z0-9\s]/', // 1) remove un-needed chars |
|
10300 | + '/[\s]+/', // 2) convert spaces to $fallback_char |
|
10301 | + '/['.$fallback_char_escaped.']+/', // 3) remove double $fallback_char's |
|
10303 | 10302 | ], |
10304 | 10303 | [ |
10305 | 10304 | '', |
@@ -10330,7 +10329,7 @@ discard block |
||
10330 | 10329 | return $str; |
10331 | 10330 | } |
10332 | 10331 | |
10333 | - $str = (string) $str; |
|
10332 | + $str = (string)$str; |
|
10334 | 10333 | if ($str === '') { |
10335 | 10334 | return ''; |
10336 | 10335 | } |
@@ -10377,7 +10376,7 @@ discard block |
||
10377 | 10376 | return $str; |
10378 | 10377 | } |
10379 | 10378 | |
10380 | - $str = (string) $str; |
|
10379 | + $str = (string)$str; |
|
10381 | 10380 | if ($str === '') { |
10382 | 10381 | return $str; |
10383 | 10382 | } |
@@ -10400,7 +10399,7 @@ discard block |
||
10400 | 10399 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
10401 | 10400 | |
10402 | 10401 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10403 | - $buf .= $c1 . $c2; |
|
10402 | + $buf .= $c1.$c2; |
|
10404 | 10403 | $i++; |
10405 | 10404 | } else { // not valid UTF8 - convert it |
10406 | 10405 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10411,7 +10410,7 @@ discard block |
||
10411 | 10410 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
10412 | 10411 | |
10413 | 10412 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10414 | - $buf .= $c1 . $c2 . $c3; |
|
10413 | + $buf .= $c1.$c2.$c3; |
|
10415 | 10414 | $i += 2; |
10416 | 10415 | } else { // not valid UTF8 - convert it |
10417 | 10416 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10423,7 +10422,7 @@ discard block |
||
10423 | 10422 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
10424 | 10423 | |
10425 | 10424 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
10426 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
10425 | + $buf .= $c1.$c2.$c3.$c4; |
|
10427 | 10426 | $i += 3; |
10428 | 10427 | } else { // not valid UTF8 - convert it |
10429 | 10428 | $buf .= self::to_utf8_convert_helper($c1); |
@@ -10442,7 +10441,7 @@ discard block |
||
10442 | 10441 | // decode unicode escape sequences |
10443 | 10442 | $buf = \preg_replace_callback( |
10444 | 10443 | '/\\\\u([0-9a-f]{4})/i', |
10445 | - function ($match) { |
|
10444 | + function($match) { |
|
10446 | 10445 | // always fallback via symfony polyfill |
10447 | 10446 | return \mb_convert_encoding(\pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
10448 | 10447 | }, |
@@ -10484,8 +10483,8 @@ discard block |
||
10484 | 10483 | $buf .= self::$WIN1252_TO_UTF8[$ordC1]; |
10485 | 10484 | } else { |
10486 | 10485 | $cc1 = self::$CHR[$ordC1 / 64] | "\xC0"; |
10487 | - $cc2 = ((string) $input & "\x3F") | "\x80"; |
|
10488 | - $buf .= $cc1 . $cc2; |
|
10486 | + $cc2 = ((string)$input & "\x3F") | "\x80"; |
|
10487 | + $buf .= $cc1.$cc2; |
|
10489 | 10488 | } |
10490 | 10489 | |
10491 | 10490 | return $buf; |
@@ -10546,14 +10545,14 @@ discard block |
||
10546 | 10545 | } |
10547 | 10546 | |
10548 | 10547 | $strPartOne = self::strtoupper( |
10549 | - (string) self::substr($str, 0, 1, $encoding), |
|
10548 | + (string)self::substr($str, 0, 1, $encoding), |
|
10550 | 10549 | $encoding, |
10551 | 10550 | $cleanUtf8, |
10552 | 10551 | $lang, |
10553 | 10552 | $tryToKeepStringLength |
10554 | 10553 | ); |
10555 | 10554 | |
10556 | - return $strPartOne . $strPartTwo; |
|
10555 | + return $strPartOne.$strPartTwo; |
|
10557 | 10556 | } |
10558 | 10557 | |
10559 | 10558 | /** |
@@ -10599,7 +10598,7 @@ discard block |
||
10599 | 10598 | $str = self::clean($str); |
10600 | 10599 | } |
10601 | 10600 | |
10602 | - $usePhpDefaultFunctions = !(bool) ($charlist . \implode('', $exceptions)); |
|
10601 | + $usePhpDefaultFunctions = !(bool)($charlist.\implode('', $exceptions)); |
|
10603 | 10602 | |
10604 | 10603 | if ( |
10605 | 10604 | $usePhpDefaultFunctions === true |
@@ -10668,7 +10667,7 @@ discard block |
||
10668 | 10667 | |
10669 | 10668 | $pattern = '/%u([0-9a-f]{3,4})/i'; |
10670 | 10669 | if (\preg_match($pattern, $str)) { |
10671 | - $str = (string) \preg_replace($pattern, '&#x\\1;', \urldecode($str)); |
|
10670 | + $str = (string)\preg_replace($pattern, '&#x\\1;', \urldecode($str)); |
|
10672 | 10671 | } |
10673 | 10672 | |
10674 | 10673 | $flags = \ENT_QUOTES | \ENT_HTML5; |
@@ -11102,7 +11101,7 @@ discard block |
||
11102 | 11101 | return ''; |
11103 | 11102 | } |
11104 | 11103 | |
11105 | - \preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
11104 | + \preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
11106 | 11105 | |
11107 | 11106 | if ( |
11108 | 11107 | !isset($matches[0]) |
@@ -11112,7 +11111,7 @@ discard block |
||
11112 | 11111 | return $str; |
11113 | 11112 | } |
11114 | 11113 | |
11115 | - return self::rtrim($matches[0]) . $strAddOn; |
|
11114 | + return self::rtrim($matches[0]).$strAddOn; |
|
11116 | 11115 | } |
11117 | 11116 | |
11118 | 11117 | /** |
@@ -11182,7 +11181,7 @@ discard block |
||
11182 | 11181 | $strReturn .= $break; |
11183 | 11182 | } |
11184 | 11183 | |
11185 | - return $strReturn . \implode('', $chars); |
|
11184 | + return $strReturn.\implode('', $chars); |
|
11186 | 11185 | } |
11187 | 11186 | |
11188 | 11187 | /** |
@@ -11195,7 +11194,7 @@ discard block |
||
11195 | 11194 | */ |
11196 | 11195 | public static function wordwrap_per_line(string $str, int $limit): string |
11197 | 11196 | { |
11198 | - $strings = (array) \preg_split('/\\r\\n|\\r|\\n/', $str); |
|
11197 | + $strings = (array)\preg_split('/\\r\\n|\\r|\\n/', $str); |
|
11199 | 11198 | |
11200 | 11199 | $string = ''; |
11201 | 11200 | foreach ($strings as $value) { |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | return false; |
71 | 71 | } |
72 | 72 | |
73 | - $uri = (string) $_SERVER['REQUEST_URI']; |
|
73 | + $uri = (string)$_SERVER['REQUEST_URI']; |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | $uriOrig = $uri; |
@@ -87,17 +87,17 @@ discard block |
||
87 | 87 | // When not, assumes Windows-1252 and redirects to the corresponding UTF-8 encoded URL |
88 | 88 | // |
89 | 89 | |
90 | - $uri = (string) \preg_replace_callback( |
|
90 | + $uri = (string)\preg_replace_callback( |
|
91 | 91 | '/[\x80-\xFF]+/', |
92 | - function ($m) { |
|
92 | + function($m) { |
|
93 | 93 | return \rawurlencode($m[0]); |
94 | 94 | }, |
95 | 95 | $uri |
96 | 96 | ); |
97 | 97 | |
98 | - $uri = (string) \preg_replace_callback( |
|
98 | + $uri = (string)\preg_replace_callback( |
|
99 | 99 | '/(?:%[89A-F][0-9A-F])+/i', |
100 | - function ($m) { |
|
100 | + function($m) { |
|
101 | 101 | return \rawurlencode(UTF8::rawurldecode($m[0])); |
102 | 102 | }, |
103 | 103 | $uri |
@@ -112,8 +112,8 @@ discard block |
||
112 | 112 | ) { |
113 | 113 | // Use ob_start() to buffer content and avoid problem of headers already sent... |
114 | 114 | $severProtocol = ($_SERVER['SERVER_PROTOCOL'] ?? 'HTTP/1.1'); |
115 | - \header($severProtocol . ' 301 Moved Permanently'); |
|
116 | - \header('Location: ' . $uri); |
|
115 | + \header($severProtocol.' 301 Moved Permanently'); |
|
116 | + \header('Location: '.$uri); |
|
117 | 117 | exit(); |
118 | 118 | } |
119 | 119 | |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | return false; |
151 | 151 | } |
152 | 152 | |
153 | - $length = (int) $length; |
|
153 | + $length = (int)$length; |
|
154 | 154 | |
155 | 155 | if ($length <= 0) { |
156 | 156 | return false; |
@@ -181,7 +181,7 @@ discard block |
||
181 | 181 | { |
182 | 182 | static $_IS_PHP; |
183 | 183 | |
184 | - $version = (string) $version; |
|
184 | + $version = (string)$version; |
|
185 | 185 | |
186 | 186 | if (!isset($_IS_PHP[$version])) { |
187 | 187 | $_IS_PHP[$version] = \version_compare(\PHP_VERSION, $version, '>='); |
@@ -3,17 +3,17 @@ discard block |
||
3 | 3 | return [ |
4 | 4 | 0x80 => "\xe2\x82\xac", // € |
5 | 5 | 0x82 => "\xe2\x80\x9a", // ‚ |
6 | - 0x83 => "\xc6\x92", // ƒ |
|
6 | + 0x83 => "\xc6\x92", // ƒ |
|
7 | 7 | 0x84 => "\xe2\x80\x9e", // „ |
8 | 8 | 0x85 => "\xe2\x80\xa6", // … |
9 | 9 | 0x86 => "\xe2\x80\xa0", // † |
10 | 10 | 0x87 => "\xe2\x80\xa1", // ‡ |
11 | - 0x88 => "\xcb\x86", // ˆ |
|
11 | + 0x88 => "\xcb\x86", // ˆ |
|
12 | 12 | 0x89 => "\xe2\x80\xb0", // ‰ |
13 | - 0x8a => "\xc5\xa0", // Š |
|
13 | + 0x8a => "\xc5\xa0", // Š |
|
14 | 14 | 0x8b => "\xe2\x80\xb9", // ‹ |
15 | - 0x8c => "\xc5\x92", // Œ |
|
16 | - 0x8e => "\xc5\xbd", // Ž |
|
15 | + 0x8c => "\xc5\x92", // Œ |
|
16 | + 0x8e => "\xc5\xbd", // Ž |
|
17 | 17 | 0x91 => "\xe2\x80\x98", // ‘ |
18 | 18 | 0x92 => "\xe2\x80\x99", // ’ |
19 | 19 | 0x93 => "\xe2\x80\x9c", // “ |
@@ -21,106 +21,106 @@ discard block |
||
21 | 21 | 0x95 => "\xe2\x80\xa2", // • |
22 | 22 | 0x96 => "\xe2\x80\x93", // – |
23 | 23 | 0x97 => "\xe2\x80\x94", // — |
24 | - 0x98 => "\xcb\x9c", // ˜ |
|
24 | + 0x98 => "\xcb\x9c", // ˜ |
|
25 | 25 | 0x99 => "\xe2\x84\xa2", // ™ |
26 | - 0x9a => "\xc5\xa1", // š |
|
26 | + 0x9a => "\xc5\xa1", // š |
|
27 | 27 | 0x9b => "\xe2\x80\xba", // › |
28 | - 0x9c => "\xc5\x93", // œ |
|
29 | - 0x9e => "\xc5\xbe", // ž |
|
30 | - 0x9f => "\xc5\xb8", // Ÿ |
|
28 | + 0x9c => "\xc5\x93", // œ |
|
29 | + 0x9e => "\xc5\xbe", // ž |
|
30 | + 0x9f => "\xc5\xb8", // Ÿ |
|
31 | 31 | 0xa0 => "\xc2\xa0", |
32 | - 0xa1 => "\xc2\xa1", // ¡ |
|
33 | - 0xa2 => "\xc2\xa2", // ¢ |
|
34 | - 0xa3 => "\xc2\xa3", // £ |
|
35 | - 0xa4 => "\xc2\xa4", // ¤ |
|
36 | - 0xa5 => "\xc2\xa5", // ¥ |
|
37 | - 0xa6 => "\xc2\xa6", // ¦ |
|
38 | - 0xa7 => "\xc2\xa7", // § |
|
39 | - 0xa8 => "\xc2\xa8", // ¨ |
|
40 | - 0xa9 => "\xc2\xa9", // © |
|
41 | - 0xaa => "\xc2\xaa", // ª |
|
42 | - 0xab => "\xc2\xab", // « |
|
43 | - 0xac => "\xc2\xac", // ¬ |
|
44 | - 0xad => "\xc2\xad", // |
|
45 | - 0xae => "\xc2\xae", // ® |
|
46 | - 0xaf => "\xc2\xaf", // ¯ |
|
47 | - 0xb0 => "\xc2\xb0", // ° |
|
48 | - 0xb1 => "\xc2\xb1", // ± |
|
49 | - 0xb2 => "\xc2\xb2", // ² |
|
50 | - 0xb3 => "\xc2\xb3", // ³ |
|
51 | - 0xb4 => "\xc2\xb4", // ´ |
|
52 | - 0xb5 => "\xc2\xb5", // µ |
|
53 | - 0xb6 => "\xc2\xb6", // ¶ |
|
54 | - 0xb7 => "\xc2\xb7", // · |
|
55 | - 0xb8 => "\xc2\xb8", // ¸ |
|
56 | - 0xb9 => "\xc2\xb9", // ¹ |
|
57 | - 0xba => "\xc2\xba", // º |
|
58 | - 0xbb => "\xc2\xbb", // » |
|
59 | - 0xbc => "\xc2\xbc", // ¼ |
|
60 | - 0xbd => "\xc2\xbd", // ½ |
|
61 | - 0xbe => "\xc2\xbe", // ¾ |
|
62 | - 0xbf => "\xc2\xbf", // ¿ |
|
63 | - 0xc0 => "\xc3\x80", // À |
|
64 | - 0xc1 => "\xc3\x81", // Á |
|
65 | - 0xc2 => "\xc3\x82", // Â |
|
66 | - 0xc3 => "\xc3\x83", // Ã |
|
67 | - 0xc4 => "\xc3\x84", // Ä |
|
68 | - 0xc5 => "\xc3\x85", // Å |
|
69 | - 0xc6 => "\xc3\x86", // Æ |
|
70 | - 0xc7 => "\xc3\x87", // Ç |
|
71 | - 0xc8 => "\xc3\x88", // È |
|
72 | - 0xc9 => "\xc3\x89", // É |
|
73 | - 0xca => "\xc3\x8a", // Ê |
|
74 | - 0xcb => "\xc3\x8b", // Ë |
|
75 | - 0xcc => "\xc3\x8c", // Ì |
|
76 | - 0xcd => "\xc3\x8d", // Í |
|
77 | - 0xce => "\xc3\x8e", // Î |
|
78 | - 0xcf => "\xc3\x8f", // Ï |
|
79 | - 0xd0 => "\xc3\x90", // Ð |
|
80 | - 0xd1 => "\xc3\x91", // Ñ |
|
81 | - 0xd2 => "\xc3\x92", // Ò |
|
82 | - 0xd3 => "\xc3\x93", // Ó |
|
83 | - 0xd4 => "\xc3\x94", // Ô |
|
84 | - 0xd5 => "\xc3\x95", // Õ |
|
85 | - 0xd6 => "\xc3\x96", // Ö |
|
86 | - 0xd7 => "\xc3\x97", // × |
|
87 | - 0xd8 => "\xc3\x98", // Ø |
|
88 | - 0xd9 => "\xc3\x99", // Ù |
|
89 | - 0xda => "\xc3\x9a", // Ú |
|
90 | - 0xdb => "\xc3\x9b", // Û |
|
91 | - 0xdc => "\xc3\x9c", // Ü |
|
92 | - 0xdd => "\xc3\x9d", // Ý |
|
93 | - 0xde => "\xc3\x9e", // Þ |
|
94 | - 0xdf => "\xc3\x9f", // ß |
|
95 | - 0xe0 => "\xc3\xa0", // à |
|
96 | - 0xe1 => "\xa1", // á |
|
97 | - 0xe2 => "\xc3\xa2", // â |
|
98 | - 0xe3 => "\xc3\xa3", // ã |
|
99 | - 0xe4 => "\xc3\xa4", // ä |
|
100 | - 0xe5 => "\xc3\xa5", // å |
|
101 | - 0xe6 => "\xc3\xa6", // æ |
|
102 | - 0xe7 => "\xc3\xa7", // ç |
|
103 | - 0xe8 => "\xc3\xa8", // è |
|
104 | - 0xe9 => "\xc3\xa9", // é |
|
105 | - 0xea => "\xc3\xaa", // ê |
|
106 | - 0xeb => "\xc3\xab", // ë |
|
107 | - 0xec => "\xc3\xac", // ì |
|
108 | - 0xed => "\xc3\xad", // í |
|
109 | - 0xee => "\xc3\xae", // î |
|
110 | - 0xef => "\xc3\xaf", // ï |
|
111 | - 0xf0 => "\xc3\xb0", // ð |
|
112 | - 0xf1 => "\xc3\xb1", // ñ |
|
113 | - 0xf2 => "\xc3\xb2", // ò |
|
114 | - 0xf3 => "\xc3\xb3", // ó |
|
115 | - 0xf4 => "\xc3\xb4", // ô |
|
116 | - 0xf5 => "\xc3\xb5", // õ |
|
117 | - 0xf6 => "\xc3\xb6", // ö |
|
118 | - 0xf7 => "\xc3\xb7", // ÷ |
|
119 | - 0xf8 => "\xc3\xb8", // ø |
|
120 | - 0xf9 => "\xc3\xb9", // ù |
|
121 | - 0xfa => "\xc3\xba", // ú |
|
122 | - 0xfb => "\xc3\xbb", // û |
|
123 | - 0xfc => "\xc3\xbc", // ü |
|
124 | - 0xfd => "\xc3\xbd", // ý |
|
125 | - 0xfe => "\xc3\xbe", // þ |
|
32 | + 0xa1 => "\xc2\xa1", // ¡ |
|
33 | + 0xa2 => "\xc2\xa2", // ¢ |
|
34 | + 0xa3 => "\xc2\xa3", // £ |
|
35 | + 0xa4 => "\xc2\xa4", // ¤ |
|
36 | + 0xa5 => "\xc2\xa5", // ¥ |
|
37 | + 0xa6 => "\xc2\xa6", // ¦ |
|
38 | + 0xa7 => "\xc2\xa7", // § |
|
39 | + 0xa8 => "\xc2\xa8", // ¨ |
|
40 | + 0xa9 => "\xc2\xa9", // © |
|
41 | + 0xaa => "\xc2\xaa", // ª |
|
42 | + 0xab => "\xc2\xab", // « |
|
43 | + 0xac => "\xc2\xac", // ¬ |
|
44 | + 0xad => "\xc2\xad", // |
|
45 | + 0xae => "\xc2\xae", // ® |
|
46 | + 0xaf => "\xc2\xaf", // ¯ |
|
47 | + 0xb0 => "\xc2\xb0", // ° |
|
48 | + 0xb1 => "\xc2\xb1", // ± |
|
49 | + 0xb2 => "\xc2\xb2", // ² |
|
50 | + 0xb3 => "\xc2\xb3", // ³ |
|
51 | + 0xb4 => "\xc2\xb4", // ´ |
|
52 | + 0xb5 => "\xc2\xb5", // µ |
|
53 | + 0xb6 => "\xc2\xb6", // ¶ |
|
54 | + 0xb7 => "\xc2\xb7", // · |
|
55 | + 0xb8 => "\xc2\xb8", // ¸ |
|
56 | + 0xb9 => "\xc2\xb9", // ¹ |
|
57 | + 0xba => "\xc2\xba", // º |
|
58 | + 0xbb => "\xc2\xbb", // » |
|
59 | + 0xbc => "\xc2\xbc", // ¼ |
|
60 | + 0xbd => "\xc2\xbd", // ½ |
|
61 | + 0xbe => "\xc2\xbe", // ¾ |
|
62 | + 0xbf => "\xc2\xbf", // ¿ |
|
63 | + 0xc0 => "\xc3\x80", // À |
|
64 | + 0xc1 => "\xc3\x81", // Á |
|
65 | + 0xc2 => "\xc3\x82", // Â |
|
66 | + 0xc3 => "\xc3\x83", // Ã |
|
67 | + 0xc4 => "\xc3\x84", // Ä |
|
68 | + 0xc5 => "\xc3\x85", // Å |
|
69 | + 0xc6 => "\xc3\x86", // Æ |
|
70 | + 0xc7 => "\xc3\x87", // Ç |
|
71 | + 0xc8 => "\xc3\x88", // È |
|
72 | + 0xc9 => "\xc3\x89", // É |
|
73 | + 0xca => "\xc3\x8a", // Ê |
|
74 | + 0xcb => "\xc3\x8b", // Ë |
|
75 | + 0xcc => "\xc3\x8c", // Ì |
|
76 | + 0xcd => "\xc3\x8d", // Í |
|
77 | + 0xce => "\xc3\x8e", // Î |
|
78 | + 0xcf => "\xc3\x8f", // Ï |
|
79 | + 0xd0 => "\xc3\x90", // Ð |
|
80 | + 0xd1 => "\xc3\x91", // Ñ |
|
81 | + 0xd2 => "\xc3\x92", // Ò |
|
82 | + 0xd3 => "\xc3\x93", // Ó |
|
83 | + 0xd4 => "\xc3\x94", // Ô |
|
84 | + 0xd5 => "\xc3\x95", // Õ |
|
85 | + 0xd6 => "\xc3\x96", // Ö |
|
86 | + 0xd7 => "\xc3\x97", // × |
|
87 | + 0xd8 => "\xc3\x98", // Ø |
|
88 | + 0xd9 => "\xc3\x99", // Ù |
|
89 | + 0xda => "\xc3\x9a", // Ú |
|
90 | + 0xdb => "\xc3\x9b", // Û |
|
91 | + 0xdc => "\xc3\x9c", // Ü |
|
92 | + 0xdd => "\xc3\x9d", // Ý |
|
93 | + 0xde => "\xc3\x9e", // Þ |
|
94 | + 0xdf => "\xc3\x9f", // ß |
|
95 | + 0xe0 => "\xc3\xa0", // à |
|
96 | + 0xe1 => "\xa1", // á |
|
97 | + 0xe2 => "\xc3\xa2", // â |
|
98 | + 0xe3 => "\xc3\xa3", // ã |
|
99 | + 0xe4 => "\xc3\xa4", // ä |
|
100 | + 0xe5 => "\xc3\xa5", // å |
|
101 | + 0xe6 => "\xc3\xa6", // æ |
|
102 | + 0xe7 => "\xc3\xa7", // ç |
|
103 | + 0xe8 => "\xc3\xa8", // è |
|
104 | + 0xe9 => "\xc3\xa9", // é |
|
105 | + 0xea => "\xc3\xaa", // ê |
|
106 | + 0xeb => "\xc3\xab", // ë |
|
107 | + 0xec => "\xc3\xac", // ì |
|
108 | + 0xed => "\xc3\xad", // í |
|
109 | + 0xee => "\xc3\xae", // î |
|
110 | + 0xef => "\xc3\xaf", // ï |
|
111 | + 0xf0 => "\xc3\xb0", // ð |
|
112 | + 0xf1 => "\xc3\xb1", // ñ |
|
113 | + 0xf2 => "\xc3\xb2", // ò |
|
114 | + 0xf3 => "\xc3\xb3", // ó |
|
115 | + 0xf4 => "\xc3\xb4", // ô |
|
116 | + 0xf5 => "\xc3\xb5", // õ |
|
117 | + 0xf6 => "\xc3\xb6", // ö |
|
118 | + 0xf7 => "\xc3\xb7", // ÷ |
|
119 | + 0xf8 => "\xc3\xb8", // ø |
|
120 | + 0xf9 => "\xc3\xb9", // ù |
|
121 | + 0xfa => "\xc3\xba", // ú |
|
122 | + 0xfb => "\xc3\xbb", // û |
|
123 | + 0xfc => "\xc3\xbc", // ü |
|
124 | + 0xfd => "\xc3\xbd", // ý |
|
125 | + 0xfe => "\xc3\xbe", // þ |
|
126 | 126 | ]; |