@@ -19,6 +19,6 @@ |
||
19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
20 | 20 | ); |
21 | 21 | |
22 | -$result =& $data; |
|
22 | +$result = & $data; |
|
23 | 23 | unset($data); |
24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
19 | 19 | '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
20 | 20 | ); |
21 | 21 | |
22 | -$result =& $data; |
|
22 | +$result = & $data; |
|
23 | 23 | unset($data); |
24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
19 | 19 | '[?]', '[?]', 'o', 'o', 'o', '[?]', 'o', 'o', 'O', 'O', 'O', 'O', 'O', '\'', '`', '[?]', |
20 | 20 | ); |
21 | 21 | |
22 | -$result =& $data; |
|
22 | +$result = & $data; |
|
23 | 23 | unset($data); |
24 | 24 | return $result; |
@@ -19,6 +19,6 @@ |
||
19 | 19 | 'U', 'u', 'U', 'u', 'Ch', 'ch', '[?]', '[?]', 'Y', 'y', '[?]', '[?]', '[?]', '[?]', '[?]', '[?]', |
20 | 20 | ); |
21 | 21 | |
22 | -$result =& $data; |
|
22 | +$result = & $data; |
|
23 | 23 | unset($data); |
24 | 24 | return $result; |
@@ -853,7 +853,7 @@ discard block |
||
853 | 853 | public static function add_bom_to_string($str) |
854 | 854 | { |
855 | 855 | if (self::string_has_bom($str) === false) { |
856 | - $str = self::bom() . $str; |
|
856 | + $str = self::bom().$str; |
|
857 | 857 | } |
858 | 858 | |
859 | 859 | return $str; |
@@ -978,7 +978,7 @@ discard block |
||
978 | 978 | |
979 | 979 | // use static cache, only if there is no support for "\IntlChar" |
980 | 980 | static $CHAR_CACHE = array(); |
981 | - $cacheKey = $code_point . $encoding; |
|
981 | + $cacheKey = $code_point.$encoding; |
|
982 | 982 | if (isset($CHAR_CACHE[$cacheKey]) === true) { |
983 | 983 | return $CHAR_CACHE[$cacheKey]; |
984 | 984 | } |
@@ -986,16 +986,16 @@ discard block |
||
986 | 986 | if ($code_point <= 0x7F) { |
987 | 987 | $str = self::chr_and_parse_int($code_point); |
988 | 988 | } elseif ($code_point <= 0x7FF) { |
989 | - $str = self::chr_and_parse_int(($code_point >> 6) + 0xC0) . |
|
989 | + $str = self::chr_and_parse_int(($code_point >> 6) + 0xC0). |
|
990 | 990 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
991 | 991 | } elseif ($code_point <= 0xFFFF) { |
992 | - $str = self::chr_and_parse_int(($code_point >> 12) + 0xE0) . |
|
993 | - self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80) . |
|
992 | + $str = self::chr_and_parse_int(($code_point >> 12) + 0xE0). |
|
993 | + self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80). |
|
994 | 994 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
995 | 995 | } else { |
996 | - $str = self::chr_and_parse_int(($code_point >> 18) + 0xF0) . |
|
997 | - self::chr_and_parse_int((($code_point >> 12) & 0x3F) + 0x80) . |
|
998 | - self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80) . |
|
996 | + $str = self::chr_and_parse_int(($code_point >> 18) + 0xF0). |
|
997 | + self::chr_and_parse_int((($code_point >> 12) & 0x3F) + 0x80). |
|
998 | + self::chr_and_parse_int((($code_point >> 6) & 0x3F) + 0x80). |
|
999 | 999 | self::chr_and_parse_int(($code_point & 0x3F) + 0x80); |
1000 | 1000 | } |
1001 | 1001 | |
@@ -1055,7 +1055,7 @@ discard block |
||
1055 | 1055 | } |
1056 | 1056 | |
1057 | 1057 | return array_map( |
1058 | - function ($data) { |
|
1058 | + function($data) { |
|
1059 | 1059 | return UTF8::strlen($data, '8BIT'); |
1060 | 1060 | }, |
1061 | 1061 | self::split($str) |
@@ -1297,7 +1297,7 @@ discard block |
||
1297 | 1297 | $flags = ENT_QUOTES; |
1298 | 1298 | } |
1299 | 1299 | |
1300 | - return self::html_entity_decode('&#' . $int . ';', $flags); |
|
1300 | + return self::html_entity_decode('&#'.$int.';', $flags); |
|
1301 | 1301 | } |
1302 | 1302 | |
1303 | 1303 | /** |
@@ -1374,7 +1374,7 @@ discard block |
||
1374 | 1374 | && |
1375 | 1375 | self::$SUPPORT['mbstring'] === false |
1376 | 1376 | ) { |
1377 | - trigger_error('UTF8::encode() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
1377 | + trigger_error('UTF8::encode() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
1378 | 1378 | } |
1379 | 1379 | |
1380 | 1380 | $strEncoded = \mb_convert_encoding( |
@@ -1583,7 +1583,7 @@ discard block |
||
1583 | 1583 | ) { |
1584 | 1584 | // Prevent leading combining chars |
1585 | 1585 | // for NFC-safe concatenations. |
1586 | - $var = $leading_combining . $var; |
|
1586 | + $var = $leading_combining.$var; |
|
1587 | 1587 | } |
1588 | 1588 | } |
1589 | 1589 | |
@@ -2007,7 +2007,7 @@ discard block |
||
2007 | 2007 | */ |
2008 | 2008 | private static function getData($file) |
2009 | 2009 | { |
2010 | - $file = __DIR__ . '/data/' . $file . '.php'; |
|
2010 | + $file = __DIR__.'/data/'.$file.'.php'; |
|
2011 | 2011 | if (file_exists($file)) { |
2012 | 2012 | /** @noinspection PhpIncludeInspection */ |
2013 | 2013 | return require $file; |
@@ -2152,7 +2152,7 @@ discard block |
||
2152 | 2152 | return implode( |
2153 | 2153 | '', |
2154 | 2154 | array_map( |
2155 | - function ($data) use ($keepAsciiChars, $encoding) { |
|
2155 | + function($data) use ($keepAsciiChars, $encoding) { |
|
2156 | 2156 | return UTF8::single_chr_html_encode($data, $keepAsciiChars, $encoding); |
2157 | 2157 | }, |
2158 | 2158 | self::split($str) |
@@ -2271,7 +2271,7 @@ discard block |
||
2271 | 2271 | |
2272 | 2272 | $str = preg_replace_callback( |
2273 | 2273 | "/&#\d{2,6};/", |
2274 | - function ($matches) use ($encoding) { |
|
2274 | + function($matches) use ($encoding) { |
|
2275 | 2275 | $returnTmp = \mb_convert_encoding($matches[0], $encoding, 'HTML-ENTITIES'); |
2276 | 2276 | |
2277 | 2277 | if ($returnTmp !== '"' && $returnTmp !== "'") { |
@@ -2595,9 +2595,9 @@ discard block |
||
2595 | 2595 | if ((int)$int === $int) { |
2596 | 2596 | $hex = dechex($int); |
2597 | 2597 | |
2598 | - $hex = (strlen($hex) < 4 ? substr('0000' . $hex, -4) : $hex); |
|
2598 | + $hex = (strlen($hex) < 4 ? substr('0000'.$hex, -4) : $hex); |
|
2599 | 2599 | |
2600 | - return $pfix . $hex; |
|
2600 | + return $pfix.$hex; |
|
2601 | 2601 | } |
2602 | 2602 | |
2603 | 2603 | return ''; |
@@ -3338,7 +3338,7 @@ discard block |
||
3338 | 3338 | $cleanUtf8 |
3339 | 3339 | ); |
3340 | 3340 | |
3341 | - return $strPartOne . $strPartTwo; |
|
3341 | + return $strPartOne.$strPartTwo; |
|
3342 | 3342 | } |
3343 | 3343 | |
3344 | 3344 | /** |
@@ -3428,7 +3428,7 @@ discard block |
||
3428 | 3428 | return preg_replace('/^[\pZ\pC]+/u', '', $str); |
3429 | 3429 | } |
3430 | 3430 | |
3431 | - return preg_replace('/^' . self::rxClass($chars) . '+/u', '', $str); |
|
3431 | + return preg_replace('/^'.self::rxClass($chars).'+/u', '', $str); |
|
3432 | 3432 | } |
3433 | 3433 | |
3434 | 3434 | /** |
@@ -3966,7 +3966,7 @@ discard block |
||
3966 | 3966 | if (is_array($what) === true) { |
3967 | 3967 | /** @noinspection ForeachSourceInspection */ |
3968 | 3968 | foreach ($what as $item) { |
3969 | - $str = preg_replace('/(' . preg_quote($item, '/') . ')+/', $item, $str); |
|
3969 | + $str = preg_replace('/('.preg_quote($item, '/').')+/', $item, $str); |
|
3970 | 3970 | } |
3971 | 3971 | } |
3972 | 3972 | |
@@ -4075,7 +4075,7 @@ discard block |
||
4075 | 4075 | return preg_replace('/[\pZ\pC]+$/u', '', $str); |
4076 | 4076 | } |
4077 | 4077 | |
4078 | - return preg_replace('/' . self::rxClass($chars) . '+$/u', '', $str); |
|
4078 | + return preg_replace('/'.self::rxClass($chars).'+$/u', '', $str); |
|
4079 | 4079 | } |
4080 | 4080 | |
4081 | 4081 | /** |
@@ -4090,7 +4090,7 @@ discard block |
||
4090 | 4090 | { |
4091 | 4091 | static $RX_CLASSS_CACHE = array(); |
4092 | 4092 | |
4093 | - $cacheKey = $s . $class; |
|
4093 | + $cacheKey = $s.$class; |
|
4094 | 4094 | |
4095 | 4095 | if (isset($RX_CLASSS_CACHE[$cacheKey])) { |
4096 | 4096 | return $RX_CLASSS_CACHE[$cacheKey]; |
@@ -4102,7 +4102,7 @@ discard block |
||
4102 | 4102 | /** @noinspection SuspiciousLoopInspection */ |
4103 | 4103 | foreach (self::str_split($s) as $s) { |
4104 | 4104 | if ('-' === $s) { |
4105 | - $class[0] = '-' . $class[0]; |
|
4105 | + $class[0] = '-'.$class[0]; |
|
4106 | 4106 | } elseif (!isset($s[2])) { |
4107 | 4107 | $class[0] .= preg_quote($s, '/'); |
4108 | 4108 | } elseif (1 === self::strlen($s)) { |
@@ -4113,13 +4113,13 @@ discard block |
||
4113 | 4113 | } |
4114 | 4114 | |
4115 | 4115 | if ($class[0]) { |
4116 | - $class[0] = '[' . $class[0] . ']'; |
|
4116 | + $class[0] = '['.$class[0].']'; |
|
4117 | 4117 | } |
4118 | 4118 | |
4119 | 4119 | if (1 === count($class)) { |
4120 | 4120 | $return = $class[0]; |
4121 | 4121 | } else { |
4122 | - $return = '(?:' . implode('|', $class) . ')'; |
|
4122 | + $return = '(?:'.implode('|', $class).')'; |
|
4123 | 4123 | } |
4124 | 4124 | |
4125 | 4125 | $RX_CLASSS_CACHE[$cacheKey] = $return; |
@@ -4137,7 +4137,7 @@ discard block |
||
4137 | 4137 | } |
4138 | 4138 | |
4139 | 4139 | foreach (self::$SUPPORT as $utf8Support) { |
4140 | - echo $utf8Support . "\n<br>"; |
|
4140 | + echo $utf8Support."\n<br>"; |
|
4141 | 4141 | } |
4142 | 4142 | } |
4143 | 4143 | |
@@ -4170,7 +4170,7 @@ discard block |
||
4170 | 4170 | $encoding = self::normalize_encoding($encoding, 'UTF-8'); |
4171 | 4171 | } |
4172 | 4172 | |
4173 | - return '&#' . self::ord($char, $encoding) . ';'; |
|
4173 | + return '&#'.self::ord($char, $encoding).';'; |
|
4174 | 4174 | } |
4175 | 4175 | |
4176 | 4176 | /** |
@@ -4237,7 +4237,7 @@ discard block |
||
4237 | 4237 | ) { |
4238 | 4238 | |
4239 | 4239 | if (($str[$i + 1] & "\xC0") === "\x80") { |
4240 | - $ret[] = $str[$i] . $str[$i + 1]; |
|
4240 | + $ret[] = $str[$i].$str[$i + 1]; |
|
4241 | 4241 | |
4242 | 4242 | $i++; |
4243 | 4243 | } |
@@ -4253,7 +4253,7 @@ discard block |
||
4253 | 4253 | && |
4254 | 4254 | ($str[$i + 2] & "\xC0") === "\x80" |
4255 | 4255 | ) { |
4256 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2]; |
|
4256 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2]; |
|
4257 | 4257 | |
4258 | 4258 | $i += 2; |
4259 | 4259 | } |
@@ -4271,7 +4271,7 @@ discard block |
||
4271 | 4271 | && |
4272 | 4272 | ($str[$i + 3] & "\xC0") === "\x80" |
4273 | 4273 | ) { |
4274 | - $ret[] = $str[$i] . $str[$i + 1] . $str[$i + 2] . $str[$i + 3]; |
|
4274 | + $ret[] = $str[$i].$str[$i + 1].$str[$i + 2].$str[$i + 3]; |
|
4275 | 4275 | |
4276 | 4276 | $i += 3; |
4277 | 4277 | } |
@@ -4284,7 +4284,7 @@ discard block |
||
4284 | 4284 | $ret = array_chunk($ret, $length); |
4285 | 4285 | |
4286 | 4286 | return array_map( |
4287 | - function ($item) { |
|
4287 | + function($item) { |
|
4288 | 4288 | return implode('', $item); |
4289 | 4289 | }, $ret |
4290 | 4290 | ); |
@@ -4391,7 +4391,7 @@ discard block |
||
4391 | 4391 | foreach (self::$ICONV_ENCODING as $encodingTmp) { |
4392 | 4392 | # INFO: //IGNORE and //TRANSLIT still throw notice |
4393 | 4393 | /** @noinspection PhpUsageOfSilenceOperatorInspection */ |
4394 | - if (md5(@\iconv($encodingTmp, $encodingTmp . '//IGNORE', $str)) === $md5) { |
|
4394 | + if (md5(@\iconv($encodingTmp, $encodingTmp.'//IGNORE', $str)) === $md5) { |
|
4395 | 4395 | return $encodingTmp; |
4396 | 4396 | } |
4397 | 4397 | } |
@@ -4486,7 +4486,7 @@ discard block |
||
4486 | 4486 | if ('' === $s .= '') { |
4487 | 4487 | $s = '/^(?<=.)$/'; |
4488 | 4488 | } else { |
4489 | - $s = '/' . preg_quote($s, '/') . '/ui'; |
|
4489 | + $s = '/'.preg_quote($s, '/').'/ui'; |
|
4490 | 4490 | } |
4491 | 4491 | } |
4492 | 4492 | |
@@ -4544,7 +4544,7 @@ discard block |
||
4544 | 4544 | } |
4545 | 4545 | |
4546 | 4546 | if (self::substr($str, $length - 1, 1) === ' ') { |
4547 | - return (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4547 | + return (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4548 | 4548 | } |
4549 | 4549 | |
4550 | 4550 | $str = (string)self::substr($str, 0, $length); |
@@ -4553,9 +4553,9 @@ discard block |
||
4553 | 4553 | $new_str = implode(' ', $array); |
4554 | 4554 | |
4555 | 4555 | if ($new_str === '') { |
4556 | - $str = (string)self::substr($str, 0, $length - 1) . $strAddOn; |
|
4556 | + $str = (string)self::substr($str, 0, $length - 1).$strAddOn; |
|
4557 | 4557 | } else { |
4558 | - $str = $new_str . $strAddOn; |
|
4558 | + $str = $new_str.$strAddOn; |
|
4559 | 4559 | } |
4560 | 4560 | |
4561 | 4561 | return $str; |
@@ -4610,7 +4610,7 @@ discard block |
||
4610 | 4610 | $pre = ''; |
4611 | 4611 | } |
4612 | 4612 | |
4613 | - return $pre . $str . $post; |
|
4613 | + return $pre.$str.$post; |
|
4614 | 4614 | } |
4615 | 4615 | |
4616 | 4616 | return $str; |
@@ -4760,7 +4760,7 @@ discard block |
||
4760 | 4760 | } |
4761 | 4761 | |
4762 | 4762 | /** @noinspection PhpInternalEntityUsedInspection */ |
4763 | - preg_match_all('/' . self::GRAPHEME_CLUSTER_RX . '/u', $str, $a); |
|
4763 | + preg_match_all('/'.self::GRAPHEME_CLUSTER_RX.'/u', $str, $a); |
|
4764 | 4764 | $a = $a[0]; |
4765 | 4765 | |
4766 | 4766 | if ($len === 1) { |
@@ -4996,7 +4996,7 @@ discard block |
||
4996 | 4996 | public static function strcmp($str1, $str2) |
4997 | 4997 | { |
4998 | 4998 | /** @noinspection PhpUndefinedClassInspection */ |
4999 | - return $str1 . '' === $str2 . '' ? 0 : strcmp( |
|
4999 | + return $str1.'' === $str2.'' ? 0 : strcmp( |
|
5000 | 5000 | \Normalizer::normalize($str1, \Normalizer::NFD), |
5001 | 5001 | \Normalizer::normalize($str2, \Normalizer::NFD) |
5002 | 5002 | ); |
@@ -5031,7 +5031,7 @@ discard block |
||
5031 | 5031 | return null; |
5032 | 5032 | } |
5033 | 5033 | |
5034 | - if (preg_match('/^(.*?)' . self::rxClass($charList) . '/us', $str, $length)) { |
|
5034 | + if (preg_match('/^(.*?)'.self::rxClass($charList).'/us', $str, $length)) { |
|
5035 | 5035 | /** @noinspection OffsetOperationsInspection */ |
5036 | 5036 | return self::strlen($length[1]); |
5037 | 5037 | } |
@@ -5238,7 +5238,7 @@ discard block |
||
5238 | 5238 | && |
5239 | 5239 | self::$SUPPORT['mbstring'] === false |
5240 | 5240 | ) { |
5241 | - trigger_error('UTF8::stristr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5241 | + trigger_error('UTF8::stristr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5242 | 5242 | } |
5243 | 5243 | |
5244 | 5244 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5255,7 +5255,7 @@ discard block |
||
5255 | 5255 | return \grapheme_stristr($haystack, $needle, $before_needle); |
5256 | 5256 | } |
5257 | 5257 | |
5258 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/usi', $haystack, $match); |
|
5258 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/usi', $haystack, $match); |
|
5259 | 5259 | |
5260 | 5260 | if (!isset($match[1])) { |
5261 | 5261 | return false; |
@@ -5329,7 +5329,7 @@ discard block |
||
5329 | 5329 | && |
5330 | 5330 | self::$SUPPORT['iconv'] === false |
5331 | 5331 | ) { |
5332 | - trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5332 | + trigger_error('UTF8::strlen() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5333 | 5333 | } |
5334 | 5334 | |
5335 | 5335 | if ( |
@@ -5404,7 +5404,7 @@ discard block |
||
5404 | 5404 | */ |
5405 | 5405 | public static function strnatcmp($str1, $str2) |
5406 | 5406 | { |
5407 | - return $str1 . '' === $str2 . '' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5407 | + return $str1.'' === $str2.'' ? 0 : strnatcmp(self::strtonatfold($str1), self::strtonatfold($str2)); |
|
5408 | 5408 | } |
5409 | 5409 | |
5410 | 5410 | /** |
@@ -5465,7 +5465,7 @@ discard block |
||
5465 | 5465 | return false; |
5466 | 5466 | } |
5467 | 5467 | |
5468 | - if (preg_match('/' . self::rxClass($char_list) . '/us', $haystack, $m)) { |
|
5468 | + if (preg_match('/'.self::rxClass($char_list).'/us', $haystack, $m)) { |
|
5469 | 5469 | return substr($haystack, strpos($haystack, $m[0])); |
5470 | 5470 | } |
5471 | 5471 | |
@@ -5542,7 +5542,7 @@ discard block |
||
5542 | 5542 | && |
5543 | 5543 | self::$SUPPORT['mbstring'] === false |
5544 | 5544 | ) { |
5545 | - trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5545 | + trigger_error('UTF8::strpos() without mbstring / iconv cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5546 | 5546 | } |
5547 | 5547 | |
5548 | 5548 | if ( |
@@ -5765,7 +5765,7 @@ discard block |
||
5765 | 5765 | && |
5766 | 5766 | self::$SUPPORT['mbstring'] === false |
5767 | 5767 | ) { |
5768 | - trigger_error('UTF8::strripos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5768 | + trigger_error('UTF8::strripos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5769 | 5769 | } |
5770 | 5770 | |
5771 | 5771 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5848,7 +5848,7 @@ discard block |
||
5848 | 5848 | && |
5849 | 5849 | self::$SUPPORT['mbstring'] === false |
5850 | 5850 | ) { |
5851 | - trigger_error('UTF8::strrpos() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5851 | + trigger_error('UTF8::strrpos() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5852 | 5852 | } |
5853 | 5853 | |
5854 | 5854 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5916,7 +5916,7 @@ discard block |
||
5916 | 5916 | return 0; |
5917 | 5917 | } |
5918 | 5918 | |
5919 | - return preg_match('/^' . self::rxClass($mask) . '+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5919 | + return preg_match('/^'.self::rxClass($mask).'+/u', $str, $str) ? self::strlen($str[0]) : 0; |
|
5920 | 5920 | } |
5921 | 5921 | |
5922 | 5922 | /** |
@@ -5962,7 +5962,7 @@ discard block |
||
5962 | 5962 | && |
5963 | 5963 | self::$SUPPORT['mbstring'] === false |
5964 | 5964 | ) { |
5965 | - trigger_error('UTF8::strstr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
5965 | + trigger_error('UTF8::strstr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
5966 | 5966 | } |
5967 | 5967 | |
5968 | 5968 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -5979,7 +5979,7 @@ discard block |
||
5979 | 5979 | return \grapheme_strstr($haystack, $needle, $before_needle); |
5980 | 5980 | } |
5981 | 5981 | |
5982 | - preg_match('/^(.*?)' . preg_quote($needle, '/') . '/us', $haystack, $match); |
|
5982 | + preg_match('/^(.*?)'.preg_quote($needle, '/').'/us', $haystack, $match); |
|
5983 | 5983 | |
5984 | 5984 | if (!isset($match[1])) { |
5985 | 5985 | return false; |
@@ -6086,9 +6086,9 @@ discard block |
||
6086 | 6086 | Bootup::is_php('5.4') === true |
6087 | 6087 | ) { |
6088 | 6088 | |
6089 | - $langCode = $lang . '-Lower'; |
|
6089 | + $langCode = $lang.'-Lower'; |
|
6090 | 6090 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6091 | - trigger_error('UTF8::strtolower() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6091 | + trigger_error('UTF8::strtolower() without intl for special language: '.$lang, E_USER_WARNING); |
|
6092 | 6092 | |
6093 | 6093 | $langCode = 'Any-Lower'; |
6094 | 6094 | } |
@@ -6096,7 +6096,7 @@ discard block |
||
6096 | 6096 | return transliterator_transliterate($langCode, $str); |
6097 | 6097 | } |
6098 | 6098 | |
6099 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6099 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6100 | 6100 | } |
6101 | 6101 | |
6102 | 6102 | return \mb_strtolower($str, $encoding); |
@@ -6156,9 +6156,9 @@ discard block |
||
6156 | 6156 | Bootup::is_php('5.4') === true |
6157 | 6157 | ) { |
6158 | 6158 | |
6159 | - $langCode = $lang . '-Upper'; |
|
6159 | + $langCode = $lang.'-Upper'; |
|
6160 | 6160 | if (!in_array($langCode, self::$SUPPORT['intl__transliterator_list_ids'], true)) { |
6161 | - trigger_error('UTF8::strtoupper() without intl for special language: ' . $lang, E_USER_WARNING); |
|
6161 | + trigger_error('UTF8::strtoupper() without intl for special language: '.$lang, E_USER_WARNING); |
|
6162 | 6162 | |
6163 | 6163 | $langCode = 'Any-Upper'; |
6164 | 6164 | } |
@@ -6166,7 +6166,7 @@ discard block |
||
6166 | 6166 | return transliterator_transliterate($langCode, $str); |
6167 | 6167 | } |
6168 | 6168 | |
6169 | - trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: ' . $lang, E_USER_WARNING); |
|
6169 | + trigger_error('UTF8::strtolower() without intl + PHP >= 5.4 cannot handle the "lang"-parameter: '.$lang, E_USER_WARNING); |
|
6170 | 6170 | } |
6171 | 6171 | |
6172 | 6172 | return \mb_strtoupper($str, $encoding); |
@@ -6271,7 +6271,7 @@ discard block |
||
6271 | 6271 | |
6272 | 6272 | $return = array(); |
6273 | 6273 | foreach ($array as $key => $value) { |
6274 | - if ($case === CASE_LOWER) { |
|
6274 | + if ($case === CASE_LOWER) { |
|
6275 | 6275 | $key = self::strtolower($key); |
6276 | 6276 | } else { |
6277 | 6277 | $key = self::strtoupper($key); |
@@ -6355,7 +6355,7 @@ discard block |
||
6355 | 6355 | && |
6356 | 6356 | self::$SUPPORT['mbstring'] === false |
6357 | 6357 | ) { |
6358 | - trigger_error('UTF8::substr() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6358 | + trigger_error('UTF8::substr() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6359 | 6359 | } |
6360 | 6360 | |
6361 | 6361 | if (self::$SUPPORT['mbstring'] === true) { |
@@ -6512,14 +6512,14 @@ discard block |
||
6512 | 6512 | && |
6513 | 6513 | self::$SUPPORT['mbstring'] === false |
6514 | 6514 | ) { |
6515 | - trigger_error('UTF8::substr_count() without mbstring cannot handle "' . $encoding . '" encoding', E_USER_WARNING); |
|
6515 | + trigger_error('UTF8::substr_count() without mbstring cannot handle "'.$encoding.'" encoding', E_USER_WARNING); |
|
6516 | 6516 | } |
6517 | 6517 | |
6518 | 6518 | if (self::$SUPPORT['mbstring'] === true) { |
6519 | 6519 | return \mb_substr_count($haystack, $needle, $encoding); |
6520 | 6520 | } |
6521 | 6521 | |
6522 | - preg_match_all('/' . preg_quote($needle, '/') . '/us', $haystack, $matches, PREG_SET_ORDER); |
|
6522 | + preg_match_all('/'.preg_quote($needle, '/').'/us', $haystack, $matches, PREG_SET_ORDER); |
|
6523 | 6523 | |
6524 | 6524 | return count($matches); |
6525 | 6525 | } |
@@ -6781,7 +6781,7 @@ discard block |
||
6781 | 6781 | |
6782 | 6782 | $strSwappedCase = preg_replace_callback( |
6783 | 6783 | '/[\S]/u', |
6784 | - function ($match) use ($encoding) { |
|
6784 | + function($match) use ($encoding) { |
|
6785 | 6785 | $marchToUpper = UTF8::strtoupper($match[0], $encoding); |
6786 | 6786 | |
6787 | 6787 | if ($match[0] === $marchToUpper) { |
@@ -7125,13 +7125,13 @@ discard block |
||
7125 | 7125 | $c2 = $i + 1 >= $max ? "\x00" : $str[$i + 1]; |
7126 | 7126 | |
7127 | 7127 | if ($c2 >= "\x80" && $c2 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7128 | - $buf .= $c1 . $c2; |
|
7128 | + $buf .= $c1.$c2; |
|
7129 | 7129 | $i++; |
7130 | 7130 | } else { // not valid UTF8 - convert it |
7131 | 7131 | $cc1tmp = ord($c1) / 64; |
7132 | 7132 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7133 | 7133 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7134 | - $buf .= $cc1 . $cc2; |
|
7134 | + $buf .= $cc1.$cc2; |
|
7135 | 7135 | } |
7136 | 7136 | |
7137 | 7137 | } elseif ($c1 >= "\xE0" && $c1 <= "\xEF") { // looks like 3 bytes UTF8 |
@@ -7140,13 +7140,13 @@ discard block |
||
7140 | 7140 | $c3 = $i + 2 >= $max ? "\x00" : $str[$i + 2]; |
7141 | 7141 | |
7142 | 7142 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7143 | - $buf .= $c1 . $c2 . $c3; |
|
7143 | + $buf .= $c1.$c2.$c3; |
|
7144 | 7144 | $i += 2; |
7145 | 7145 | } else { // not valid UTF8 - convert it |
7146 | 7146 | $cc1tmp = ord($c1) / 64; |
7147 | 7147 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7148 | 7148 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7149 | - $buf .= $cc1 . $cc2; |
|
7149 | + $buf .= $cc1.$cc2; |
|
7150 | 7150 | } |
7151 | 7151 | |
7152 | 7152 | } elseif ($c1 >= "\xF0" && $c1 <= "\xF7") { // looks like 4 bytes UTF8 |
@@ -7156,20 +7156,20 @@ discard block |
||
7156 | 7156 | $c4 = $i + 3 >= $max ? "\x00" : $str[$i + 3]; |
7157 | 7157 | |
7158 | 7158 | if ($c2 >= "\x80" && $c2 <= "\xBF" && $c3 >= "\x80" && $c3 <= "\xBF" && $c4 >= "\x80" && $c4 <= "\xBF") { // yeah, almost sure it's UTF8 already |
7159 | - $buf .= $c1 . $c2 . $c3 . $c4; |
|
7159 | + $buf .= $c1.$c2.$c3.$c4; |
|
7160 | 7160 | $i += 3; |
7161 | 7161 | } else { // not valid UTF8 - convert it |
7162 | 7162 | $cc1tmp = ord($c1) / 64; |
7163 | 7163 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7164 | 7164 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7165 | - $buf .= $cc1 . $cc2; |
|
7165 | + $buf .= $cc1.$cc2; |
|
7166 | 7166 | } |
7167 | 7167 | |
7168 | 7168 | } else { // doesn't look like UTF8, but should be converted |
7169 | 7169 | $cc1tmp = ord($c1) / 64; |
7170 | 7170 | $cc1 = self::chr_and_parse_int($cc1tmp) | "\xC0"; |
7171 | 7171 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7172 | - $buf .= $cc1 . $cc2; |
|
7172 | + $buf .= $cc1.$cc2; |
|
7173 | 7173 | } |
7174 | 7174 | |
7175 | 7175 | } elseif (($c1 & "\xC0") === "\x80") { // needs conversion |
@@ -7180,7 +7180,7 @@ discard block |
||
7180 | 7180 | } else { |
7181 | 7181 | $cc1 = self::chr_and_parse_int($ordC1 / 64) | "\xC0"; |
7182 | 7182 | $cc2 = ($c1 & "\x3F") | "\x80"; |
7183 | - $buf .= $cc1 . $cc2; |
|
7183 | + $buf .= $cc1.$cc2; |
|
7184 | 7184 | } |
7185 | 7185 | |
7186 | 7186 | } else { // it doesn't need conversion |
@@ -7191,7 +7191,7 @@ discard block |
||
7191 | 7191 | // decode unicode escape sequences |
7192 | 7192 | $buf = preg_replace_callback( |
7193 | 7193 | '/\\\\u([0-9a-f]{4})/i', |
7194 | - function ($match) { |
|
7194 | + function($match) { |
|
7195 | 7195 | return \mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE'); |
7196 | 7196 | }, |
7197 | 7197 | $buf |
@@ -7256,7 +7256,7 @@ discard block |
||
7256 | 7256 | $cleanUtf8 |
7257 | 7257 | ); |
7258 | 7258 | |
7259 | - return $strPartOne . $strPartTwo; |
|
7259 | + return $strPartOne.$strPartTwo; |
|
7260 | 7260 | } |
7261 | 7261 | |
7262 | 7262 | /** |
@@ -7769,7 +7769,7 @@ discard block |
||
7769 | 7769 | return ''; |
7770 | 7770 | } |
7771 | 7771 | |
7772 | - preg_match('/^\s*+(?:\S++\s*+){1,' . $limit . '}/u', $str, $matches); |
|
7772 | + preg_match('/^\s*+(?:\S++\s*+){1,'.$limit.'}/u', $str, $matches); |
|
7773 | 7773 | |
7774 | 7774 | if ( |
7775 | 7775 | !isset($matches[0]) |
@@ -7779,7 +7779,7 @@ discard block |
||
7779 | 7779 | return $str; |
7780 | 7780 | } |
7781 | 7781 | |
7782 | - return self::rtrim($matches[0]) . $strAddOn; |
|
7782 | + return self::rtrim($matches[0]).$strAddOn; |
|
7783 | 7783 | } |
7784 | 7784 | |
7785 | 7785 | /** |
@@ -7847,7 +7847,7 @@ discard block |
||
7847 | 7847 | $strReturn .= $break; |
7848 | 7848 | } |
7849 | 7849 | |
7850 | - return $strReturn . implode('', $chars); |
|
7850 | + return $strReturn.implode('', $chars); |
|
7851 | 7851 | } |
7852 | 7852 | |
7853 | 7853 | /** |