Completed
Pull Request — master (#160)
by Sander
03:32
created
lib/Service/CredentialService.php 1 patch
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -81,7 +81,7 @@  discard block
 block discarded – undo
81 81
 
82 82
 	/**
83 83
 	 * Get credentials by vault id
84
-	 * @param $vault_id
84
+	 * @param integer $vault_id
85 85
 	 * @param $user_id
86 86
 	 * @return \OCA\Passman\Db\Vault[]
87 87
 	 */
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 	/**
93 93
 	 * Get a random credential from given vault
94
-	 * @param $vault_id
94
+	 * @param integer $vault_id
95 95
 	 * @param $user_id
96 96
 	 * @return mixed
97 97
 	 */
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
 	/**
104 104
 	 * Get expired credentials.
105
-	 * @param $timestamp
105
+	 * @param integer $timestamp
106 106
 	 * @return \OCA\Passman\Db\Credential[]
107 107
 	 */
108 108
 	public function getExpiredCredentials($timestamp) {
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 
133 133
 	/**
134 134
 	 * Get credential label by credential id.
135
-	 * @param $credential_id
135
+	 * @param integer $credential_id
136 136
 	 * @return Credential
137 137
 	 */
138 138
 	public function getCredentialLabelById($credential_id){
Please login to merge, or discard this patch.
lib/Service/EncryptService.php 1 patch
Doc Comments   +9 added lines, -5 removed lines patch added patch discarded remove patch
@@ -213,6 +213,10 @@  discard block
 block discarded – undo
213 213
 		return array($cipherKey, $macKey, $iv);
214 214
 	}
215 215
 
216
+	/**
217
+	 * @param string $a
218
+	 * @param string $b
219
+	 */
216 220
 	function hash_equals($a, $b) {
217 221
 		$key = openssl_random_pseudo_bytes(128);
218 222
 		return hash_hmac('sha512', $a, $key) === hash_hmac('sha512', $b, $key);
@@ -250,7 +254,7 @@  discard block
 block discarded – undo
250 254
 	/**
251 255
 	 * Pad the data with a random char chosen by the pad amount.
252 256
 	 *
253
-	 * @param $data
257
+	 * @param string $data
254 258
 	 * @return string
255 259
 	 */
256 260
 	protected function pad($data) {
@@ -266,8 +270,8 @@  discard block
 block discarded – undo
266 270
 	/**
267 271
 	 * Unpad the the data
268 272
 	 *
269
-	 * @param $data
270
-	 * @return bool|string
273
+	 * @param string $data
274
+	 * @return false|string
271 275
 	 */
272 276
 	protected function unpad($data) {
273 277
 		$length = $this->getKeySize();
@@ -284,7 +288,7 @@  discard block
 block discarded – undo
284 288
 	 * Encrypt a credential
285 289
 	 *
286 290
 	 * @param array|Credential $credential the credential to decrypt
287
-	 * @return Credential|array
291
+	 * @return string
288 292
 	 */
289 293
 	public function decryptCredential($credential) {
290 294
 
@@ -380,7 +384,7 @@  discard block
 block discarded – undo
380 384
 	/**
381 385
 	 * Decrypt a file
382 386
 	 *
383
-	 * @param  File|array $file
387
+	 * @param  File $file
384 388
 	 * @return File|array
385 389
 	 */
386 390
 
Please login to merge, or discard this patch.