Completed
Pull Request — master (#672)
by Tortue
04:04
created
lib/Model/Acl.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@
 block discarded – undo
295 295
 	/**
296 296
 	 * @NoAdminRequired
297 297
 	 * @return string
298
-	*/
298
+	 */
299 299
 	public function getAccessLevel(): string {
300 300
 		if ($this->getIsOwner()) {
301 301
 			return 'owner';
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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()) {
Please login to merge, or discard this patch.
lib/Service/AnonymizeService.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -45,11 +45,11 @@  discard block
 block discarded – undo
45 45
 	}
46 46
 
47 47
 	/**
48
-	* Anonymizes the participants of a poll
49
-	* @NoAdminRequired
50
-	* @param Array $array Input list which should be anonymized must be a collection of Vote or Comment
51
-	* @return array Returns the original array with anonymized user names
52
-	*/
48
+	 * Anonymizes the participants of a poll
49
+	 * @NoAdminRequired
50
+	 * @param Array $array Input list which should be anonymized must be a collection of Vote or Comment
51
+	 * @return array Returns the original array with anonymized user names
52
+	 */
53 53
 	private function anonymize($array) {
54 54
 		// get mapping for the complete poll
55 55
 		foreach ($array as &$element) {
@@ -70,12 +70,12 @@  discard block
 block discarded – undo
70 70
 	}
71 71
 
72 72
 	/**
73
-	* Initialize anonymizer with pollId and userId
74
-	* Creates a mapping list with unique Anonymous strings based on the partcipants of a poll
75
-	* @NoAdminRequired
76
-	* @param integer $pollId
77
-	* @param string $userId - usernames, which will not be anonymized
78
-	*/
73
+	 * Initialize anonymizer with pollId and userId
74
+	 * Creates a mapping list with unique Anonymous strings based on the partcipants of a poll
75
+	 * @NoAdminRequired
76
+	 * @param integer $pollId
77
+	 * @param string $userId - usernames, which will not be anonymized
78
+	 */
79 79
 
80 80
 	public function set($pollId, $userId) {
81 81
 		$this->pollId = $pollId;
Please login to merge, or discard this patch.
lib/Controller/EventController.php 2 patches
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 					} else {
108 108
 						return false;
109 109
 					}
110
-    			});
110
+				});
111 111
 			} catch (DoesNotExistException $e) {
112 112
 				$events = [];
113 113
 				// return new DataResponse($e, Http::STATUS_NOT_FOUND);
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,8 +230,8 @@
 block discarded – undo
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']);
Please login to merge, or discard this patch.
lib/Controller/SystemController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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(),
Please login to merge, or discard this patch.
lib/Controller/AclController.php 1 patch
Indentation   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,11 +52,11 @@
 block discarded – undo
52 52
 	}
53 53
 
54 54
 	/**
55
-	* Read acl with poll id for current user
56
-	* @NoAdminRequired
57
-	* @param integer $pollId
58
-	* @return array
59
-	*/
55
+	 * Read acl with poll id for current user
56
+	 * @NoAdminRequired
57
+	 * @param integer $pollId
58
+	 * @return array
59
+	 */
60 60
 	public function get($id) {
61 61
 		$acl = $this->acl->setPollId($id);
62 62
 		// $acl = $this->acl->setUserId('dartcafe');
Please login to merge, or discard this patch.
lib/Controller/ShareController.php 2 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -46,8 +46,8 @@  discard block
 block discarded – undo
46 46
 
47 47
 class ShareController extends Controller {
48 48
 
49
-    private $logger;
50
-    private $acl;
49
+	private $logger;
50
+	private $acl;
51 51
 	private $mapper;
52 52
 	private $userId;
53 53
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 		Acl $acl
75 75
 	) {
76 76
 		parent::__construct($appName, $request);
77
-        $this->logger = $logger;
77
+		$this->logger = $logger;
78 78
 		$this->userId = $userId;
79 79
 		$this->mapper = $mapper;
80 80
 		$this->eventMapper = $eventMapper;
@@ -83,14 +83,14 @@  discard block
 block discarded – undo
83 83
 	}
84 84
 
85 85
 	/**
86
-	* getByToken
87
-	* Get pollId by token
88
-	* @NoAdminRequired
89
-	* @NoCSRFRequired
90
-	* @PublicPage
91
-	* @param string $token
92
-	* @return DataResponse
93
-	*/
86
+	 * getByToken
87
+	 * Get pollId by token
88
+	 * @NoAdminRequired
89
+	 * @NoCSRFRequired
90
+	 * @PublicPage
91
+	 * @param string $token
92
+	 * @return DataResponse
93
+	 */
94 94
 	public function get($token) {
95 95
 		try {
96 96
 			$share = $this->mapper->findByToken($token);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
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
 
Please login to merge, or discard this patch.
lib/Controller/VoteController.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -151,7 +151,7 @@
 block discarded – undo
151 151
 
152 152
 	/**
153 153
 	 * Public functions
154
-	*/
154
+	 */
155 155
 
156 156
 	/**
157 157
 	 * getByToken
Please login to merge, or discard this patch.