Completed
Pull Request — master (#28)
by rugk
03:18
created
source/Threema/Console/Command/Base.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	 * @param string $subject
49 49
 	 * @param string[] $requiredArguments
50 50
 	 * @param string $description
51
-	 * @param array $optionalArguments
51
+	 * @param string[] $optionalArguments
52 52
 	 */
53 53
 	public function __construct($subject, array $requiredArguments, $description, array $optionalArguments = array()) {
54 54
 		$this->subject = $subject;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 	 * return a valid file path
116 116
 	 *
117 117
 	 * @param string $pos
118
-	 * @return null|string
118
+	 * @return string
119 119
 	 * @throws \Threema\Core\Exception
120 120
 	 */
121 121
 	public function getArgumentFile($pos) {
Please login to merge, or discard this patch.
source/Threema/Core/AssocArray.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@
 block discarded – undo
36 36
 	}
37 37
 
38 38
 	/**
39
-	 * @param $string
40
-	 * @param array|null $requiredKeys
39
+	 * @param string $string
40
+	 * @param string[] $requiredKeys
41 41
 	 * @return AssocArray
42 42
 	 * @throws Exception
43 43
 	 */
Please login to merge, or discard this patch.
source/Threema/MsgApi/Commands/DownloadFile.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@
 block discarded – undo
40 40
 	/**
41 41
 	 * @param int $httpCode
42 42
 	 * @param object $res
43
-	 * @return UploadFileResult
43
+	 * @return DownloadFileResult
44 44
 	 */
45 45
 	function parseResult($httpCode, $res){
46 46
 		return new DownloadFileResult($httpCode, $res);
Please login to merge, or discard this patch.
source/Threema/MsgApi/Helpers/ReceiveMessageResult.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 	}
74 74
 
75 75
 	/**
76
-	 * @return \string[]
76
+	 * @return string[]
77 77
 	 */
78 78
 	public function getErrors() {
79 79
 		return $this->errors;
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	}
88 88
 
89 89
 	/**
90
-	 * @return \string[]
90
+	 * @return string[]
91 91
 	 */
92 92
 	public function getFiles() {
93 93
 		return $this->files;
Please login to merge, or discard this patch.
source/Threema/MsgApi/Messages/DeliveryReceipt.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@
 block discarded – undo
65 65
 
66 66
 	/**
67 67
 	 * Get the acknowledged message ids
68
-	 * @return array
68
+	 * @return string[]
69 69
 	 */
70 70
 	public function getAckedMessageIds() {
71 71
 		return $this->ackedMessageIds;
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/CryptTool.php 1 patch
Doc Comments   +16 added lines, -4 removed lines patch added patch discarded remove patch
@@ -145,6 +145,11 @@  discard block
 block discarded – undo
145 145
 		return $this->makeBox($message, $nonce, $senderPrivateKey, $recipientPublicKey);
146 146
 	}
147 147
 
148
+	/**
149
+	 * @param string $senderPrivateKey
150
+	 * @param string $recipientPublicKey
151
+	 * @param string $nonce
152
+	 */
148 153
 	final public function encryptFileMessage(UploadFileResult $uploadFileResult,
149 154
 											 EncryptResult $encryptResult,
150 155
 											 UploadFileResult $thumbnailUploadFileResult = null,
@@ -193,9 +198,9 @@  discard block
 block discarded – undo
193 198
 	 * make a secret box
194 199
 	 *
195 200
 	 * @param $data
196
-	 * @param $nonce
201
+	 * @param string $nonce
197 202
 	 * @param $key
198
-	 * @return mixed
203
+	 * @return string
199 204
 	 */
200 205
 	abstract protected function makeSecretBox($data, $nonce, $key);
201 206
 
@@ -337,6 +342,9 @@  discard block
 block discarded – undo
337 342
 		return hash_hmac('sha256', $phoneNoClean, self::PHONENO_HMAC_KEY);
338 343
 	}
339 344
 
345
+	/**
346
+	 * @return string
347
+	 */
340 348
 	abstract protected function createRandom($size);
341 349
 
342 350
 	/**
@@ -379,7 +387,7 @@  discard block
 block discarded – undo
379 387
 	abstract public function validate();
380 388
 
381 389
 	/**
382
-	 * @param $data
390
+	 * @param string $data
383 391
 	 * @return EncryptResult
384 392
 	 */
385 393
 	public final function encryptFile($data) {
@@ -391,7 +399,7 @@  discard block
 block discarded – undo
391 399
 	/**
392 400
 	 * @param string $data as binary
393 401
 	 * @param string $key as binary
394
-	 * @return null|string
402
+	 * @return string
395 403
 	 */
396 404
 	public final function decryptFile($data, $key) {
397 405
 		$result =  $this->openSecretBox($data, self::FILE_NONCE, $key);
@@ -408,6 +416,10 @@  discard block
 block discarded – undo
408 416
 		return new EncryptResult($box, $key,  self::FILE_THUMBNAIL_NONCE, strlen($box));
409 417
 	}
410 418
 
419
+	/**
420
+	 * @param string $data
421
+	 * @param string $key
422
+	 */
411 423
 	public final function decryptFileThumbnail($data, $key) {
412 424
 		$result = $this->openSecretBox($data, self::FILE_THUMBNAIL_NONCE, $key);
413 425
 		return false === $result ? null : $result;
Please login to merge, or discard this patch.
samples/web/include/Connection.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
32 32
  *
33 33
  * @param string $keystorePath Path public key store file (PHP)
34 34
  *
35
- * @return PhpFile public key store
35
+ * @return Threema\MsgApi\PublicKeyStores\PhpFile public key store
36 36
  */
37 37
 function CreatePublicKeyStore($keystorePath)
38 38
 {
Please login to merge, or discard this patch.
samples/web/SendTextMessage.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@
 block discarded – undo
34 34
  * @param string $threemaId The id whose public key should be fetched
35 35
  * @param string $message The message to send (max 3500 characters)
36 36
  *
37
- * @return string|Exception
37
+ * @return string
38 38
  */
39 39
 function SendMessage($connector, $threemaId, $message)
40 40
 {
Please login to merge, or discard this patch.
source/Threema/MsgApi/Connection.php 1 patch
Doc Comments   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 	/**
58 58
 	 * @param Receiver $receiver
59
-	 * @param $text
59
+	 * @param string $text
60 60
 	 * @return SendSimpleResult
61 61
 	 */
62 62
 	public function sendSimple(Receiver $receiver, $text) {
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	}
77 77
 
78 78
 	/**
79
-	 * @param $encryptedFileData (binary string)
79
+	 * @param string $encryptedFileData (binary string)
80 80
 	 * @return UploadFileResult
81 81
 	 */
82 82
 	public function uploadFile($encryptedFileData) {
@@ -86,8 +86,8 @@  discard block
 block discarded – undo
86 86
 
87 87
 
88 88
 	/**
89
-	 * @param $blobId
90
-	 * @param callable $progress
89
+	 * @param string $blobId
90
+	 * @param \Closure $progress
91 91
 	 * @return DownloadFileResult
92 92
 	 */
93 93
 	public function downloadFile($blobId, \Closure $progress = null) {
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	}
97 97
 
98 98
 	/**
99
-	 * @param $phoneNumber
99
+	 * @param null|string $phoneNumber
100 100
 	 * @return LookupIdResult
101 101
 	 */
102 102
 	public function keyLookupByPhoneNumber($phoneNumber) {
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 
124 124
 
125 125
 	/**
126
-	 * @return CreditsResult
126
+	 * @return Result
127 127
 	 */
128 128
 	public function credits() {
129 129
 		return $this->get(new Credits());
130 130
 	}
131 131
 
132 132
 	/**
133
-	 * @param $threemaId
133
+	 * @param string|null $threemaId
134 134
 	 * @return FetchPublicKeyResult
135 135
 	 */
136 136
 	public function fetchPublicKey($threemaId) {
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 	}
159 159
 
160 160
 	/**
161
-	 * @param callable $progress
161
+	 * @param \Closure $progress
162 162
 	 * @return array
163 163
 	 */
164 164
 	private function createDefaultOptions(\Closure $progress = null) {
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 
226 226
 	/**
227 227
 	 * @param CommandInterface $command
228
-	 * @param callable $progress
228
+	 * @param \Closure $progress
229 229
 	 * @return Result
230 230
 	 */
231 231
 	protected function get(CommandInterface $command, \Closure $progress = null) {
@@ -280,7 +280,7 @@  discard block
 block discarded – undo
280 280
 	 * @param string $path
281 281
 	 * @param array $curlOptions
282 282
 	 * @param array $parameters
283
-	 * @param callable $result
283
+	 * @param \Closure $result
284 284
 	 * @return mixed
285 285
 	 * @throws \Threema\Core\Exception
286 286
 	 */
Please login to merge, or discard this patch.