Completed
Branch master (544df5)
by rugk
02:30
created
docs/examples/MessageCallback.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,6 @@
 block discarded – undo
61 61
      * @param Threema\MsgApi\Helpers\ReceiveMessageResult $receiveResult
62 62
      * @param Threema\MsgApi\Messages\ThreemaMessage      $threemaMsg
63 63
      * @param array|string                                $output        [$logType, $debugLog, $publicLog]
64
-     * @param bool                                        $saveMessage
65 64
      * @param bool                                        $debugMode
66 65
      */
67 66
     public static function testCallbackPostSave(ThreemaGateway_Handler_Action_Callback $handler,
Please login to merge, or discard this patch.
src/library/ThreemaGateway/DataWriter/Messages.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -261,7 +261,7 @@
 block discarded – undo
261 261
      * Gets SQL condition to update the existing record.
262 262
      *
263 263
      * @see XenForo_DataWriter::_getUpdateCondition()
264
-     * @return bool
264
+     * @return string
265 265
      */
266 266
     protected function _getUpdateCondition($tableName)
267 267
     {
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
                 /** @var array $tableFields fields of table "files" */
398 398
                 $tableFields = $this->_getFields()[ThreemaGateway_Model_Messages::DB_TABLE_FILES];
399 399
                 // remove keys, which are automatically set
400
-                unset($tableFields['file_id']);  // (auto increment)
400
+                unset($tableFields['file_id']); // (auto increment)
401 401
                 unset($tableFields['is_saved']); // (default value=1)
402 402
                 // we do only care about the keys
403 403
                 /** @var array $tableKeys extracted keys from fields */
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 
406 406
                 // create insert query for this item
407 407
                 $this->_db->query('INSERT INTO `' . ThreemaGateway_Model_Messages::DB_TABLE_FILES . '`
408
-                    ( `' . implode('`, `',  $tableKeys) . '`)
408
+                    ( `' . implode('`, `', $tableKeys) . '`)
409 409
                     VALUES (' . implode(', ', array_fill(0, count($tableKeys), '?')) . ')', // only (?, ?, ...)
410 410
                     [
411 411
                         $this->get('message_id'), //message_id
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 
429 429
                 // create insert query for this item
430 430
                 $this->_db->query('INSERT INTO `' . ThreemaGateway_Model_Messages::DB_TABLE_DELIVERY_RECEIPT . '`
431
-                    ( `' . implode('`, `',  $tableKeys) . '`)
431
+                    ( `' . implode('`, `', $tableKeys) . '`)
432 432
                     VALUES (' . implode(', ', array_fill(0, count($tableKeys), '?')) . ')', // only (?, ?, ...)
433 433
                     [
434 434
                         $this->get('message_id'), //message_id
@@ -472,7 +472,7 @@  discard block
 block discarded – undo
472 472
 
473 473
         // remove values from database
474 474
         $this->_db->query('UPDATE `' . ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES . '`
475
-            SET `' . implode('`=null, `',  $tableKeys) . '`=null,
475
+            SET `' . implode('`=null, `', $tableKeys) . '`=null,
476 476
             `date_received`=' . $this->_db->quote($this->getRoundedReceiveDate()) . '
477 477
             WHERE ' . $this->getUpdateCondition(ThreemaGateway_Model_Messages::DB_TABLE_MESSAGES));
478 478
     }
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/Action/Callback.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -296,6 +296,7 @@  discard block
 block discarded – undo
296 296
      *
297 297
      * @param array|string $log         string or array
298 298
      * @param string       $stringToAdd
299
+     * @param string $stringToAddDetail
299 300
      */
300 301
     public function addLog(&$log, $stringToAdd, $stringToAddDetail = null)
301 302
     {
@@ -358,7 +359,7 @@  discard block
 block discarded – undo
358 359
      * In case nothing could be found, this returns "null".
359 360
      *
360 361
      * @param  string            $key
361
-     * @return string|array|null
362
+     * @return string
362 363
      */
363 364
     public function getRequest($key = null)
364 365
     {
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/Action/TfaCallback/Abstract.php 2 patches
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -263,7 +263,6 @@  discard block
 block discarded – undo
263 263
      * @param mixed $filterData  any data the filter uses
264 264
      * @param bool  $failOnError whether the filter should fail on errors (true)
265 265
      *                           or silently ignore them (false)
266
-     * @param bool  $saveMessage
267 266
      */
268 267
     public function addFilter($filterType, $filterData, $failOnError = true)
269 268
     {
@@ -332,7 +331,6 @@  discard block
 block discarded – undo
332 331
      *
333 332
      * @param array $confirmRequest the confirm request
334 333
      * @param array $providerData   old data read
335
-     * @param array $setData        new data to set
336 334
      * @param array $processOptions custom options (optional)
337 335
      *
338 336
      * @throws XenForo_Exception
@@ -351,7 +349,7 @@  discard block
 block discarded – undo
351 349
      * essential!
352 350
      *
353 351
      * @throws XenForo_Exception
354
-     * @return bool
352
+     * @return false|null
355 353
      */
356 354
     protected function preProcessPending()
357 355
     {
Please login to merge, or discard this patch.
Indentation   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -85,35 +85,35 @@
 block discarded – undo
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.
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/Action/TfaCallback/DeliveryReceipt.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@
 block discarded – undo
97 97
      * Returns "false" if the process should be canceled. Otherwise "true".
98 98
      *
99 99
      * @throws XenForo_Exception
100
-     * @return bool
100
+     * @return false|null
101 101
      */
102 102
     protected function preProcessPending()
103 103
     {
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/Action/TfaCallback/TextMessage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
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
     {
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/PhpSdk.php 1 patch
Doc Comments   +2 added lines, -1 removed lines patch added patch discarded remove patch
@@ -101,6 +101,7 @@  discard block
 block discarded – undo
101 101
      * @param ThreemaGateway_Handler_Settings If you already used the settings
102 102
      *                                        you can pass them here, so the
103 103
      *                                        class can reuse them.
104
+     * @param ThreemaGateway_Handler_Settings $settings
104 105
      * @throws XenForo_Exception
105 106
      * @return void
106 107
      */
@@ -126,7 +127,7 @@  discard block
 block discarded – undo
126 127
     /**
127 128
      * Returns the feature level of the SDK.
128 129
      *
129
-     * @return string
130
+     * @return integer
130 131
      */
131 132
     public function getFeatureLevel()
132 133
     {
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Handler/Settings.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@
 block discarded – undo
250 250
      * Checks whether the string actually is a private key.
251 251
      *
252 252
      * @param  string $privateKey The string to check.
253
-     * @return bool
253
+     * @return integer
254 254
      */
255 255
     protected function isPrivateKey($privateKey)
256 256
     {
Please login to merge, or discard this patch.
src/library/ThreemaGateway/Helper/Key.php 1 patch
Doc Comments   +2 added lines, -3 removed lines patch added patch discarded remove patch
@@ -60,8 +60,7 @@  discard block
 block discarded – undo
60 60
      *
61 61
      * XenForo template helper: threemaisvalidpubkey.
62 62
      *
63
-     * @param  string $threemaid Threema ID
64
-     * @return string
63
+     * @return integer
65 64
      */
66 65
     public static function checkPublic($pubKey)
67 66
     {
@@ -76,7 +75,7 @@  discard block
 block discarded – undo
76 75
      * @param string the public key
77 76
      * @param string optional suffix (usually 'private:' or 'public:') (default: '')
78 77
      *
79
-     * @return bool whether the key is valid (true) or not (false)
78
+     * @return integer whether the key is valid (true) or not (false)
80 79
      */
81 80
     public static function check($publicKey, $suffix = '')
82 81
     {
Please login to merge, or discard this patch.