@@ -249,7 +249,7 @@ discard block |
||
249 | 249 | $combining_classes = utf8_combining_classes(); |
250 | 250 | |
251 | 251 | // Replace characters with decomposed forms. |
252 | - for ($i=0; $i < count($chars); $i++) |
|
252 | + for ($i = 0; $i < count($chars); $i++) |
|
253 | 253 | { |
254 | 254 | // Hangul characters. |
255 | 255 | if ($chars[$i] >= "\xEA\xB0\x80" && $chars[$i] <= "\xED\x9E\xA3") |
@@ -283,7 +283,7 @@ discard block |
||
283 | 283 | { |
284 | 284 | $temp = $chars[$i]; |
285 | 285 | $chars[$i] = $chars[$i - 1]; |
286 | - $chars[$i -1] = $temp; |
|
286 | + $chars[$i - 1] = $temp; |
|
287 | 287 | |
288 | 288 | // Backtrack and check again. |
289 | 289 | if ($i > 1) |
@@ -527,7 +527,7 @@ discard block |
||
527 | 527 | |
528 | 528 | // Use placeholders to preserve known emoji from further processing. |
529 | 529 | // Regex source is https://unicode.org/reports/tr51/#EBNF_and_Regex |
530 | - $string = preg_replace_callback( |
|
530 | + $string = preg_replace_callback( |
|
531 | 531 | '/' . |
532 | 532 | // Flag emojis |
533 | 533 | '[' . $prop_classes['Regional_Indicator'] . ']{2}' . |
@@ -556,7 +556,7 @@ discard block |
||
556 | 556 | ')?' . |
557 | 557 | ')*' . |
558 | 558 | '/u', |
559 | - function ($matches) use (&$placeholders) |
|
559 | + function($matches) use (&$placeholders) |
|
560 | 560 | { |
561 | 561 | // Skip lone ASCII characters that are not actully part of an emoji sequence. |
562 | 562 | // This can happen because the digits 0-9 and the '*' and '#' characters are |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | // Use placeholders for sanctioned variation selectors. |
588 | 588 | $string = preg_replace_callback( |
589 | 589 | $patterns, |
590 | - function ($matches) use (&$placeholders) |
|
590 | + function($matches) use (&$placeholders) |
|
591 | 591 | { |
592 | 592 | $placeholders[$matches[0]] = "\xEE\xB3\x9B" . md5($matches[0]) . "\xEE\xB3\x9C"; |
593 | 593 | return $placeholders[$matches[0]]; |
@@ -667,7 +667,7 @@ discard block |
||
667 | 667 | // Do the thing. |
668 | 668 | $string = preg_replace_callback( |
669 | 669 | '/' . $pattern . '/u', |
670 | - function ($matches) use ($placeholders) |
|
670 | + function($matches) use ($placeholders) |
|
671 | 671 | { |
672 | 672 | return strtr($matches[0], $placeholders); |
673 | 673 | }, |
@@ -377,7 +377,7 @@ discard block |
||
377 | 377 | $class_string = ''; |
378 | 378 | |
379 | 379 | $current_range = array('start' => null, 'end' => null); |
380 | - foreach($ords as $ord) |
|
380 | + foreach ($ords as $ord) |
|
381 | 381 | { |
382 | 382 | if (!isset($current_range['start'])) |
383 | 383 | $current_range['start'] = $ord; |
@@ -759,7 +759,7 @@ discard block |
||
759 | 759 | $class_string = ''; |
760 | 760 | |
761 | 761 | $current_range = array('start' => null, 'end' => null); |
762 | - foreach($value as $ord) |
|
762 | + foreach ($value as $ord) |
|
763 | 763 | { |
764 | 764 | if (!isset($current_range['start'])) |
765 | 765 | $current_range['start'] = $ord; |
@@ -847,7 +847,7 @@ discard block |
||
847 | 847 | { |
848 | 848 | $func_text .= '"'; |
849 | 849 | |
850 | - $key = mb_decode_numericentity(str_replace(' ', '', $key), array(0,0x10FFFF,0,0xFFFFFF), 'UTF-8'); |
|
850 | + $key = mb_decode_numericentity(str_replace(' ', '', $key), array(0, 0x10FFFF, 0, 0xFFFFFF), 'UTF-8'); |
|
851 | 851 | |
852 | 852 | foreach (unpack('C*', $key) as $byte_value) |
853 | 853 | $func_text .= '\\x' . strtoupper(dechex($byte_value)); |
@@ -871,7 +871,7 @@ discard block |
||
871 | 871 | { |
872 | 872 | $func_text .= '"'; |
873 | 873 | |
874 | - $value = mb_decode_numericentity(str_replace(' ', '', $value), array(0,0x10FFFF,0,0xFFFFFF), 'UTF-8'); |
|
874 | + $value = mb_decode_numericentity(str_replace(' ', '', $value), array(0, 0x10FFFF, 0, 0xFFFFFF), 'UTF-8'); |
|
875 | 875 | foreach (unpack('C*', $value) as $byte_value) |
876 | 876 | $func_text .= '\\x' . strtoupper(dechex($byte_value)); |
877 | 877 |