mirror of
https://github.com/nextcloud/passman.git
synced 2025-02-26 16:33:03 +08:00
Remove comment
Fix if statement Add return Add return Remove assignment
This commit is contained in:
parent
e17f52bdd0
commit
adb7dd582b
4 changed files with 5 additions and 11 deletions
|
@ -11,9 +11,4 @@
|
|||
|
||||
namespace OCA\Passman\AppInfo;
|
||||
|
||||
use OCP\AppFramework\App;
|
||||
|
||||
/**
|
||||
* Additional autoloader registration, e.g. registering composer autoloaders
|
||||
*/
|
||||
// require_once __DIR__ . '/../vendor/autoload.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();
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ class CredentialMapper extends Mapper {
|
|||
}
|
||||
|
||||
public function deleteCredential(Credential $credential){
|
||||
$this->delete($credential);
|
||||
return $this->delete($credential);
|
||||
}
|
||||
|
||||
public function upd(Credential $credential){
|
||||
|
|
|
@ -69,6 +69,6 @@ class CredentialRevisionMapper extends Mapper {
|
|||
$revision = new CredentialRevision();
|
||||
$revision->setId($revision_id);
|
||||
$revision->setUserId($user_id);
|
||||
$this->delete($revision);
|
||||
return $this->delete($revision);
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue