Completed
Pull Request — master (#384)
by Tortue
02:35
created
lib/Db/MembersRequest.php 1 patch
Doc Comments   +8 added lines, -3 removed lines patch added patch discarded remove patch
@@ -300,7 +300,7 @@  discard block
 block discarded – undo
300 300
 	 * returns the index of a specific UserID in a Members List
301 301
 	 *
302 302
 	 * @param array $members
303
-	 * @param $userId
303
+	 * @param string $userId
304 304
 	 *
305 305
 	 * @return int
306 306
 	 */
@@ -631,12 +631,19 @@  discard block
 block discarded – undo
631 631
 	}
632 632
 
633 633
 
634
+	/**
635
+	 * @param string $groupId
636
+	 */
634 637
 	public function unlinkAllFromGroup($groupId) {
635 638
 		$qb = $this->getGroupsDeleteSql($groupId);
636 639
 		$qb->execute();
637 640
 	}
638 641
 
639 642
 
643
+	/**
644
+	 * @param string $circleId
645
+	 * @param string $groupId
646
+	 */
640 647
 	public function unlinkFromGroup($circleId, $groupId) {
641 648
 		$qb = $this->getGroupsDeleteSql($groupId);
642 649
 		$this->limitToCircleId($qb, $circleId);
@@ -674,8 +681,6 @@  discard block
 block discarded – undo
674 681
 	/**
675 682
 	 * @param string $circleId
676 683
 	 * @param string $contactId
677
-	 * @param string $userId
678
-	 * @param int $type
679 684
 	 *
680 685
 	 * @return Member
681 686
 	 * @throws MemberDoesNotExistException
Please login to merge, or discard this patch.
lib/AppInfo/Application.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 use OCP\EventDispatcher\IEventDispatcher;
43 43
 use OCP\Util;
44 44
 
45
-require_once __DIR__ . '/../../appinfo/autoload.php';
45
+require_once __DIR__.'/../../appinfo/autoload.php';
46 46
 
47 47
 
48 48
 class Application extends App {
@@ -245,9 +245,9 @@  discard block
 block discarded – undo
245 245
 		$this->dispatcher->addListener('\OCA\Circles::onLinkRemove', [$groupsBackendService, 'onLinkRemove']);
246 246
 		$this->dispatcher->addListener('\OCA\Circles::onSettingsChange', [$groupsBackendService, 'onSettingsChange']);
247 247
 
248
-		$this->dispatcher->addListener(IGroup::class . '::postAddUser', [$groupsBackendService, 'onGroupPostAddUser']);
249
-		$this->dispatcher->addListener(IGroup::class . '::postRemoveUser', [$groupsBackendService, 'onGroupPostRemoveUser']);
250
-		$this->dispatcher->addListener(IGroup::class . '::postDelete', [$groupsBackendService, 'onGroupPostDelete']);
248
+		$this->dispatcher->addListener(IGroup::class.'::postAddUser', [$groupsBackendService, 'onGroupPostAddUser']);
249
+		$this->dispatcher->addListener(IGroup::class.'::postRemoveUser', [$groupsBackendService, 'onGroupPostRemoveUser']);
250
+		$this->dispatcher->addListener(IGroup::class.'::postDelete', [$groupsBackendService, 'onGroupPostDelete']);
251 251
 	}
252 252
 
253 253
 }
Please login to merge, or discard this patch.
lib/Model/BaseCircle.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 	 * @return BaseCircle
316 316
 	 */
317 317
 	public function setGroupId($groupId) {
318
-		$this->groupId = (string) $groupId;
318
+		$this->groupId = (string)$groupId;
319 319
 
320 320
 		return $this;
321 321
 	}
@@ -324,7 +324,7 @@  discard block
 block discarded – undo
324 324
 	 * @return string
325 325
 	 */
326 326
 	public function getGroupId() {
327
-		return (string) $this->groupId;
327
+		return (string)$this->groupId;
328 328
 	}
329 329
 
330 330
 	/**
Please login to merge, or discard this patch.
lib/Activity/ProviderParser.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -152,7 +152,7 @@  discard block
 block discarded – undo
152 152
 				continue;
153 153
 			}
154 154
 
155
-			$replace['{' . $k . '}'] = $data[$k]['_parsed'];
155
+			$replace['{'.$k.'}'] = $data[$k]['_parsed'];
156 156
 		}
157 157
 
158 158
 		$line = strtr($line, $replace);
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 		return [
317 317
 			'type'    => $member->getTypeName(),
318 318
 			'id'      => $member->getUserId(),
319
-			'name'    => $member->getDisplayName() . ' (' . $member->getTypeString() . ')',
319
+			'name'    => $member->getDisplayName().' ('.$member->getTypeString().')',
320 320
 			'_parsed' => $member->getDisplayName()
321 321
 		];
322 322
 	}
@@ -352,8 +352,8 @@  discard block
 block discarded – undo
352 352
 		return [
353 353
 			'type'    => 'circle',
354 354
 			'id'      => $link->getUniqueId(),
355
-			'name'    => $link->getToken() . '@' . $link->getAddress(),
356
-			'_parsed' => $link->getToken() . '@' . $link->getAddress()
355
+			'name'    => $link->getToken().'@'.$link->getAddress(),
356
+			'_parsed' => $link->getToken().'@'.$link->getAddress()
357 357
 		];
358 358
 	}
359 359
 
Please login to merge, or discard this patch.
lib/Service/GroupsBackendService.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
 			}
158 158
 		}
159 159
 
160
-		$this->miscService->log('onCircleCreation: '. json_encode($this->circle), 1);
160
+		$this->miscService->log('onCircleCreation: '.json_encode($this->circle), 1);
161 161
 	}
162 162
 
163 163
 	/**
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 			$this->group->delete();
173 173
 		}
174 174
 
175
-		$this->miscService->log('onCircleDestruction: '. json_encode($this->circle), 1);
175
+		$this->miscService->log('onCircleDestruction: '.json_encode($this->circle), 1);
176 176
 	}
177 177
 
178 178
 	/**
@@ -192,21 +192,21 @@  discard block
 block discarded – undo
192 192
 			}
193 193
 		}
194 194
 
195
-		$this->miscService->log('onMemberNew: '. json_encode($this->circle).json_encode($this->member), 1);
195
+		$this->miscService->log('onMemberNew: '.json_encode($this->circle).json_encode($this->member), 1);
196 196
 	}
197 197
 
198 198
 	/**
199 199
 	 * @param GenericEvent $event
200 200
 	 */
201 201
 	public function onMemberInvited(GenericEvent $event) {
202
-		$this->miscService->log('onMemberInvited: '. json_encode($event), 1);
202
+		$this->miscService->log('onMemberInvited: '.json_encode($event), 1);
203 203
 	}
204 204
 
205 205
 	/**
206 206
 	 * @param GenericEvent $event
207 207
 	 */
208 208
 	public function onMemberRequesting(GenericEvent $event) {
209
-		$this->miscService->log('onMemberRequesting: '. json_encode($event), 1);
209
+		$this->miscService->log('onMemberRequesting: '.json_encode($event), 1);
210 210
 	}
211 211
 
212 212
 	/**
@@ -226,105 +226,105 @@  discard block
 block discarded – undo
226 226
 			}
227 227
 		}
228 228
 
229
-		$this->miscService->log('onMemberLeaving: '. json_encode($this->circle).json_encode($this->member), 1);
229
+		$this->miscService->log('onMemberLeaving: '.json_encode($this->circle).json_encode($this->member), 1);
230 230
 	}
231 231
 
232 232
 	/**
233 233
 	 * @param GenericEvent $event
234 234
 	 */
235 235
 	public function onMemberLevel(GenericEvent $event) {
236
-		$this->miscService->log('onMemberLevel: '. json_encode($event), 1);
236
+		$this->miscService->log('onMemberLevel: '.json_encode($event), 1);
237 237
 	}
238 238
 
239 239
 	/**
240 240
 	 * @param GenericEvent $event
241 241
 	 */
242 242
 	public function onMemberOwner(GenericEvent $event) {
243
-		$this->miscService->log('onMemberOwner: '. json_encode($event), 1);
243
+		$this->miscService->log('onMemberOwner: '.json_encode($event), 1);
244 244
 	}
245 245
 
246 246
 	/**
247 247
 	 * @param GenericEvent $event
248 248
 	 */
249 249
 	public function onGroupLink(GenericEvent $event) {
250
-		$this->miscService->log('onGroupLink: '. json_encode($event), 1);
250
+		$this->miscService->log('onGroupLink: '.json_encode($event), 1);
251 251
 	}
252 252
 
253 253
 	/**
254 254
 	 * @param GenericEvent $event
255 255
 	 */
256 256
 	public function onGroupUnlink(GenericEvent $event) {
257
-		$this->miscService->log('onGroupUnlink: '. json_encode($event), 1);
257
+		$this->miscService->log('onGroupUnlink: '.json_encode($event), 1);
258 258
 	}
259 259
 
260 260
 	/**
261 261
 	 * @param GenericEvent $event
262 262
 	 */
263 263
 	public function onGroupLevel(GenericEvent $event) {
264
-		$this->miscService->log('onGroupLevel: '. json_encode($event), 1);
264
+		$this->miscService->log('onGroupLevel: '.json_encode($event), 1);
265 265
 	}
266 266
 
267 267
 	/**
268 268
 	 * @param GenericEvent $event
269 269
 	 */
270 270
 	public function onLinkRequestSent(GenericEvent $event) {
271
-		$this->miscService->log('onLinkRequestSent: '. json_encode($event), 1);
271
+		$this->miscService->log('onLinkRequestSent: '.json_encode($event), 1);
272 272
 	}
273 273
 
274 274
 	/**
275 275
 	 * @param GenericEvent $event
276 276
 	 */
277 277
 	public function onLinkRequestReceived(GenericEvent $event) {
278
-		$this->miscService->log('onLinkRequestReceived: '. json_encode($event), 1);
278
+		$this->miscService->log('onLinkRequestReceived: '.json_encode($event), 1);
279 279
 	}
280 280
 
281 281
 	/**
282 282
 	 * @param GenericEvent $event
283 283
 	 */
284 284
 	public function onLinkRequestRejected(GenericEvent $event) {
285
-		$this->miscService->log('onLinkRequestRejected: '. json_encode($event), 1);
285
+		$this->miscService->log('onLinkRequestRejected: '.json_encode($event), 1);
286 286
 	}
287 287
 
288 288
 	/**
289 289
 	 * @param GenericEvent $event
290 290
 	 */
291 291
 	public function onLinkRequestCanceled(GenericEvent $event) {
292
-		$this->miscService->log('onLinkRequestCanceled: '. json_encode($event), 1);
292
+		$this->miscService->log('onLinkRequestCanceled: '.json_encode($event), 1);
293 293
 	}
294 294
 
295 295
 	/**
296 296
 	 * @param GenericEvent $event
297 297
 	 */
298 298
 	public function onLinkRequestAccepted(GenericEvent $event) {
299
-		$this->miscService->log('onLinkRequestAccepted: '. json_encode($event), 1);
299
+		$this->miscService->log('onLinkRequestAccepted: '.json_encode($event), 1);
300 300
 	}
301 301
 
302 302
 	/**
303 303
 	 * @param GenericEvent $event
304 304
 	 */
305 305
 	public function onLinkRequestAccepting(GenericEvent $event) {
306
-		$this->miscService->log('onLinkRequestAccepting: '. json_encode($event), 1);
306
+		$this->miscService->log('onLinkRequestAccepting: '.json_encode($event), 1);
307 307
 	}
308 308
 
309 309
 	/**
310 310
 	 * @param GenericEvent $event
311 311
 	 */
312 312
 	public function onLinkUp(GenericEvent $event) {
313
-		$this->miscService->log('onLinkUp: '. json_encode($event), 1);
313
+		$this->miscService->log('onLinkUp: '.json_encode($event), 1);
314 314
 	}
315 315
 
316 316
 	/**
317 317
 	 * @param GenericEvent $event
318 318
 	 */
319 319
 	public function onLinkDown(GenericEvent $event) {
320
-		$this->miscService->log('onLinkDown: '. json_encode($event), 1);
320
+		$this->miscService->log('onLinkDown: '.json_encode($event), 1);
321 321
 	}
322 322
 
323 323
 	/**
324 324
 	 * @param GenericEvent $event
325 325
 	 */
326 326
 	public function onLinkRemove(GenericEvent $event) {
327
-		$this->miscService->log('onLinkRemove: '. json_encode($event), 1);
327
+		$this->miscService->log('onLinkRemove: '.json_encode($event), 1);
328 328
 	}
329 329
 
330 330
 	/**
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
 		$this->setCircleGroupName($this->getCircleGroupName());
342 342
 
343
-		$this->miscService->log('onSettingsChange: '. json_encode($this->circle).json_encode($oldSettings), 1);
343
+		$this->miscService->log('onSettingsChange: '.json_encode($this->circle).json_encode($oldSettings), 1);
344 344
 	}
345 345
 
346 346
 	/**
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
 	protected function setCircleGroupName($displayName)
434 434
 	{
435 435
 		if ($this->group && method_exists($this->group, 'setDisplayName')) {
436
-			$this->miscService->log('setCircleGroupName: '. json_encode($displayName), 1);
436
+			$this->miscService->log('setCircleGroupName: '.json_encode($displayName), 1);
437 437
 			return $this->group->setDisplayName($displayName);
438 438
 		}
439 439
 
Please login to merge, or discard this patch.
lib/Service/CirclesService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -532,24 +532,24 @@  discard block
 block discarded – undo
532 532
 		switch ($type) {
533 533
 			case Circle::CIRCLES_PERSONAL:
534 534
 				return $urlGen->getAbsoluteURL(
535
-					$urlGen->imagePath(Application::APP_NAME, 'personal' . $ext)
535
+					$urlGen->imagePath(Application::APP_NAME, 'personal'.$ext)
536 536
 				);
537 537
 			case Circle::CIRCLES_CLOSED:
538 538
 				return $urlGen->getAbsoluteURL(
539
-					$urlGen->imagePath(Application::APP_NAME, 'closed' . $ext)
539
+					$urlGen->imagePath(Application::APP_NAME, 'closed'.$ext)
540 540
 				);
541 541
 			case Circle::CIRCLES_SECRET:
542 542
 				return $urlGen->getAbsoluteURL(
543
-					$urlGen->imagePath(Application::APP_NAME, 'secret' . $ext)
543
+					$urlGen->imagePath(Application::APP_NAME, 'secret'.$ext)
544 544
 				);
545 545
 			case Circle::CIRCLES_PUBLIC:
546 546
 				return $urlGen->getAbsoluteURL(
547
-					$urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext)
547
+					$urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext)
548 548
 				);
549 549
 		}
550 550
 
551 551
 		return $urlGen->getAbsoluteURL(
552
-			$urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext)
552
+			$urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext)
553 553
 		);
554 554
 	}
555 555
 
@@ -585,7 +585,7 @@  discard block
 block discarded – undo
585 585
 			$circle->getUniqueId(), Member::LEVEL_MEMBER, true
586 586
 		);
587 587
 
588
-		$limit = (int) $circle->getSetting('members_limit');
588
+		$limit = (int)$circle->getSetting('members_limit');
589 589
 		if ($limit === -1) {
590 590
 			return;
591 591
 		}
Please login to merge, or discard this patch.
lib/Service/GroupsService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -137,7 +137,7 @@
 block discarded – undo
137 137
 				$count++;
138 138
 			}
139 139
 
140
-			$limit = (int) $circle->getSetting('members_limit');
140
+			$limit = (int)$circle->getSetting('members_limit');
141 141
 			if ($limit === 0) {
142 142
 				$limit = $this->configService->getAppValue(ConfigService::CIRCLES_MEMBERS_LIMIT);
143 143
 			}
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -277,7 +277,7 @@  discard block
 block discarded – undo
277 277
 		if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0)
278 278
 			&& strpos($remote, 'https://') !== 0
279 279
 		) {
280
-			$remote = 'https://' . $remote;
280
+			$remote = 'https://'.$remote;
281 281
 		}
282 282
 
283 283
 		return rtrim($remote, '/');
@@ -467,7 +467,7 @@  discard block
 block discarded – undo
467 467
 	 */
468 468
 	public function getGroupBackendNamePrefix() {
469 469
 		if ($this->groupBackendNamePrefix === null && $this->isGroupsBackend()) {
470
-			$this->groupBackendNamePrefix = ltrim((string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX));
470
+			$this->groupBackendNamePrefix = ltrim((string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_PREFIX));
471 471
 		}
472 472
 
473 473
 		return $this->groupBackendNamePrefix;
@@ -482,7 +482,7 @@  discard block
 block discarded – undo
482 482
 		if ($this->groupBackendNameSuffix === null && $this->isGroupsBackend()) {
483 483
 			$l = OC::$server->getL10N('circles');
484 484
 			$defaultSuffix = ' '.$l->t('Circle');
485
-			$customSuffix = (string) $this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX);
485
+			$customSuffix = (string)$this->getAppValue(self::CIRCLES_GROUP_BACKEND_NAME_SUFFIX);
486 486
 			$this->groupBackendNameSuffix = rtrim($customSuffix ?: $defaultSuffix);
487 487
 		}
488 488
 
Please login to merge, or discard this patch.
lib/Service/EventsService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -753,7 +753,7 @@
 block discarded – undo
753 753
 	 * @param array  $oldSettings
754 754
 	 */
755 755
 	public function onSettingsChange(Circle $circle, array $oldSettings = []) {
756
-		$this->dispatch('\OCA\Circles::onSettingsChange',  ['circle' => $circle, 'oldSettings' => $oldSettings]);
756
+		$this->dispatch('\OCA\Circles::onSettingsChange', ['circle' => $circle, 'oldSettings' => $oldSettings]);
757 757
 	}
758 758
 
759 759
 
Please login to merge, or discard this patch.