@@ -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 |
@@ -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 | /** |
@@ -85,35 +85,35 @@ |
||
| 85 | 85 | */ |
| 86 | 86 | protected $pendingRequests; |
| 87 | 87 | |
| 88 | - /** |
|
| 89 | - * Checks whether text messages contain code used for the receiver 2FA. |
|
| 90 | - * |
|
| 91 | - * You should set the "event hint" to "1" to only pass text messages to the |
|
| 92 | - * listener. Otherwise errors may happen. |
|
| 93 | - * |
|
| 94 | - * @param ThreemaGateway_Handler_Action_Callback $handler |
|
| 95 | - * @param Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult |
|
| 96 | - * @param Threema\MsgApi\Messages\ThreemaMessage $threemaMsg |
|
| 97 | - * @param array|string $output [$logType, $debugLog, $publicLog] |
|
| 98 | - * @param bool $saveMessage |
|
| 99 | - * @param bool $debugMode |
|
| 100 | - * |
|
| 101 | - * @throws XenForo_Exception |
|
| 102 | - */ |
|
| 103 | - public function __construct(ThreemaGateway_Handler_Action_Callback $handler, |
|
| 104 | - Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult, |
|
| 105 | - Threema\MsgApi\Messages\ThreemaMessage $threemaMsg, |
|
| 106 | - &$output, |
|
| 107 | - &$saveMessage, |
|
| 108 | - $debugMode) |
|
| 109 | - { |
|
| 110 | - $this->callback = $handler; |
|
| 111 | - $this->log = $output; |
|
| 112 | - $this->receiveResult = $receiveResult; |
|
| 113 | - $this->threemaMsg = $threemaMsg; |
|
| 114 | - $this->saveMessage = $saveMessage; |
|
| 115 | - $this->debugMode = $debugMode; |
|
| 116 | - } |
|
| 88 | + /** |
|
| 89 | + * Checks whether text messages contain code used for the receiver 2FA. |
|
| 90 | + * |
|
| 91 | + * You should set the "event hint" to "1" to only pass text messages to the |
|
| 92 | + * listener. Otherwise errors may happen. |
|
| 93 | + * |
|
| 94 | + * @param ThreemaGateway_Handler_Action_Callback $handler |
|
| 95 | + * @param Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult |
|
| 96 | + * @param Threema\MsgApi\Messages\ThreemaMessage $threemaMsg |
|
| 97 | + * @param array|string $output [$logType, $debugLog, $publicLog] |
|
| 98 | + * @param bool $saveMessage |
|
| 99 | + * @param bool $debugMode |
|
| 100 | + * |
|
| 101 | + * @throws XenForo_Exception |
|
| 102 | + */ |
|
| 103 | + public function __construct(ThreemaGateway_Handler_Action_Callback $handler, |
|
| 104 | + Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult, |
|
| 105 | + Threema\MsgApi\Messages\ThreemaMessage $threemaMsg, |
|
| 106 | + &$output, |
|
| 107 | + &$saveMessage, |
|
| 108 | + $debugMode) |
|
| 109 | + { |
|
| 110 | + $this->callback = $handler; |
|
| 111 | + $this->log = $output; |
|
| 112 | + $this->receiveResult = $receiveResult; |
|
| 113 | + $this->threemaMsg = $threemaMsg; |
|
| 114 | + $this->saveMessage = $saveMessage; |
|
| 115 | + $this->debugMode = $debugMode; |
|
| 116 | + } |
|
| 117 | 117 | |
| 118 | 118 | /** |
| 119 | 119 | * Prepare the message handling. |
@@ -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) { |
@@ -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 | + } |
|
@@ -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 |