Completed
Push — master ( 41dd50...199c20 )
by Sander
10s
created
controller/credentialcontroller.php 1 patch
Braces   +3 added lines, -6 removed lines patch added patch discarded remove patch
@@ -255,21 +255,18 @@
 block discarded – undo
255 255
 	public function getRevision($credential_guid) {
256 256
 		try {
257 257
 			$credential = $this->credentialService->getCredentialByGUID($credential_guid);
258
-		}
259
-		catch (DoesNotExistException $ex) {
258
+		} catch (DoesNotExistException $ex) {
260 259
 			return new NotFoundJSONResponse();
261 260
 		}
262 261
 
263 262
 		// If the request was made by the owner of the credential
264 263
 		if ($this->userId === $credential->getUserId()) {
265 264
 			$result = $this->credentialRevisionService->getRevisions($credential->getId(), $this->userId);
266
-		}
267
-		else {
265
+		} else {
268 266
 			$acl = $this->sharingService->getACL($this->userId, $credential_guid);
269 267
 			if ($acl->hasPermission(SharingACL::HISTORY)) {
270 268
 				$result = $this->credentialRevisionService->getRevisions($credential->getId());
271
-			}
272
-			else {
269
+			} else {
273 270
 				return new NotFoundJSONResponse();
274 271
 			}
275 272
 		}
Please login to merge, or discard this patch.