Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/polls.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Service/VoteService.php')
-rw-r--r--lib/Service/VoteService.php5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/Service/VoteService.php b/lib/Service/VoteService.php
index 5073b732..7534b258 100644
--- a/lib/Service/VoteService.php
+++ b/lib/Service/VoteService.php
@@ -34,7 +34,7 @@ use OCA\Polls\Service\AnonymizeService;
use OCA\Polls\Service\LogService;
use OCA\Polls\Model\Acl;
-class VoteService {
+class VoteService {
/** @var VoteMapper */
private $voteMapper;
@@ -114,13 +114,12 @@ class VoteService {
public function set($optionId, $setTo, $token = '') {
$option = $this->optionMapper->find($optionId);
- $pollId = $option->getPollId();
if (!$this->acl->setPollIdOrToken($option->getPollId(), $token)->getAllowVote()) {
throw new NotAuthorizedException;
}
- if (!$option->getPollId() === $this->acl->getPollId()) {
+ if ($option->getPollId() !== $this->acl->getPollId()) {
throw new NotAuthorizedException;
}