@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | try { |
| 110 | 110 | $this->share = $this->shareMapper->findByToken($token); |
| 111 | 111 | } catch (DoesNotExistException $e) { |
| 112 | - throw new NotFoundException('Token ' . $token .' does not exist'); |
|
| 112 | + throw new NotFoundException('Token ' . $token . ' does not exist'); |
|
| 113 | 113 | } |
| 114 | 114 | // Allow users entering the poll with a public share access |
| 115 | 115 | |
@@ -199,7 +199,7 @@ discard block |
||
| 199 | 199 | try { |
| 200 | 200 | $this->share = $this->shareMapper->findByToken($token); |
| 201 | 201 | } catch (DoesNotExistException $e) { |
| 202 | - throw new NotFoundException('Token ' . $token .' does not exist'); |
|
| 202 | + throw new NotFoundException('Token ' . $token . ' does not exist'); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | if ($this->share->getType() === Share::TYPE_EXTERNAL) { |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | try { |
| 227 | 227 | $this->share = $this->shareMapper->findByToken($token); |
| 228 | 228 | } catch (DoesNotExistException $e) { |
| 229 | - throw new NotFoundException('Token ' . $token .' does not exist'); |
|
| 229 | + throw new NotFoundException('Token ' . $token . ' does not exist'); |
|
| 230 | 230 | } |
| 231 | 231 | |
| 232 | 232 | $this->systemService->validatePublicUsername($this->share->getPollId(), $userName, $token); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | * @return DataResponse |
| 61 | 61 | */ |
| 62 | 62 | public function add($pollId, $message, $token) { |
| 63 | - return $this->response(function () use ($pollId, $message, $token) { |
|
| 63 | + return $this->response(function() use ($pollId, $message, $token) { |
|
| 64 | 64 | return ['comment'=> $this->commentService->add($pollId, $message, $token)]; |
| 65 | 65 | }); |
| 66 | 66 | } |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @return DataResponse |
| 75 | 75 | */ |
| 76 | 76 | public function delete($commentId, $token) { |
| 77 | - return $this->responseDeleteTolerant(function () use ($commentId, $token) { |
|
| 77 | + return $this->responseDeleteTolerant(function() use ($commentId, $token) { |
|
| 78 | 78 | return ['comment'=> $this->commentService->delete($commentId, $token)]; |
| 79 | 79 | }); |
| 80 | 80 | } |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | * @return DataResponse |
| 71 | 71 | */ |
| 72 | 72 | public function list($pollId) { |
| 73 | - return $this->response(function () use ($pollId) { |
|
| 73 | + return $this->response(function() use ($pollId) { |
|
| 74 | 74 | return ['shares' => $this->shareService->list($pollId)]; |
| 75 | 75 | }); |
| 76 | 76 | } |
@@ -84,7 +84,7 @@ discard block |
||
| 84 | 84 | * @return DataResponse |
| 85 | 85 | */ |
| 86 | 86 | public function get($token) { |
| 87 | - return $this->response(function () use ($token) { |
|
| 87 | + return $this->response(function() use ($token) { |
|
| 88 | 88 | return ['share' => $this->shareService->get($token)]; |
| 89 | 89 | }); |
| 90 | 90 | } |
@@ -100,7 +100,7 @@ discard block |
||
| 100 | 100 | * @return DataResponse |
| 101 | 101 | */ |
| 102 | 102 | public function add($pollId, $type, $userId = '') { |
| 103 | - return $this->responseCreate(function () use ($pollId, $type, $userId) { |
|
| 103 | + return $this->responseCreate(function() use ($pollId, $type, $userId) { |
|
| 104 | 104 | return ['share' => $this->shareService->add($pollId, $type, $userId)]; |
| 105 | 105 | }); |
| 106 | 106 | } |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | */ |
| 116 | 116 | |
| 117 | 117 | public function delete($token) { |
| 118 | - return $this->responseDeleteTolerant(function () use ($token) { |
|
| 118 | + return $this->responseDeleteTolerant(function() use ($token) { |
|
| 119 | 119 | return ['share' => $this->shareService->delete($token)]; |
| 120 | 120 | }); |
| 121 | 121 | } |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | * @return DataResponse |
| 130 | 130 | */ |
| 131 | 131 | public function sendInvitation($token) { |
| 132 | - return $this->response(function () use ($token) { |
|
| 132 | + return $this->response(function() use ($token) { |
|
| 133 | 133 | $sentResult = $this->mailService->sendInvitationMail($token); |
| 134 | 134 | $share = $this->shareService->get($token); |
| 135 | 135 | return [ |
@@ -66,7 +66,7 @@ discard block |
||
| 66 | 66 | * @return DataResponse |
| 67 | 67 | */ |
| 68 | 68 | public function list($pollId) { |
| 69 | - return $this->response(function () use ($pollId) { |
|
| 69 | + return $this->response(function() use ($pollId) { |
|
| 70 | 70 | return ['options' => $this->optionService->list($pollId)]; |
| 71 | 71 | }); |
| 72 | 72 | } |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | * @return DataResponse |
| 79 | 79 | */ |
| 80 | 80 | public function add($pollId, $timestamp = 0, $pollOptionText = '') { |
| 81 | - return $this->responseCreate(function () use ($pollId, $timestamp, $pollOptionText) { |
|
| 81 | + return $this->responseCreate(function() use ($pollId, $timestamp, $pollOptionText) { |
|
| 82 | 82 | return ['option' => $this->optionService->add($pollId, $timestamp, $pollOptionText)]; |
| 83 | 83 | }); |
| 84 | 84 | } |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | * @return DataResponse |
| 91 | 91 | */ |
| 92 | 92 | public function update($optionId, $timestamp, $pollOptionText) { |
| 93 | - return $this->response(function () use ($optionId, $timestamp, $pollOptionText) { |
|
| 93 | + return $this->response(function() use ($optionId, $timestamp, $pollOptionText) { |
|
| 94 | 94 | return ['option' => $this->optionService->update($optionId, $timestamp, $pollOptionText)]; |
| 95 | 95 | }); |
| 96 | 96 | } |
@@ -102,7 +102,7 @@ discard block |
||
| 102 | 102 | * @return DataResponse |
| 103 | 103 | */ |
| 104 | 104 | public function delete($optionId) { |
| 105 | - return $this->responseDeleteTolerant(function () use ($optionId) { |
|
| 105 | + return $this->responseDeleteTolerant(function() use ($optionId) { |
|
| 106 | 106 | return ['option' => $this->optionService->delete($optionId)]; |
| 107 | 107 | }); |
| 108 | 108 | } |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | * @return DataResponse |
| 114 | 114 | */ |
| 115 | 115 | public function confirm($optionId) { |
| 116 | - return $this->response(function () use ($optionId) { |
|
| 116 | + return $this->response(function() use ($optionId) { |
|
| 117 | 117 | return ['option' => $this->optionService->confirm($optionId)]; |
| 118 | 118 | }); |
| 119 | 119 | } |
@@ -126,7 +126,7 @@ discard block |
||
| 126 | 126 | * @return DataResponse |
| 127 | 127 | */ |
| 128 | 128 | public function reorder($pollId, $options) { |
| 129 | - return $this->response(function () use ($pollId, $options) { |
|
| 129 | + return $this->response(function() use ($pollId, $options) { |
|
| 130 | 130 | return ['options' => $this->optionService->reorder($pollId, $options)]; |
| 131 | 131 | }); |
| 132 | 132 | } |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | * @return DataResponse |
| 142 | 142 | */ |
| 143 | 143 | public function sequence($optionId, $step, $unit, $amount) { |
| 144 | - return $this->response(function () use ($optionId, $step, $unit, $amount) { |
|
| 144 | + return $this->response(function() use ($optionId, $step, $unit, $amount) { |
|
| 145 | 145 | return ['options' => $this->optionService->sequence($optionId, $step, $unit, $amount)]; |
| 146 | 146 | }); |
| 147 | 147 | } |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | * @return DataResponse |
| 155 | 155 | */ |
| 156 | 156 | public function findCalendarEvents($optionId) { |
| 157 | - return $this->response(function () use ($optionId) { |
|
| 157 | + return $this->response(function() use ($optionId) { |
|
| 158 | 158 | // try { |
| 159 | 159 | $searchFrom = new DateTime(); |
| 160 | 160 | $searchFrom = $searchFrom->setTimestamp($this->optionService->get($optionId)->getTimestamp())->sub(new DateInterval('PT1H')); |
@@ -77,7 +77,7 @@ discard block |
||
| 77 | 77 | * @return DataResponse |
| 78 | 78 | */ |
| 79 | 79 | public function list($pollId) { |
| 80 | - return $this->response(function () use ($pollId) { |
|
| 80 | + return $this->response(function() use ($pollId) { |
|
| 81 | 81 | return ['shares' => $this->shareService->list($pollId)]; |
| 82 | 82 | }); |
| 83 | 83 | } |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | * @return DataResponse |
| 90 | 90 | */ |
| 91 | 91 | public function get($token) { |
| 92 | - return $this->response(function () use ($token) { |
|
| 92 | + return $this->response(function() use ($token) { |
|
| 93 | 93 | return ['share' => $this->shareService->get($token)]; |
| 94 | 94 | }); |
| 95 | 95 | } |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | * @return DataResponse |
| 104 | 104 | */ |
| 105 | 105 | public function add($pollId, $type, $userId = '') { |
| 106 | - return $this->responseCreate(function () use ($pollId, $type, $userId) { |
|
| 106 | + return $this->responseCreate(function() use ($pollId, $type, $userId) { |
|
| 107 | 107 | return ['share' => $this->shareService->add($pollId, $type, $userId)]; |
| 108 | 108 | }); |
| 109 | 109 | } |
@@ -120,7 +120,7 @@ discard block |
||
| 120 | 120 | * @return DataResponse |
| 121 | 121 | */ |
| 122 | 122 | public function setEmailAddress($token, $emailAddress) { |
| 123 | - return $this->response(function () use ($token, $emailAddress) { |
|
| 123 | + return $this->response(function() use ($token, $emailAddress) { |
|
| 124 | 124 | return ['share' => $this->shareService->setEmailAddress($token, $emailAddress)]; |
| 125 | 125 | }); |
| 126 | 126 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | * @return DataResponse |
| 136 | 136 | */ |
| 137 | 137 | public function personal($token, $userName, $emailAddress = '') { |
| 138 | - return $this->responseCreate(function () use ($token, $userName, $emailAddress) { |
|
| 138 | + return $this->responseCreate(function() use ($token, $userName, $emailAddress) { |
|
| 139 | 139 | return ['share' => $this->shareService->personal($token, $userName, $emailAddress)]; |
| 140 | 140 | }); |
| 141 | 141 | } |
@@ -148,7 +148,7 @@ discard block |
||
| 148 | 148 | */ |
| 149 | 149 | |
| 150 | 150 | public function delete($token) { |
| 151 | - return $this->responseDeleteTolerant(function () use ($token) { |
|
| 151 | + return $this->responseDeleteTolerant(function() use ($token) { |
|
| 152 | 152 | return ['share' => $this->shareService->delete($token)]; |
| 153 | 153 | }); |
| 154 | 154 | } |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | * @return DataResponse |
| 162 | 162 | */ |
| 163 | 163 | public function sendInvitation($token) { |
| 164 | - return $this->response(function () use ($token) { |
|
| 164 | + return $this->response(function() use ($token) { |
|
| 165 | 165 | $sentResult = $this->mailService->sendInvitationMail($token); |
| 166 | 166 | $share = $this->shareService->get($token); |
| 167 | 167 | return [ |
@@ -178,7 +178,7 @@ discard block |
||
| 178 | 178 | * @return DataResponse |
| 179 | 179 | */ |
| 180 | 180 | public function resolveGroup($token) { |
| 181 | - return $this->response(function () use ($token) { |
|
| 181 | + return $this->response(function() use ($token) { |
|
| 182 | 182 | $shares = []; |
| 183 | 183 | $share = $this->shareService->get($token); |
| 184 | 184 | if ($share->getType() === Share::TYPE_CIRCLE) { |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @return DataResponse |
| 66 | 66 | */ |
| 67 | 67 | public function list($pollId) { |
| 68 | - return $this->response(function () use ($pollId) { |
|
| 68 | + return $this->response(function() use ($pollId) { |
|
| 69 | 69 | return ['options' => $this->optionService->list($pollId)]; |
| 70 | 70 | }); |
| 71 | 71 | } |
@@ -82,7 +82,7 @@ discard block |
||
| 82 | 82 | * @return DataResponse |
| 83 | 83 | */ |
| 84 | 84 | public function add($pollId, $timestamp = 0, $pollOptionText = '') { |
| 85 | - return $this->responseCreate(function () use ($pollId, $timestamp, $pollOptionText) { |
|
| 85 | + return $this->responseCreate(function() use ($pollId, $timestamp, $pollOptionText) { |
|
| 86 | 86 | return ['option' => $this->optionService->add($pollId, $timestamp, $pollOptionText)]; |
| 87 | 87 | }); |
| 88 | 88 | } |
@@ -97,7 +97,7 @@ discard block |
||
| 97 | 97 | * @return DataResponse |
| 98 | 98 | */ |
| 99 | 99 | public function update($optionId, $timestamp = 0, $pollOptionText = '') { |
| 100 | - return $this->response(function () use ($optionId, $timestamp, $pollOptionText) { |
|
| 100 | + return $this->response(function() use ($optionId, $timestamp, $pollOptionText) { |
|
| 101 | 101 | return ['option' => $this->optionService->update($optionId, $timestamp, $pollOptionText)]; |
| 102 | 102 | }); |
| 103 | 103 | } |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | * @return DataResponse |
| 112 | 112 | */ |
| 113 | 113 | public function delete($optionId) { |
| 114 | - return $this->responseDeleteTolerant(function () use ($optionId) { |
|
| 114 | + return $this->responseDeleteTolerant(function() use ($optionId) { |
|
| 115 | 115 | return ['option' => $this->optionService->delete($optionId)]; |
| 116 | 116 | }); |
| 117 | 117 | } |
@@ -125,7 +125,7 @@ discard block |
||
| 125 | 125 | * @return DataResponse |
| 126 | 126 | */ |
| 127 | 127 | public function confirm($optionId) { |
| 128 | - return $this->response(function () use ($optionId) { |
|
| 128 | + return $this->response(function() use ($optionId) { |
|
| 129 | 129 | return ['option' => $this->optionService->confirm($optionId)]; |
| 130 | 130 | }); |
| 131 | 131 | } |
@@ -139,7 +139,7 @@ discard block |
||
| 139 | 139 | * @return DataResponse |
| 140 | 140 | */ |
| 141 | 141 | public function setOrder($optionId, $order) { |
| 142 | - return $this->response(function () use ($optionId, $order) { |
|
| 142 | + return $this->response(function() use ($optionId, $order) { |
|
| 143 | 143 | return ['option' => $this->optionService->setOrder($optionId, $order)]; |
| 144 | 144 | }); |
| 145 | 145 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | * @return DataResponse |
| 66 | 66 | */ |
| 67 | 67 | public function list($pollId) { |
| 68 | - return $this->response(function () use ($pollId) { |
|
| 68 | + return $this->response(function() use ($pollId) { |
|
| 69 | 69 | return ['comments' => $this->commentService->list($pollId)]; |
| 70 | 70 | }); |
| 71 | 71 | } |
@@ -80,7 +80,7 @@ discard block |
||
| 80 | 80 | * @return DataResponse |
| 81 | 81 | */ |
| 82 | 82 | public function add($pollId, $message) { |
| 83 | - return $this->response(function () use ($pollId, $message) { |
|
| 83 | + return $this->response(function() use ($pollId, $message) { |
|
| 84 | 84 | return ['comment'=> $this->commentService->add($pollId, $message)]; |
| 85 | 85 | }); |
| 86 | 86 | } |
@@ -94,7 +94,7 @@ discard block |
||
| 94 | 94 | * @return DataResponse |
| 95 | 95 | */ |
| 96 | 96 | public function delete($commentId) { |
| 97 | - return $this->responseDeleteTolerant(function () use ($commentId) { |
|
| 97 | + return $this->responseDeleteTolerant(function() use ($commentId) { |
|
| 98 | 98 | return ['comment'=> $this->commentService->delete($commentId)]; |
| 99 | 99 | }); |
| 100 | 100 | } |
@@ -252,7 +252,7 @@ |
||
| 252 | 252 | throw new NotAuthorizedException; |
| 253 | 253 | } |
| 254 | 254 | } catch (DoesNotExistException $e) { |
| 255 | - throw new NotFoundException('Poll ' . $fromPollId .' does not exist'); |
|
| 255 | + throw new NotFoundException('Poll ' . $fromPollId . ' does not exist'); |
|
| 256 | 256 | } |
| 257 | 257 | |
| 258 | 258 | foreach ($this->optionMapper->findByPoll($fromPollId) as $origin) { |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | * @return DataResponse |
| 63 | 63 | */ |
| 64 | 64 | public function get() { |
| 65 | - return $this->response(function () { |
|
| 65 | + return $this->response(function() { |
|
| 66 | 66 | return $this->preferencesService->get(); |
| 67 | 67 | }); |
| 68 | 68 | // return new DataResponse($this->preferencesService->get(), Http::STATUS_OK); |
@@ -79,7 +79,7 @@ discard block |
||
| 79 | 79 | if (!\OC::$server->getUserSession()->isLoggedIn()) { |
| 80 | 80 | return new DataResponse([], Http::STATUS_OK); |
| 81 | 81 | } |
| 82 | - return $this->response(function () use ($settings) { |
|
| 82 | + return $this->response(function() use ($settings) { |
|
| 83 | 83 | return $this->preferencesService->write($settings); |
| 84 | 84 | }); |
| 85 | 85 | |