@@ -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 | }, |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | $class_string = ''; |
| 373 | 373 | |
| 374 | 374 | $current_range = array('start' => null, 'end' => null); |
| 375 | - foreach($ords as $ord) { |
|
| 375 | + foreach ($ords as $ord) { |
|
| 376 | 376 | if (!isset($current_range['start'])) { |
| 377 | 377 | $current_range['start'] = $ord; |
| 378 | 378 | } |
@@ -724,7 +724,7 @@ discard block |
||
| 724 | 724 | $class_string = ''; |
| 725 | 725 | |
| 726 | 726 | $current_range = array('start' => null, 'end' => null); |
| 727 | - foreach($value as $ord) { |
|
| 727 | + foreach ($value as $ord) { |
|
| 728 | 728 | if (!isset($current_range['start'])) { |
| 729 | 729 | $current_range['start'] = $ord; |
| 730 | 730 | } |
@@ -809,7 +809,7 @@ discard block |
||
| 809 | 809 | if ($key_type == 'hexchar') { |
| 810 | 810 | $func_text .= '"'; |
| 811 | 811 | |
| 812 | - $key = mb_decode_numericentity(str_replace(' ', '', $key), array(0,0x10FFFF,0,0xFFFFFF), 'UTF-8'); |
|
| 812 | + $key = mb_decode_numericentity(str_replace(' ', '', $key), array(0, 0x10FFFF, 0, 0xFFFFFF), 'UTF-8'); |
|
| 813 | 813 | |
| 814 | 814 | foreach (unpack('C*', $key) as $byte_value) { |
| 815 | 815 | $func_text .= '\\x' . strtoupper(dechex($byte_value)); |
@@ -831,7 +831,7 @@ discard block |
||
| 831 | 831 | } elseif ($val_type == 'hexchar') { |
| 832 | 832 | $func_text .= '"'; |
| 833 | 833 | |
| 834 | - $value = mb_decode_numericentity(str_replace(' ', '', $value), array(0,0x10FFFF,0,0xFFFFFF), 'UTF-8'); |
|
| 834 | + $value = mb_decode_numericentity(str_replace(' ', '', $value), array(0, 0x10FFFF, 0, 0xFFFFFF), 'UTF-8'); |
|
| 835 | 835 | foreach (unpack('C*', $value) as $byte_value) { |
| 836 | 836 | $func_text .= '\\x' . strtoupper(dechex($byte_value)); |
| 837 | 837 | } |