Completed
Pull Request — master (#135)
by Blizzz
01:59
created
lib/Migration/ImportOwncloudCustomGroups.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
 				continue;
149 149
 			}
150 150
 
151
-			$level = (int) $row['role'] === 1 ? Member::LEVEL_OWNER : Member::LEVEL_MEMBER;
151
+			$level = (int)$row['role'] === 1 ? Member::LEVEL_OWNER : Member::LEVEL_MEMBER;
152 152
 
153 153
 			if ($level === Member::LEVEL_OWNER) {
154 154
 				if (isset($this->circleHasAdmin[$this->circlesById[$row['group_id']]])) {
Please login to merge, or discard this patch.
lib/Migration/GenerateUniqueIdOnCreatedCircle.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -93,7 +93,7 @@
 block discarded – undo
93 93
 
94 94
 			$update = $this->connection->getQueryBuilder();
95 95
 			$update->update('circles_circles')
96
-				   ->set('unique_id', $update->createNamedParameter('d' . $uniqueId))
96
+				   ->set('unique_id', $update->createNamedParameter('d'.$uniqueId))
97 97
 				   ->where(
98 98
 					   $update->expr()
99 99
 							  ->eq('id', $update->createNamedParameter($itemId))
Please login to merge, or discard this patch.
lib/Service/EventsService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -282,7 +282,7 @@
 block discarded – undo
282 282
 	 * generateEvent()
283 283
 	 * Create an Activity Event with the basic settings for the app.
284 284
 	 *
285
-	 * @param $type
285
+	 * @param string $type
286 286
 	 *
287 287
 	 * @return \OCP\Activity\IEvent
288 288
 	 */
Please login to merge, or discard this patch.
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 			}
117 117
 		);
118 118
 
119
-		$this->dispatch('\OCA\Circles::onCircleCreation',  ['circle' => $circle]);
119
+		$this->dispatch('\OCA\Circles::onCircleCreation', ['circle' => $circle]);
120 120
 	}
121 121
 
122 122
 
@@ -142,7 +142,7 @@  discard block
 block discarded – undo
142 142
 				$circle->getUniqueId(), Member::LEVEL_MEMBER, true
143 143
 			)
144 144
 		);
145
-		$this->dispatch('\OCA\Circles::onCircleDestruction',  ['circle' => $circle]);
145
+		$this->dispatch('\OCA\Circles::onCircleDestruction', ['circle' => $circle]);
146 146
 	}
147 147
 
148 148
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 					  )
187 187
 				  )
188 188
 		);
189
-		$this->dispatch('\OCA\Circles::onMemberNew',  ['circle' => $circle, 'member' => $member]);
189
+		$this->dispatch('\OCA\Circles::onMemberNew', ['circle' => $circle, 'member' => $member]);
190 190
 	}
191 191
 
192 192
 
@@ -242,7 +242,7 @@  discard block
 block discarded – undo
242 242
 					  )
243 243
 				  )
244 244
 		);
245
-		$this->dispatch('\OCA\Circles::onMemberInvited',  ['circle' => $circle, 'member' => $member]);
245
+		$this->dispatch('\OCA\Circles::onMemberInvited', ['circle' => $circle, 'member' => $member]);
246 246
 	}
247 247
 
248 248
 
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 					  )
275 275
 				  )
276 276
 		);
277
-		$this->dispatch('\OCA\Circles::onMemberRequesting',  ['circle' => $circle, 'member' => $member]);
277
+		$this->dispatch('\OCA\Circles::onMemberRequesting', ['circle' => $circle, 'member' => $member]);
278 278
 	}
279 279
 
280 280
 
@@ -307,7 +307,7 @@  discard block
 block discarded – undo
307 307
 					  )
308 308
 				  )
309 309
 		);
310
-		$this->dispatch('\OCA\Circles::onMemberLeaving',  ['circle' => $circle, 'member' => $member]);
310
+		$this->dispatch('\OCA\Circles::onMemberLeaving', ['circle' => $circle, 'member' => $member]);
311 311
 	}
312 312
 
313 313
 
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 		$this->membersRequest->avoidDuplicateMembers($mods, [$member]);
341 341
 
342 342
 		$this->publishEvent($event, $mods);
343
-		$this->dispatch('\OCA\Circles::onMemberLevel',  ['circle' => $circle, 'member' => $member]);
343
+		$this->dispatch('\OCA\Circles::onMemberLevel', ['circle' => $circle, 'member' => $member]);
344 344
 	}
345 345
 
346 346
 
@@ -365,7 +365,7 @@  discard block
 block discarded – undo
365 365
 				$circle->getUniqueId(), Member::LEVEL_MEMBER, true
366 366
 			)
367 367
 		);
368
-		$this->dispatch('\OCA\Circles::onMemberOwner',  ['circle' => $circle, 'member' => $member]);
368
+		$this->dispatch('\OCA\Circles::onMemberOwner', ['circle' => $circle, 'member' => $member]);
369 369
 	}
370 370
 
371 371
 
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 		);
399 399
 
400 400
 		$this->publishEvent($event, $mods);
401
-		$this->dispatch('\OCA\Circles::onGroupLink',  ['circle' => $circle, 'group' => $group]);
401
+		$this->dispatch('\OCA\Circles::onGroupLink', ['circle' => $circle, 'group' => $group]);
402 402
 	}
403 403
 
404 404
 
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 		);
432 432
 
433 433
 		$this->publishEvent($event, $mods);
434
-		$this->dispatch('\OCA\Circles::onGroupUnlink',  ['circle' => $circle, 'group' => $group]);
434
+		$this->dispatch('\OCA\Circles::onGroupUnlink', ['circle' => $circle, 'group' => $group]);
435 435
 	}
436 436
 
437 437
 
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
 		);
465 465
 
466 466
 		$this->publishEvent($event, $mods);
467
-		$this->dispatch('\OCA\Circles::onGroupLevel',  ['circle' => $circle, 'group' => $group]);
467
+		$this->dispatch('\OCA\Circles::onGroupLevel', ['circle' => $circle, 'group' => $group]);
468 468
 	}
469 469
 
470 470
 
@@ -489,7 +489,7 @@  discard block
 block discarded – undo
489 489
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
490 490
 		)
491 491
 		);
492
-		$this->dispatch('\OCA\Circles::onLinkRequestSent',  ['circle' => $circle, 'link' => $link]);
492
+		$this->dispatch('\OCA\Circles::onLinkRequestSent', ['circle' => $circle, 'link' => $link]);
493 493
 	}
494 494
 
495 495
 
@@ -514,7 +514,7 @@  discard block
 block discarded – undo
514 514
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
515 515
 		)
516 516
 		);
517
-		$this->dispatch('\OCA\Circles::onLinkRequestReceived',  ['circle' => $circle, 'link' => $link]);
517
+		$this->dispatch('\OCA\Circles::onLinkRequestReceived', ['circle' => $circle, 'link' => $link]);
518 518
 	}
519 519
 
520 520
 
@@ -539,7 +539,7 @@  discard block
 block discarded – undo
539 539
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
540 540
 		)
541 541
 		);
542
-		$this->dispatch('\OCA\Circles::onLinkRequestRejected',  ['circle' => $circle, 'link' => $link]);
542
+		$this->dispatch('\OCA\Circles::onLinkRequestRejected', ['circle' => $circle, 'link' => $link]);
543 543
 	}
544 544
 
545 545
 
@@ -564,7 +564,7 @@  discard block
 block discarded – undo
564 564
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
565 565
 		)
566 566
 		);
567
-		$this->dispatch('\OCA\Circles::onLinkRequestCanceled',  ['circle' => $circle, 'link' => $link]);
567
+		$this->dispatch('\OCA\Circles::onLinkRequestCanceled', ['circle' => $circle, 'link' => $link]);
568 568
 	}
569 569
 
570 570
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
590 590
 		)
591 591
 		);
592
-		$this->dispatch('\OCA\Circles::onLinkRequestAccepted',  ['circle' => $circle, 'link' => $link]);
592
+		$this->dispatch('\OCA\Circles::onLinkRequestAccepted', ['circle' => $circle, 'link' => $link]);
593 593
 	}
594 594
 
595 595
 
@@ -614,7 +614,7 @@  discard block
 block discarded – undo
614 614
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
615 615
 		)
616 616
 		);
617
-		$this->dispatch('\OCA\Circles::onLinkRequestAccepting',  ['circle' => $circle, 'link' => $link]);
617
+		$this->dispatch('\OCA\Circles::onLinkRequestAccepting', ['circle' => $circle, 'link' => $link]);
618 618
 	}
619 619
 
620 620
 
@@ -639,7 +639,7 @@  discard block
 block discarded – undo
639 639
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
640 640
 		)
641 641
 		);
642
-		$this->dispatch('\OCA\Circles::onLinkUp',  ['circle' => $circle, 'link' => $link]);
642
+		$this->dispatch('\OCA\Circles::onLinkUp', ['circle' => $circle, 'link' => $link]);
643 643
 	}
644 644
 
645 645
 
@@ -664,7 +664,7 @@  discard block
 block discarded – undo
664 664
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
665 665
 		)
666 666
 		);
667
-		$this->dispatch('\OCA\Circles::onLinkDown',  ['circle' => $circle, 'link' => $link]);
667
+		$this->dispatch('\OCA\Circles::onLinkDown', ['circle' => $circle, 'link' => $link]);
668 668
 	}
669 669
 
670 670
 
@@ -701,7 +701,7 @@  discard block
 block discarded – undo
701 701
 			$link->getCircleId(), Member::LEVEL_MODERATOR, true
702 702
 		)
703 703
 		);
704
-		$this->dispatch('\OCA\Circles::onLinkRemove',  ['circle' => $circle, 'link' => $link]);
704
+		$this->dispatch('\OCA\Circles::onLinkRemove', ['circle' => $circle, 'link' => $link]);
705 705
 	}
706 706
 
707 707
 	/**
@@ -712,7 +712,7 @@  discard block
 block discarded – undo
712 712
 	 * @param Circle $circle
713 713
 	 */
714 714
 	public function onSettingsChange(Circle $circle) {
715
-		$this->dispatch('\OCA\Circles::onSettingsChange',  ['circle' => $circle]);
715
+		$this->dispatch('\OCA\Circles::onSettingsChange', ['circle' => $circle]);
716 716
 	}
717 717
 
718 718
 
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
 	 * @param array $arguments
764 764
 	 */
765 765
 	private function dispatch($context, $arguments) {
766
-		$this->eventDispatcher->dispatch($context, new GenericEvent(null,$arguments));
766
+		$this->eventDispatcher->dispatch($context, new GenericEvent(null, $arguments));
767 767
 	}
768 768
 
769 769
 }
770 770
\ No newline at end of file
Please login to merge, or discard this patch.
lib/Db/CirclesRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -185,7 +185,7 @@
 block discarded – undo
185 185
 	 *
186 186
 	 * @throws CircleAlreadyExistsException
187 187
 	 */
188
-	public function createCircle(Circle &$circle, $userId) {
188
+	public function createCircle(Circle & $circle, $userId) {
189 189
 
190 190
 		if (!$this->isCircleUnique($circle, $userId)) {
191 191
 			throw new CircleAlreadyExistsException(
Please login to merge, or discard this patch.
lib/Service/GroupsService.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -190,7 +190,7 @@
 block discarded – undo
190 190
 	 *
191 191
 	 * @throws \Exception
192 192
 	 */
193
-	private function editGroupLevel(Circle $circle, Member &$group, $level) {
193
+	private function editGroupLevel(Circle $circle, Member & $group, $level) {
194 194
 		try {
195 195
 			$isMod = $circle->getHigherViewer();
196 196
 			$isMod->hasToBeAdmin();
Please login to merge, or discard this patch.
Doc Comments   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	 * @param string $circleUniqueId
87 87
 	 * @param string $groupId
88 88
 	 *
89
-	 * @return array
89
+	 * @return Member[]
90 90
 	 * @throws \Exception
91 91
 	 */
92 92
 	public function linkGroup($circleUniqueId, $groupId) {
@@ -112,8 +112,8 @@  discard block
 block discarded – undo
112 112
 	/**
113 113
 	 * Check if a fresh member can be generated (by linkGroup)
114 114
 	 *
115
-	 * @param $circleId
116
-	 * @param $groupId
115
+	 * @param string $circleId
116
+	 * @param string $groupId
117 117
 	 *
118 118
 	 * @return null|Member
119 119
 	 * @throws MemberAlreadyExistsException
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 	 * @param string $groupId
149 149
 	 * @param int $level
150 150
 	 *
151
-	 * @return array
151
+	 * @return Member[]
152 152
 	 * @throws \Exception
153 153
 	 */
154 154
 	public function levelGroup($circleUniqueId, $groupId, $level) {
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 	/**
187 187
 	 * @param Circle $circle
188 188
 	 * @param Member $group
189
-	 * @param $level
189
+	 * @param integer $level
190 190
 	 *
191 191
 	 * @throws \Exception
192 192
 	 */
@@ -213,7 +213,7 @@  discard block
 block discarded – undo
213 213
 	 * @param string $circleUniqueId
214 214
 	 * @param string $groupId
215 215
 	 *
216
-	 * @return array
216
+	 * @return Member[]
217 217
 	 * @throws \Exception
218 218
 	 */
219 219
 	public function unlinkGroup($circleUniqueId, $groupId) {
Please login to merge, or discard this patch.
lib/ShareByCircleProvider.php 2 patches
Doc Comments   +7 added lines patch added patch discarded remove patch
@@ -432,6 +432,13 @@
 block discarded – undo
432 432
 	}
433 433
 
434 434
 
435
+	/**
436
+	 * @param string $userId
437
+	 * @param integer $shareType
438
+	 * @param Node|null $node
439
+	 * @param integer $limit
440
+	 * @param integer $offset
441
+	 */
435 442
 	private function getSharedWithCircleMembers($userId, $shareType, $node, $limit, $offset) {
436 443
 
437 444
 		$qb = $this->getCompleteSelectSql();
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -569,7 +569,7 @@  discard block
 block discarded – undo
569 569
 	 * @param IShare $share
570 570
 	 * @param $data
571 571
 	 */
572
-	private function assignShareObjectPropertiesFromParent(IShare &$share, $data) {
572
+	private function assignShareObjectPropertiesFromParent(IShare & $share, $data) {
573 573
 		if (isset($data['f_permissions'])) {
574 574
 			$entryData = $data;
575 575
 			$entryData['permissions'] = $entryData['f_permissions'];
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 	 * @param IShare $share
589 589
 	 * @param $data
590 590
 	 */
591
-	private function assignShareObjectSharesProperties(IShare &$share, $data) {
591
+	private function assignShareObjectSharesProperties(IShare & $share, $data) {
592 592
 		$shareTime = new \DateTime();
593 593
 		$shareTime->setTimestamp((int)$data['stime']);
594 594
 
Please login to merge, or discard this patch.
lib/Db/CircleProviderRequestBuilder.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -107,7 +107,7 @@
 block discarded – undo
107 107
 	 * limit the request to the children of a share
108 108
 	 *
109 109
 	 * @param IQueryBuilder $qb
110
-	 * @param $userId
110
+	 * @param string $userId
111 111
 	 * @param int $parentId
112 112
 	 */
113 113
 	protected function limitToShareChildren(IQueryBuilder &$qb, $userId, $parentId = -1) {
Please login to merge, or discard this patch.
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -252,7 +252,7 @@
 block discarded – undo
252 252
 			'c', CoreRequestBuilder::TABLE_MEMBERS, 'mo', $expr->andX(
253 253
 			$expr->eq(
254 254
 				'mo.circle_id',
255
-        $qb->createFunction('SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')')
255
+		$qb->createFunction('SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')')
256 256
 			), $expr->eq('mo.user_type', $qb->createNamedParameter(Member::TYPE_USER)),
257 257
 			$expr->eq('mo.level', $qb->createNamedParameter(Member::LEVEL_OWNER))
258 258
 		)
Please login to merge, or discard this patch.
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -68,11 +68,11 @@  discard block
 block discarded – undo
68 68
 	 * @param IQueryBuilder $qb
69 69
 	 * @param int $circleId
70 70
 	 */
71
-	protected function limitToCircle(IQueryBuilder &$qb, $circleId) {
71
+	protected function limitToCircle(IQueryBuilder & $qb, $circleId) {
72 72
 		$expr = $qb->expr();
73 73
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
74 74
 
75
-		$qb->andWhere($expr->eq($pf . 'share_with', $qb->createNamedParameter($circleId)));
75
+		$qb->andWhere($expr->eq($pf.'share_with', $qb->createNamedParameter($circleId)));
76 76
 	}
77 77
 
78 78
 
@@ -82,11 +82,11 @@  discard block
 block discarded – undo
82 82
 	 * @param IQueryBuilder $qb
83 83
 	 * @param $shareId
84 84
 	 */
85
-	protected function limitToShare(IQueryBuilder &$qb, $shareId) {
85
+	protected function limitToShare(IQueryBuilder & $qb, $shareId) {
86 86
 		$expr = $qb->expr();
87 87
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
88 88
 
89
-		$qb->andWhere($expr->eq($pf . 'id', $qb->createNamedParameter($shareId)));
89
+		$qb->andWhere($expr->eq($pf.'id', $qb->createNamedParameter($shareId)));
90 90
 	}
91 91
 
92 92
 
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 	 *
96 96
 	 * @param IQueryBuilder $qb
97 97
 	 */
98
-	protected function limitToShareParent(IQueryBuilder &$qb) {
98
+	protected function limitToShareParent(IQueryBuilder & $qb) {
99 99
 		$expr = $qb->expr();
100 100
 
101 101
 		$qb->andWhere($expr->isNull('parent'));
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 * @param $userId
110 110
 	 * @param int $parentId
111 111
 	 */
112
-	protected function limitToShareChildren(IQueryBuilder &$qb, $userId, $parentId = -1) {
112
+	protected function limitToShareChildren(IQueryBuilder & $qb, $userId, $parentId = -1) {
113 113
 		$expr = $qb->expr();
114 114
 		$qb->andWhere($expr->eq('share_with', $qb->createNamedParameter($userId)));
115 115
 
@@ -128,15 +128,15 @@  discard block
 block discarded – undo
128 128
 	 * @param IQueryBuilder $qb
129 129
 	 * @param $circleId
130 130
 	 */
131
-	protected function limitToShareAndChildren(IQueryBuilder &$qb, $circleId) {
131
+	protected function limitToShareAndChildren(IQueryBuilder & $qb, $circleId) {
132 132
 		$expr = $qb->expr();
133 133
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
134 134
 
135 135
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
136 136
 		$qb->andWhere(
137 137
 			$expr->orX(
138
-				$expr->eq($pf . 'parent', $qb->createNamedParameter($circleId)),
139
-				$expr->eq($pf . 'id', $qb->createNamedParameter($circleId))
138
+				$expr->eq($pf.'parent', $qb->createNamedParameter($circleId)),
139
+				$expr->eq($pf.'id', $qb->createNamedParameter($circleId))
140 140
 			)
141 141
 		);
142 142
 	}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 	 *
151 151
 	 * @internal param $fileId
152 152
 	 */
153
-	protected function limitToFiles(IQueryBuilder &$qb, $files) {
153
+	protected function limitToFiles(IQueryBuilder & $qb, $files) {
154 154
 
155 155
 		if (!is_array($files)) {
156 156
 			$files = array($files);
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
161 161
 		$qb->andWhere(
162 162
 			$expr->in(
163
-				$pf . 'file_source',
163
+				$pf.'file_source',
164 164
 				$qb->createNamedParameter($files, IQueryBuilder::PARAM_INT_ARRAY)
165 165
 			)
166 166
 		);
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
 	 * @param int $limit
173 173
 	 * @param int $offset
174 174
 	 */
175
-	protected function limitToPage(IQueryBuilder &$qb, $limit = -1, $offset = 0) {
175
+	protected function limitToPage(IQueryBuilder & $qb, $limit = -1, $offset = 0) {
176 176
 		if ($limit !== -1) {
177 177
 			$qb->setMaxResults($limit);
178 178
 		}
@@ -188,18 +188,18 @@  discard block
 block discarded – undo
188 188
 	 * @param string $userId
189 189
 	 * @param bool $reShares
190 190
 	 */
191
-	protected function limitToShareOwner(IQueryBuilder &$qb, $userId, $reShares = false) {
191
+	protected function limitToShareOwner(IQueryBuilder & $qb, $userId, $reShares = false) {
192 192
 		$expr = $qb->expr();
193 193
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
194 194
 
195 195
 		if ($reShares === false) {
196
-			$qb->andWhere($expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId)));
196
+			$qb->andWhere($expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId)));
197 197
 		} else {
198 198
 			/** @noinspection PhpMethodParametersCountMismatchInspection */
199 199
 			$qb->andWhere(
200 200
 				$expr->orX(
201
-					$expr->eq($pf . 'uid_owner', $qb->createNamedParameter($userId)),
202
-					$expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId))
201
+					$expr->eq($pf.'uid_owner', $qb->createNamedParameter($userId)),
202
+					$expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId))
203 203
 				)
204 204
 			);
205 205
 		}
@@ -214,14 +214,14 @@  discard block
 block discarded – undo
214 214
 	 * @param IQueryBuilder $qb
215 215
 	 * @param int $shareId
216 216
 	 */
217
-	protected function linkCircleField(IQueryBuilder &$qb, $shareId = -1) {
217
+	protected function linkCircleField(IQueryBuilder & $qb, $shareId = -1) {
218 218
 		$expr = $qb->expr();
219 219
 
220 220
 		$qb->from(CoreRequestBuilder::TABLE_CIRCLES, 'c');
221 221
 
222 222
 		$tmpOrX = $expr->eq(
223 223
 			's.share_with',
224
-			$qb->createFunction('SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')')
224
+			$qb->createFunction('SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')')
225 225
 		);
226 226
 
227 227
 		if ($shareId === -1) {
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 	/**
244 244
 	 * @param IQueryBuilder $qb
245 245
 	 */
246
-	protected function linkToCircleOwner(IQueryBuilder &$qb) {
246
+	protected function linkToCircleOwner(IQueryBuilder & $qb) {
247 247
 		$expr = $qb->expr();
248 248
 
249 249
 		$qb->selectAlias('mo.user_id', 'circle_owner');
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 			'c', CoreRequestBuilder::TABLE_MEMBERS, 'mo', $expr->andX(
253 253
 			$expr->eq(
254 254
 				'mo.circle_id',
255
-        $qb->createFunction('SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')')
255
+        $qb->createFunction('SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')')
256 256
 			), $expr->eq('mo.user_type', $qb->createNamedParameter(Member::TYPE_USER)),
257 257
 			$expr->eq('mo.level', $qb->createNamedParameter(Member::LEVEL_OWNER))
258 258
 		)
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 	 * @param string $userId
268 268
 	 * @param bool $groupMemberAllowed
269 269
 	 */
270
-	protected function linkToMember(IQueryBuilder &$qb, $userId, $groupMemberAllowed) {
270
+	protected function linkToMember(IQueryBuilder & $qb, $userId, $groupMemberAllowed) {
271 271
 		$expr = $qb->expr();
272 272
 
273 273
 		$qb->from(CoreRequestBuilder::TABLE_MEMBERS, 'm');
@@ -291,7 +291,7 @@  discard block
 block discarded – undo
291 291
 	 *
292 292
 	 * @return \OCP\DB\QueryBuilder\ICompositeExpression
293 293
 	 */
294
-	private function exprLinkToMemberAsCircleMember(IQueryBuilder &$qb, $userId) {
294
+	private function exprLinkToMemberAsCircleMember(IQueryBuilder & $qb, $userId) {
295 295
 
296 296
 		$expr = $qb->expr();
297 297
 		$andX = $expr->andX();
@@ -302,7 +302,7 @@  discard block
 block discarded – undo
302 302
 			$expr->eq(
303 303
 				'm.circle_id',
304 304
 				$qb->createFunction(
305
-					'SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')'
305
+					'SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')'
306 306
 				)
307 307
 			)
308 308
 		);
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 *
321 321
 	 * @return \OCP\DB\QueryBuilder\ICompositeExpression
322 322
 	 */
323
-	private function exprLinkToMemberAsGroupMember(IQueryBuilder &$qb, $userId) {
323
+	private function exprLinkToMemberAsGroupMember(IQueryBuilder & $qb, $userId) {
324 324
 		$expr = $qb->expr();
325 325
 
326 326
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 			$expr->andX(
330 330
 				$expr->eq(
331 331
 					'g.circle_id',
332
-					$qb->createFunction('SUBSTR(`c`.`unique_id`, 1, ' . Circle::SHORT_UNIQUE_ID_LENGTH . ')')
332
+					$qb->createFunction('SUBSTR(`c`.`unique_id`, 1, '.Circle::SHORT_UNIQUE_ID_LENGTH.')')
333 333
 				),
334 334
 				$expr->gte('g.level', $qb->createNamedParameter(Member::LEVEL_MEMBER))
335 335
 			)
@@ -349,7 +349,7 @@  discard block
 block discarded – undo
349 349
 	 *
350 350
 	 * @param IQueryBuilder $qb
351 351
 	 */
352
-	protected function leftJoinShareInitiator(IQueryBuilder &$qb) {
352
+	protected function leftJoinShareInitiator(IQueryBuilder & $qb) {
353 353
 		$expr = $qb->expr();
354 354
 
355 355
 		$qb->selectAlias('src_m.level', 'initiator_circle_level');
@@ -385,7 +385,7 @@  discard block
 block discarded – undo
385 385
 	 *
386 386
 	 * @param IQueryBuilder $qb
387 387
 	 */
388
-	protected function joinCircleMembers(IQueryBuilder &$qb) {
388
+	protected function joinCircleMembers(IQueryBuilder & $qb) {
389 389
 		$expr = $qb->expr();
390 390
 
391 391
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
@@ -406,7 +406,7 @@  discard block
 block discarded – undo
406 406
 	 * @param IQueryBuilder $qb
407 407
 	 * @param string $userId
408 408
 	 */
409
-	protected function linkToFileCache(IQueryBuilder &$qb, $userId) {
409
+	protected function linkToFileCache(IQueryBuilder & $qb, $userId) {
410 410
 		$expr = $qb->expr();
411 411
 
412 412
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
@@ -522,7 +522,7 @@  discard block
 block discarded – undo
522 522
 	/**
523 523
 	 * @param IQueryBuilder $qb
524 524
 	 */
525
-	private function joinShare(IQueryBuilder &$qb) {
525
+	private function joinShare(IQueryBuilder & $qb) {
526 526
 		$expr = $qb->expr();
527 527
 
528 528
 		/** @noinspection PhpMethodParametersCountMismatchInspection */
Please login to merge, or discard this patch.
lib/Db/MembersRequest.php 1 patch
Doc Comments   +4 added lines, -1 removed lines patch added patch discarded remove patch
@@ -192,7 +192,7 @@  discard block
 block discarded – undo
192 192
 	 * returns the index of a specific UserID in a Members List
193 193
 	 *
194 194
 	 * @param array $members
195
-	 * @param $userId
195
+	 * @param string $userId
196 196
 	 *
197 197
 	 * @return int
198 198
 	 */
@@ -415,6 +415,9 @@  discard block
 block discarded – undo
415 415
 	}
416 416
 
417 417
 
418
+	/**
419
+	 * @param string $groupId
420
+	 */
418 421
 	public function unlinkAllFromGroup($groupId) {
419 422
 		$qb = $this->getGroupsDeleteSql($groupId);
420 423
 		$qb->execute();
Please login to merge, or discard this patch.
lib/Service/CirclesService.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -195,7 +195,7 @@  discard block
 block discarded – undo
195 195
 	 *
196 196
 	 * @param Circle $circle
197 197
 	 */
198
-	private function detailsCircleMembers(Circle &$circle) {
198
+	private function detailsCircleMembers(Circle & $circle) {
199 199
 		$members =
200 200
 			$this->membersRequest->getMembers($circle->getUniqueId(), $circle->getHigherViewer());
201 201
 
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 	 *
209 209
 	 * @param Circle $circle
210 210
 	 */
211
-	private function detailsCircleLinkedGroups(Circle &$circle) {
211
+	private function detailsCircleLinkedGroups(Circle & $circle) {
212 212
 		$groups = [];
213 213
 		if ($this->configService->isLinkedGroupsAllowed()) {
214 214
 			$groups =
@@ -226,7 +226,7 @@  discard block
 block discarded – undo
226 226
 	 *
227 227
 	 * @param Circle $circle
228 228
 	 */
229
-	private function detailsCircleFederatedCircles(Circle &$circle) {
229
+	private function detailsCircleFederatedCircles(Circle & $circle) {
230 230
 		$links = [];
231 231
 
232 232
 		try {
@@ -407,23 +407,23 @@  discard block
 block discarded – undo
407 407
 		switch ($type) {
408 408
 			case Circle::CIRCLES_PERSONAL:
409 409
 				return $urlGen->getAbsoluteURL(
410
-					$urlGen->imagePath(Application::APP_NAME, 'personal' . $ext)
410
+					$urlGen->imagePath(Application::APP_NAME, 'personal'.$ext)
411 411
 				);
412 412
 			case Circle::CIRCLES_CLOSED:
413 413
 				return $urlGen->getAbsoluteURL(
414
-					$urlGen->imagePath(Application::APP_NAME, 'closed' . $ext)
414
+					$urlGen->imagePath(Application::APP_NAME, 'closed'.$ext)
415 415
 				);
416 416
 			case Circle::CIRCLES_SECRET:
417 417
 				return $urlGen->getAbsoluteURL(
418
-					$urlGen->imagePath(Application::APP_NAME, 'secret' . $ext)
418
+					$urlGen->imagePath(Application::APP_NAME, 'secret'.$ext)
419 419
 				);
420 420
 			case Circle::CIRCLES_PUBLIC:
421 421
 				return $urlGen->getAbsoluteURL(
422
-					$urlGen->imagePath(Application::APP_NAME, 'public' . $ext)
422
+					$urlGen->imagePath(Application::APP_NAME, 'public'.$ext)
423 423
 				);
424 424
 		}
425 425
 
426
-		return $urlGen->getAbsoluteURL($urlGen->imagePath(Application::APP_NAME, 'black_circle' . $ext));
426
+		return $urlGen->getAbsoluteURL($urlGen->imagePath(Application::APP_NAME, 'black_circle'.$ext));
427 427
 	}
428 428
 
429 429
 }
430 430
\ No newline at end of file
Please login to merge, or discard this patch.
Doc Comments   +1 added lines patch added patch discarded remove patch
@@ -403,6 +403,7 @@
 block discarded – undo
403 403
 	 * switchOlderAdminToOwner();
404 404
 	 *
405 405
 	 * @param Member[] $members
406
+	 * @param Circle $circle
406 407
 	 */
407 408
 	private function switchOlderAdminToOwner($circle, $members) {
408 409
 
Please login to merge, or discard this patch.