Completed
Pull Request — master (#66)
by Sander
02:32
created
lib/Service/CredentialService.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
         $filter = [$item_guid];
62 62
         if ($user_id == null){
63 63
             $q .= 'user_id is null';
64
-        }
65
-        else {
64
+        } else {
66 65
             $q .= 'user_id = ? ';
67 66
             $filter[] = $user_id;
68 67
         }
Please login to merge, or discard this patch.
controller/credentialcontroller.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -257,21 +257,18 @@
 block discarded – undo
257 257
 	public function getRevision($credential_guid) {
258 258
 		try {
259 259
 			$credential = $this->credentialService->getCredentialByGUID($credential_guid);
260
-		}
261
-		catch (DoesNotExistException $ex){
260
+		} catch (DoesNotExistException $ex){
262 261
 			return new NotFoundJSONResponse();
263 262
 		}
264 263
 
265 264
 		// If the request was made by the owner of the credential
266 265
 		if ($this->userId === $credential->getUserId()) {
267 266
 			$result = $this->credentialRevisionService->getRevisions($credential->getId(), $this->userId);
268
-		}
269
-		else {
267
+		} else {
270 268
 			$acl = $this->sharingService->getACL($this->userId, $credential_guid);
271 269
 			if ($acl->hasPermission(SharingACL::HISTORY)){
272 270
 				$result = $this->credentialRevisionService->getRevisions($credential->getId());
273
-			}
274
-			else {
271
+			} else {
275 272
 				return new NotFoundJSONResponse();
276 273
 			}
277 274
 		}
Please login to merge, or discard this patch.
lib/Db/SharingACLMapper.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -61,8 +61,7 @@
 block discarded – undo
61 61
 		$filter = [$item_guid];
62 62
 		if ($user_id === null){
63 63
 			$q .= 'user_id is null';
64
-		}
65
-		else {
64
+		} else {
66 65
 			$q .= 'user_id = ? ';
67 66
 			$filter[] = $user_id;
68 67
 		}
Please login to merge, or discard this patch.