Completed
Pull Request — master (#124)
by Sander
02:33
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/Db/CredentialMapper.php 1 patch
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -73,20 +73,20 @@  discard block
 block discarded – undo
73 73
 		return $this->findEntities($sql, [$timestamp]);
74 74
 	}
75 75
 
76
-    /**
76
+	/**
77 77
 	 * Get an credential by id.
78 78
 	 * Optional user id
79
-     * @param $credential_id
80
-     * @param null $user_id
81
-     * @return Credential
82
-     */
79
+	 * @param $credential_id
80
+	 * @param null $user_id
81
+	 * @return Credential
82
+	 */
83 83
 	public function getCredentialById($credential_id, $user_id = null){
84 84
 		$sql = 'SELECT * FROM `*PREFIX*passman_credentials` ' .
85 85
 			'WHERE `id` = ?';
86
-        // If we want to check the owner, add it to the query
86
+		// If we want to check the owner, add it to the query
87 87
 		$params = [$credential_id];
88
-        if ($user_id !== null){
89
-        	$sql .= ' and `user_id` = ? ';
88
+		if ($user_id !== null){
89
+			$sql .= ' and `user_id` = ? ';
90 90
 			array_push($params, $user_id);
91 91
 		}
92 92
 		return $this->findEntity($sql,$params);
@@ -176,18 +176,18 @@  discard block
 block discarded – undo
176 176
 		$this->update($credential);
177 177
 	}
178 178
 
179
-    /**
180
-     * Finds a credential by the given guid
181
-     * @param $credential_guid
182
-     * @return Credential
183
-     */
179
+	/**
180
+	 * Finds a credential by the given guid
181
+	 * @param $credential_guid
182
+	 * @return Credential
183
+	 */
184 184
 	public function getCredentialByGUID($credential_guid, $user_id = null){
185
-	    $q = 'SELECT * FROM `*PREFIX*passman_credentials` WHERE guid = ? ';
185
+		$q = 'SELECT * FROM `*PREFIX*passman_credentials` WHERE guid = ? ';
186 186
 		$params = [$credential_guid];
187 187
 		if ($user_id !== null){
188 188
 			$q .= ' and `user_id` = ? ';
189 189
 			array_push($params, $user_id);
190 190
 		}
191
-        return $this->findEntity($q, $params);
192
-    }
191
+		return $this->findEntity($q, $params);
192
+	}
193 193
 }
194 194
\ No newline at end of file
Please login to merge, or discard this patch.