diff options
author | brantje <brantje@gmail.com> | 2016-10-08 15:49:59 +0300 |
---|---|---|
committer | brantje <brantje@gmail.com> | 2016-10-08 16:00:07 +0300 |
commit | adb7dd582b0e066d4bf7a61c3fa8386feafafd3d (patch) | |
tree | 524f1c6aabbe90c233603a9ed9da7673315c1b6b /controller | |
parent | e17f52bdd0c84c97cbd9311c42e5bc8eba7e81ab (diff) |
Remove comment
Fix if statement
Add return
Add return
Remove assignment
Diffstat (limited to 'controller')
-rw-r--r-- | controller/credentialcontroller.php | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/controller/credentialcontroller.php b/controller/credentialcontroller.php index cdb8065b..4a6d0a8f 100644 --- a/controller/credentialcontroller.php +++ b/controller/credentialcontroller.php @@ -145,7 +145,6 @@ class CredentialController extends ApiController { } } $link = ''; // @TODO create direct link to credential - $activity = false; if ($revision_created) { $activity = 'item_apply_revision'; $this->activityService->add( @@ -182,9 +181,9 @@ class CredentialController extends ApiController { try { $acl_list = $this->sharingService->getCredentialAclList($storedCredential->getGuid()); } catch (DoesNotExistException $exception) { - + // Just check if we have an acl list } - if ($acl_list) { + if (!empty($acl_list)) { $params = array(); switch ($activity) { case 'item_recovered': @@ -293,7 +292,7 @@ class CredentialController extends ApiController { public function updateRevision($credential_guid, $revision_id, $credential_data){ $revision = null; try { - $credential = $this->credentialService->getCredentialByGUID($credential_guid, $this->userId); + $this->credentialService->getCredentialByGUID($credential_guid, $this->userId); } catch (DoesNotExistException $e) { return new NotFoundJSONResponse(); } |