@@ -8,17 +8,17 @@ discard block |
||
8 | 8 | * @license MIT |
9 | 9 | */ |
10 | 10 | |
11 | - class ThreemaGateway_Helper_Emoji |
|
12 | - { |
|
13 | - /** |
|
14 | - * Replaces unicode escape sequence with the correct UNICODE character. |
|
15 | - * |
|
16 | - * XenForo template helper: emojiparseunicode. |
|
17 | - * You need to pass it as surrogate pairs, e.g. \ud83d\udd11. |
|
18 | - * |
|
19 | - * @param string $string |
|
20 | - * @return string |
|
21 | - */ |
|
11 | + class ThreemaGateway_Helper_Emoji |
|
12 | + { |
|
13 | + /** |
|
14 | + * Replaces unicode escape sequence with the correct UNICODE character. |
|
15 | + * |
|
16 | + * XenForo template helper: emojiparseunicode. |
|
17 | + * You need to pass it as surrogate pairs, e.g. \ud83d\udd11. |
|
18 | + * |
|
19 | + * @param string $string |
|
20 | + * @return string |
|
21 | + */ |
|
22 | 22 | public static function parseUnicode($string) |
23 | 23 | { |
24 | 24 | // uses json_decode as a hackish way to encode unicode strings |
@@ -47,4 +47,4 @@ discard block |
||
47 | 47 | // https://regex101.com/r/aQ3eA3/1 |
48 | 48 | return preg_replace('/(\d)/', '\1\\u20e3', $string); |
49 | 49 | } |
50 | - } |
|
50 | + } |
@@ -25,7 +25,7 @@ |
||
25 | 25 | // https://stackoverflow.com/questions/6058394/unicode-character-in-php-string |
26 | 26 | |
27 | 27 | // RegEx: https://regex101.com/r/yS2zX8/3 |
28 | - return preg_replace_callback('/(\\\\u([0-9a-fA-F]{4}))+/', function ($match) { |
|
28 | + return preg_replace_callback('/(\\\\u([0-9a-fA-F]{4}))+/', function($match) { |
|
29 | 29 | return json_decode('"' . $match[0] . '"'); |
30 | 30 | }, $string); |
31 | 31 | } |
@@ -89,7 +89,7 @@ |
||
89 | 89 | * Returns "false" if the process should be canceled. Otherwise "true". |
90 | 90 | * |
91 | 91 | * @throws XenForo_Exception |
92 | - * @return bool |
|
92 | + * @return false|null |
|
93 | 93 | */ |
94 | 94 | protected function preProcessPending() |
95 | 95 | { |
@@ -422,8 +422,8 @@ |
||
422 | 422 | abstract protected function generateDefaultData(); |
423 | 423 | |
424 | 424 | /** |
425 | - * Adjust the view params for managing the 2FA mode, e.g. add special |
|
426 | - * params needed by your template. |
|
425 | + * Adjust the view params for managing the 2FA mode, e.g. add special |
|
426 | + * params needed by your template. |
|
427 | 427 | * |
428 | 428 | * @param array $viewParams |
429 | 429 | * @param string $context |