Skip to content

Commit

Permalink
beautification and fix
Browse files Browse the repository at this point in the history
Signed-off-by: dartcafe <github@dartcafe.de>
  • Loading branch information
dartcafe authored and come-nc committed May 6, 2024
1 parent bcba6df commit 4ddfda2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
8 changes: 3 additions & 5 deletions lib/Db/Poll.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,13 +78,11 @@
* @method void setLastInteraction(int $value)
* @method string getMiscSettings()
* @method void setMiscSettings(string $value)
*
*
* Magic functions for joined columns
* @method ?int getIsCurrentUserLocked()
* @method int getMinDate()
* @method int getMaxDate()
* @method int getUserRole()
*
*
* Magic functions for subqueried columns
* @method int getCurrentUserCountOrphanedVotes()
* @method int getCurrentUserCountVotes()
Expand Down Expand Up @@ -361,7 +359,7 @@ public function getRelevantThresholdNet(): int {
}

public function getIsCurrentUserLocked(): bool {
return (bool) $this->isCurrentUserLocked;
return boolval($this->isCurrentUserLocked);
}

public function getDeadline(): int {
Expand Down
2 changes: 1 addition & 1 deletion lib/Db/PollMapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ protected function subQueryOrphanedVotesCount(string $fromAlias, IParameter $cur
// use subQueryVotesCount as base query
$subQuery = $this->subQueryVotesCount($fromAlias, $currentUserId);

// superseed select, group result by voteId and add an additional condition
// superseed select, group result by voteId and add an additional condition
$subQuery->select($subQuery->func()->count($subAlias . '.vote_answer'))
->andWhere($subQuery->expr()->isNull($subJoinAlias . '.id'));

Expand Down

0 comments on commit 4ddfda2

Please sign in to comment.