Passed
Branch master (64218b)
by René
03:44
created
lib/Model/Acl.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
 	 */
239 239
 	public function getGroupShare(): bool {
240 240
 		return count(
241
-			array_filter($this->shareMapper->findByPoll($this->getPollId()), function ($item) {
241
+			array_filter($this->shareMapper->findByPoll($this->getPollId()), function($item) {
242 242
 				if ($item->getType() === Share::TYPE_GROUP && $this->groupManager->isInGroup($this->getUserId(), $item->getUserId())) {
243 243
 					return true;
244 244
 				}
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 */
263 263
 	public function getPersonalShare(): bool {
264 264
 		return count(
265
-			array_filter($this->shareMapper->findByPoll($this->getPollId()), function ($item) {
265
+			array_filter($this->shareMapper->findByPoll($this->getPollId()), function($item) {
266 266
 				if (
267 267
 					($item->getType() === Share::TYPE_USER
268 268
 						|| $item->getType() === Share::TYPE_EXTERNAL
@@ -283,7 +283,7 @@  discard block
 block discarded – undo
283 283
 	 */
284 284
 	public function getPublicShare(): bool {
285 285
 		return count(
286
-			array_filter($this->shareMapper->findByPoll($this->getPollId()), function ($item) {
286
+			array_filter($this->shareMapper->findByPoll($this->getPollId()), function($item) {
287 287
 				if ($item->getType() === Share::TYPE_PUBLIC && $item->getToken() === $this->getToken()) {
288 288
 					return true;
289 289
 				}
Please login to merge, or discard this patch.
lib/Service/CalendarService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -88,7 +88,7 @@
 block discarded – undo
88 88
 	 * @return Array
89 89
 	 */
90 90
 	public function getCalendars() {
91
-		$calendars =  [];
91
+		$calendars = [];
92 92
 		foreach ($this->calendars as $calendar) {
93 93
 			$calendars[] = [
94 94
 				'name' => $calendar->getDisplayName(),
Please login to merge, or discard this patch.
lib/Controller/CommentController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
lib/Controller/ShareApiController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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 [
Please login to merge, or discard this patch.
lib/Controller/OptionController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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'));
Please login to merge, or discard this patch.
lib/Controller/ShareController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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) {
Please login to merge, or discard this patch.
lib/Controller/OptionApiController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
lib/Controller/CommentApiController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
 	}
Please login to merge, or discard this patch.
lib/Controller/PreferencesController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 
Please login to merge, or discard this patch.