@@ -50,7 +50,6 @@ |
||
50 | 50 | /** |
51 | 51 | * Verifies whether the dir of the file is valid (can be created) and is writable. |
52 | 52 | * |
53 | - * @param string $filepath Input |
|
54 | 53 | * @param XenForo_DataWriter $dw |
55 | 54 | * @param string $fieldName Name of field/option |
56 | 55 | * |
@@ -53,7 +53,6 @@ |
||
53 | 53 | /** |
54 | 54 | * Verifies the Threema Gateway Secret format. |
55 | 55 | * |
56 | - * @param string $threemaid Input threema ID |
|
57 | 56 | * @param XenForo_DataWriter $dw |
58 | 57 | * @param string $fieldName Name of field/option |
59 | 58 | * |
@@ -207,9 +207,7 @@ discard block |
||
207 | 207 | * Currently this is not correctly implemented in XenForo. |
208 | 208 | * See {@link https://xenforo.com/community/threads/1-5-documentation-for-two-step-authentication.102846/#post-1031047} |
209 | 209 | * |
210 | - * @param XenForo_Input $input |
|
211 | 210 | * @param array $user |
212 | - * @param array $error |
|
213 | 211 | * |
214 | 212 | * @return string HTML code |
215 | 213 | */ |
@@ -392,8 +390,6 @@ discard block |
||
392 | 390 | /** |
393 | 391 | * Called when verifying displaying the choose 2FA mode. |
394 | 392 | * |
395 | - * @param array $user |
|
396 | - * @param object $error |
|
397 | 393 | * |
398 | 394 | * @return bool |
399 | 395 | */ |
@@ -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 |
@@ -726,7 +726,7 @@ |
||
726 | 726 | $displayTime = floor($hours / 24) . ' ' . new XenForo_Phrase('threemagw_days'); |
727 | 727 | } |
728 | 728 | |
729 | - return (string)$displayTime; |
|
729 | + return (string) $displayTime; |
|
730 | 730 | } |
731 | 731 | |
732 | 732 | /** |
@@ -55,7 +55,7 @@ |
||
55 | 55 | $db->query('INSERT INTO `xf_tfa_provider` |
56 | 56 | (`provider_id`, `provider_class`, `priority`, `active`) |
57 | 57 | VALUES (?, ?, ?, ?)', |
58 | - [$this->TfaId, $this->TfaClass, $this->TfaPriority, (int) $enabled]); |
|
58 | + [$this->TfaId, $this->TfaClass, $this->TfaPriority, (int) $enabled]); |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | public function lookupMail($mail) |
60 | 60 | { |
61 | 61 | // check permission |
62 | - if (! $this->permissions->hasPermission('lookup')) { |
|
62 | + if (!$this->permissions->hasPermission('lookup')) { |
|
63 | 63 | throw new XenForo_Exception(new XenForo_Phrase('threemagw_permission_error')); |
64 | 64 | } |
65 | 65 | |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | public function getCapabilities($threemaId) |
87 | 87 | { |
88 | 88 | // check permission |
89 | - if (! $this->permissions->hasPermission('lookup')) { |
|
89 | + if (!$this->permissions->hasPermission('lookup')) { |
|
90 | 90 | throw new XenForo_Exception(new XenForo_Phrase('threemagw_permission_error')); |
91 | 91 | } |
92 | 92 |
@@ -131,7 +131,7 @@ |
||
131 | 131 | // check whether visitor is user |
132 | 132 | /** @var bool $userIsAlreadyVisitor Whether the new user is already the default user and the |
133 | 133 | old user is the default user too. |
134 | - */ |
|
134 | + */ |
|
135 | 135 | $userIsAlreadyVisitor = $this->userIsDefault($newUser) && $this->userIsDefault($oldUserId); |
136 | 136 | // prevent unnecessary changes |
137 | 137 | if ($oldUserId == $newUserId || $userIsAlreadyVisitor) { |
@@ -57,9 +57,9 @@ |
||
57 | 57 | public static function getOldestPossibleReplayAttackDate() |
58 | 58 | { |
59 | 59 | /** @var XenForo_Options $options */ |
60 | - $options = XenForo_Application::getOptions(); |
|
60 | + $options = XenForo_Application::getOptions(); |
|
61 | 61 | /** @var int $rejectOlDefault the default maximum age of a message according*/ |
62 | - $rejectOlDefault = strtotime('-14 days', XenForo_Application::$time);; |
|
62 | + $rejectOlDefault = strtotime('-14 days', XenForo_Application::$time); ; |
|
63 | 63 | /** @var int $rejectOld the maximum age of a message according to the options */ |
64 | 64 | $rejectOldOption = ''; |
65 | 65 | if ($options->threema_gateway_verify_receive_time && $options->threema_gateway_verify_receive_time['enabled']) { |
@@ -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 | { |