Completed
Pull Request — master (#38)
by
unknown
02:40
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.