Completed
Pull Request — master (#42)
by rugk
02:34
created
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/Console/Command/Base.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@
 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;
Please login to merge, or discard this patch.
source/Threema/MsgApi/Tools/CryptTool.php 1 patch
Doc Comments   +15 added lines, -3 removed lines patch added patch discarded remove patch
@@ -142,6 +142,11 @@  discard block
 block discarded – undo
142 142
 		return $this->makeBox($message, $nonce, $senderPrivateKey, $recipientPublicKey);
143 143
 	}
144 144
 
145
+	/**
146
+	 * @param string $senderPrivateKey
147
+	 * @param string $recipientPublicKey
148
+	 * @param string $nonce
149
+	 */
145 150
 	final public function encryptFileMessage(UploadFileResult $uploadFileResult,
146 151
 											 EncryptResult $encryptResult,
147 152
 											 UploadFileResult $thumbnailUploadFileResult = null,
@@ -190,9 +195,9 @@  discard block
 block discarded – undo
190 195
 	 * make a secret box
191 196
 	 *
192 197
 	 * @param $data
193
-	 * @param $nonce
198
+	 * @param string $nonce
194 199
 	 * @param $key
195
-	 * @return mixed
200
+	 * @return string
196 201
 	 */
197 202
 	abstract protected function makeSecretBox($data, $nonce, $key);
198 203
 
@@ -334,6 +339,9 @@  discard block
 block discarded – undo
334 339
 		return hash_hmac('sha256', $phoneNoClean, self::PHONENO_HMAC_KEY);
335 340
 	}
336 341
 
342
+	/**
343
+	 * @return string
344
+	 */
337 345
 	abstract protected function createRandom($size);
338 346
 
339 347
 	/**
@@ -376,7 +384,7 @@  discard block
 block discarded – undo
376 384
 	abstract public function validate();
377 385
 
378 386
 	/**
379
-	 * @param $data
387
+	 * @param string $data
380 388
 	 * @return EncryptResult
381 389
 	 */
382 390
 	public final function encryptFile($data) {
@@ -405,6 +413,10 @@  discard block
 block discarded – undo
405 413
 		return new EncryptResult($box, $key,  self::FILE_THUMBNAIL_NONCE, strlen($box));
406 414
 	}
407 415
 
416
+	/**
417
+	 * @param string $data
418
+	 * @param string $key
419
+	 */
408 420
 	public final function decryptFileThumbnail($data, $key) {
409 421
 		$result = $this->openSecretBox($data, self::FILE_THUMBNAIL_NONCE, $key);
410 422
 		return false === $result ? null : $result;
Please login to merge, or discard this patch.