diff --git a/controller/sharecontroller.php b/controller/sharecontroller.php index 66e8ad99..00284a68 100644 --- a/controller/sharecontroller.php +++ b/controller/sharecontroller.php @@ -196,7 +196,7 @@ class ShareController extends ApiController { $usersTmp = $this->userManager->searchDisplayName($search, $this->limit, $this->offset); foreach ($usersTmp as $user) { - if ($this->userId->getUID() != $user->getUID() && count($this->vaultService->getByUser($user->getUID())) >= 1) { + if ($this->userId->getUID() !== $user->getUID() && count($this->vaultService->getByUser($user->getUID())) >= 1) { $users[] = array( 'text' => $user->getDisplayName(), 'uid' => $user->getUID(), @@ -416,7 +416,7 @@ class ShareController extends ApiController { $views = $acl->getExpireViews(); if ($views === 0) { return new NotFoundJSONResponse(); - } else if ($views != -1) { + } else if ($views !== -1) { $views--; $acl->setExpireViews($views); $this->shareService->updateCredentialACL($acl); @@ -441,7 +441,7 @@ class ShareController extends ApiController { $pending = $this->shareService->getCredentialPendingAclList($item_guid); try { $credential = $this->credentialService->getCredentialByGUID($item_guid); - if ($credential->getUserId() == $this->userId->getUID()) { + if ($credential->getUserId() === $this->userId->getUID()) { foreach ($pending as &$item) { $item = $item->asACLJson(); } @@ -490,7 +490,7 @@ class ShareController extends ApiController { } catch (DoesNotExistException $exception) { return new NotFoundJSONResponse(); } - if ($this->userId->getUID() == $credential->getUserId()) { + if ($this->userId->getUID() === $credential->getUserId()) { $acl = null; try { $acl = $this->shareService->getACL($user_id, $item_guid); diff --git a/lib/Db/VaultMapper.php b/lib/Db/VaultMapper.php index e294a2ec..aebe0cb5 100644 --- a/lib/Db/VaultMapper.php +++ b/lib/Db/VaultMapper.php @@ -47,7 +47,7 @@ class VaultMapper extends Mapper { /** * @throws \OCP\AppFramework\Db\DoesNotExistException if not found * @throws \OCP\AppFramework\Db\MultipleObjectsReturnedException if more than one result - * @return Vault + * @return Vault[] */ public function findVaultsFromUser($userId){ $sql = 'SELECT * FROM `*PREFIX*passman_vaults` ' .