@@ -169,7 +169,7 @@ discard block |
||
| 169 | 169 | public function getGroupShare(): bool { |
| 170 | 170 | return count( |
| 171 | 171 | array_filter($this->shareMapper->findByPoll($this->getPollId()), function($item) { |
| 172 | - if ($item->getType() === 'group' && $this->groupManager->isInGroup($this->getUserId(),$item->getUserId())) { |
|
| 172 | + if ($item->getType() === 'group' && $this->groupManager->isInGroup($this->getUserId(), $item->getUserId())) { |
|
| 173 | 173 | return true; |
| 174 | 174 | } |
| 175 | 175 | }) |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | * @return bool |
| 229 | 229 | */ |
| 230 | 230 | public function getAllowSeeUsernames(): bool { |
| 231 | - return !(($this->event->getIsAnonymous() && !$this->getIsOwner()) || $this->event->getFullAnonymous());; |
|
| 231 | + return !(($this->event->getIsAnonymous() && !$this->getIsOwner()) || $this->event->getFullAnonymous()); ; |
|
| 232 | 232 | } |
| 233 | 233 | |
| 234 | 234 | /** |
@@ -272,7 +272,7 @@ discard block |
||
| 272 | 272 | $this->foundByToken = true; |
| 273 | 273 | $this->setPollId($share->getPollId()); |
| 274 | 274 | |
| 275 | - if (($share->getType() === 'group' || $share->getType() === 'user') && !\OC::$server->getUserSession()->isLoggedIn()) { |
|
| 275 | + if (($share->getType() === 'group' || $share->getType() === 'user') && !\OC::$server->getUserSession()->isLoggedIn()) { |
|
| 276 | 276 | // User must be logged in for shareType user and group |
| 277 | 277 | throw DoesNotExistException; |
| 278 | 278 | } else if (($share->getType() === 'group' || $share->getType() === 'public') && \OC::$server->getUserSession()->isLoggedIn()) { |
@@ -230,8 +230,8 @@ |
||
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | $this->event->setOwner($this->userId); |
| 233 | - $this->event->setCreated(date('Y-m-d H:i:s',time())); |
|
| 234 | - $this->logger->error(date('Y-m-d H:i:s',time())); |
|
| 233 | + $this->event->setCreated(date('Y-m-d H:i:s', time())); |
|
| 234 | + $this->logger->error(date('Y-m-d H:i:s', time())); |
|
| 235 | 235 | } finally { |
| 236 | 236 | |
| 237 | 237 | $this->event->setTitle($event['title']); |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | $votes = $this->voteMapper->findParticipantsByPoll($pollId); |
| 172 | 172 | foreach ($votes as $vote) { |
| 173 | - if ($vote->getUserId() !== '' && $vote->getUserId() !== null ) { |
|
| 173 | + if ($vote->getUserId() !== '' && $vote->getUserId() !== null) { |
|
| 174 | 174 | $list[] = [ |
| 175 | 175 | 'id' => $vote->getUserId(), |
| 176 | 176 | 'user' => $vote->getUserId(), |
@@ -182,7 +182,7 @@ discard block |
||
| 182 | 182 | |
| 183 | 183 | $shares = $this->shareMapper->findByPoll($pollId); |
| 184 | 184 | foreach ($shares as $share) { |
| 185 | - if ($share->getUserId() !== '' && $share->getUserId() !== null ) { |
|
| 185 | + if ($share->getUserId() !== '' && $share->getUserId() !== null) { |
|
| 186 | 186 | $list[] = [ |
| 187 | 187 | 'id' => $share->getUserId(), |
| 188 | 188 | 'user' => $share->getUserId(), |
@@ -205,7 +205,7 @@ |
||
| 205 | 205 | )); |
| 206 | 206 | |
| 207 | 207 | } else { |
| 208 | - return new DataResponse('Wrong share type: ' .$userShare->getType() , Http::STATUS_FORBIDDEN); |
|
| 208 | + return new DataResponse('Wrong share type: ' . $userShare->getType(), Http::STATUS_FORBIDDEN); |
|
| 209 | 209 | } |
| 210 | 210 | |
| 211 | 211 | |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | foreach ($attr as $key => $kind) { |
| 23 | 23 | $value = $this->factory->generate($kind, $model, $this); |
| 24 | 24 | |
| 25 | - $setter = 'set'.ucfirst(static::camelize($key)); |
|
| 25 | + $setter = 'set' . ucfirst(static::camelize($key)); |
|
| 26 | 26 | // check if there is a setter and use it instead |
| 27 | 27 | if ($model instanceof Entity && is_callable([$model, $setter])) { |
| 28 | 28 | $model->$setter($value); |