Completed
Pull Request — master (#124)
by Sander
02:33
created
lib/Service/CredentialService.php 1 patch
Braces   +6 added lines, -7 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 	 * @param Credential $credential
76 76
 	 * @return \OCP\AppFramework\Db\Entity
77 77
 	 */
78
-	public function deleteCredential(Credential $credential){
78
+	public function deleteCredential(Credential $credential) {
79 79
 		return $this->credentialMapper->deleteCredential($credential);
80 80
 	}
81 81
 
@@ -116,12 +116,11 @@  discard block
 block discarded – undo
116 116
 	 * @return Credential
117 117
 	 * @throws DoesNotExistException
118 118
 	 */
119
-	public function getCredentialById($credential_id, $user_id){
119
+	public function getCredentialById($credential_id, $user_id) {
120 120
         $credential = $this->credentialMapper->getCredentialById($credential_id);
121
-        if ($credential->getUserId() === $user_id){
121
+        if ($credential->getUserId() === $user_id) {
122 122
             return $credential;
123
-        }
124
-        else {
123
+        } else {
125 124
             $acl = $this->sharingACL->getItemACL($user_id, $credential->getGuid());
126 125
             if ($acl->hasPermission(SharingACL::READ));
127 126
             return $credential;
@@ -135,7 +134,7 @@  discard block
 block discarded – undo
135 134
 	 * @param $credential_id
136 135
 	 * @return Credential
137 136
 	 */
138
-	public function getCredentialLabelById($credential_id){
137
+	public function getCredentialLabelById($credential_id) {
139 138
 		return $this->credentialMapper->getCredentialLabelById($credential_id);
140 139
 	}
141 140
 
@@ -145,7 +144,7 @@  discard block
 block discarded – undo
145 144
 	 * @param null $user_id
146 145
 	 * @return Credential
147 146
 	 */
148
-	public function getCredentialByGUID($credential_guid, $user_id = null){
147
+	public function getCredentialByGUID($credential_guid, $user_id = null) {
149 148
 	    return $this->credentialMapper->getCredentialByGUID($credential_guid, $user_id);
150 149
     }
151 150
 }
152 151
\ No newline at end of file
Please login to merge, or discard this patch.