@@ -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 | /** |
@@ -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 | |
@@ -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']) { |
@@ -61,7 +61,7 @@ |
||
| 61 | 61 | public static function getRandomString($length, $keyspace = 'abcdefghijklmnopqrstuvwxyz01234567') |
| 62 | 62 | { |
| 63 | 63 | /** @var string $output */ |
| 64 | - $output = ''; |
|
| 64 | + $output = ''; |
|
| 65 | 65 | if (self::canUseLibsodium()) { |
| 66 | 66 | /** @var int $keysize */ |
| 67 | 67 | $keysize = strlen($keyspace); |
@@ -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 | } |
@@ -477,7 +477,7 @@ |
||
| 477 | 477 | // round unix time to day (00:00) |
| 478 | 478 | $receiveDate = ThreemaGateway_Helper_General::roundToDay($receiveDate); |
| 479 | 479 | |
| 480 | - return (int)$receiveDate; |
|
| 480 | + return (int) $receiveDate; |
|
| 481 | 481 | } |
| 482 | 482 | |
| 483 | 483 | /** |