Completed
Pull Request — master (#566)
by Julius
02:05
created
lib/Db/CirclesRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -203,7 +203,7 @@
 block discarded – undo
203 203
 		$cursor->closeCursor();
204 204
 
205 205
 		if ($data === false) {
206
-			throw new CircleDoesNotExistException($this->l10n->t('Circle not found ' . $circleUniqueId));
206
+			throw new CircleDoesNotExistException($this->l10n->t('Circle not found '.$circleUniqueId));
207 207
 		}
208 208
 
209 209
 		$circle = $this->parseCirclesSelectSql($data);
Please login to merge, or discard this patch.
lib/Db/CircleProviderRequestBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 	 * limit the request to the children of a share
115 115
 	 *
116 116
 	 * @param IQueryBuilder $qb
117
-	 * @param $userId
117
+	 * @param string $userId
118 118
 	 * @param int $parentId
119 119
 	 */
120 120
 	protected function limitToShareChildren(IQueryBuilder $qb, $userId, $parentId = -1) {
Please login to merge, or discard this patch.
Spacing   +18 added lines, -18 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
78 78
 		$qb->andWhere(
79 79
 			$expr->in(
80
-				$pf . 'share_with',
80
+				$pf.'share_with',
81 81
 				$qb->createNamedParameter($circleUniqueIds, IQueryBuilder::PARAM_STR_ARRAY)
82 82
 			)
83 83
 		);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		$expr = $qb->expr();
95 95
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
96 96
 
97
-		$qb->andWhere($expr->eq($pf . 'id', $qb->createNamedParameter($shareId)));
97
+		$qb->andWhere($expr->eq($pf.'id', $qb->createNamedParameter($shareId)));
98 98
 	}
99 99
 
100 100
 
@@ -142,8 +142,8 @@  discard block
 block discarded – undo
142 142
 
143 143
 		$qb->andWhere(
144 144
 			$expr->orX(
145
-				$expr->eq($pf . 'parent', $qb->createNamedParameter($circleId)),
146
-				$expr->eq($pf . 'id', $qb->createNamedParameter($circleId))
145
+				$expr->eq($pf.'parent', $qb->createNamedParameter($circleId)),
146
+				$expr->eq($pf.'id', $qb->createNamedParameter($circleId))
147 147
 			)
148 148
 		);
149 149
 	}
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
166 166
 		$qb->andWhere(
167 167
 			$expr->in(
168
-				$pf . 'file_source',
168
+				$pf.'file_source',
169 169
 				$qb->createNamedParameter($files, IQueryBuilder::PARAM_INT_ARRAY)
170 170
 			)
171 171
 		);
@@ -198,12 +198,12 @@  discard block
 block discarded – undo
198 198
 		$pf = ($qb->getType() === QueryBuilder::SELECT) ? 's.' : '';
199 199
 
200 200
 		if ($reShares === false) {
201
-			$qb->andWhere($expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId)));
201
+			$qb->andWhere($expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId)));
202 202
 		} else {
203 203
 			$qb->andWhere(
204 204
 				$expr->orX(
205
-					$expr->eq($pf . 'uid_owner', $qb->createNamedParameter($userId)),
206
-					$expr->eq($pf . 'uid_initiator', $qb->createNamedParameter($userId))
205
+					$expr->eq($pf.'uid_owner', $qb->createNamedParameter($userId)),
206
+					$expr->eq($pf.'uid_initiator', $qb->createNamedParameter($userId))
207 207
 				)
208 208
 			);
209 209
 		}
@@ -298,11 +298,11 @@  discard block
 block discarded – undo
298 298
 		$expr = $qb->expr();
299 299
 		$andX = $expr->andX();
300 300
 
301
-		$andX->add($expr->eq($aliasM . '.user_id', $qb->createNamedParameter($userId)));
302
-		$andX->add($expr->eq($aliasM . '.circle_id', $aliasC . '.unique_id'));
303
-		$andX->add($expr->gte($aliasM . '.level', $qb->createNamedParameter(Member::LEVEL_MEMBER)));
304
-		$andX->add($expr->eq($aliasM . '.instance', $qb->createNamedParameter('')));
305
-		$andX->add($expr->eq($aliasM . '.user_type', $qb->createNamedParameter(Member::TYPE_USER)));
301
+		$andX->add($expr->eq($aliasM.'.user_id', $qb->createNamedParameter($userId)));
302
+		$andX->add($expr->eq($aliasM.'.circle_id', $aliasC.'.unique_id'));
303
+		$andX->add($expr->gte($aliasM.'.level', $qb->createNamedParameter(Member::LEVEL_MEMBER)));
304
+		$andX->add($expr->eq($aliasM.'.instance', $qb->createNamedParameter('')));
305
+		$andX->add($expr->eq($aliasM.'.user_type', $qb->createNamedParameter(Member::TYPE_USER)));
306 306
 
307 307
 		return $andX;
308 308
 	}
@@ -330,11 +330,11 @@  discard block
 block discarded – undo
330 330
 
331 331
 		$andX = $expr->andX();
332 332
 
333
-		$andX->add($expr->eq($aliasM . '.user_id', 'ncgu.gid'));
334
-		$andX->add($expr->eq($aliasM . '.user_type', $qb->createNamedParameter(Member::TYPE_GROUP)));
335
-		$andX->add($expr->eq($aliasM . '.instance', $qb->createNamedParameter('')));
336
-		$andX->add($expr->eq($aliasM . '.circle_id', $aliasC . '.unique_id'));
337
-		$andX->add($expr->gte($aliasM . '.level', $qb->createNamedParameter(Member::LEVEL_MEMBER)));
333
+		$andX->add($expr->eq($aliasM.'.user_id', 'ncgu.gid'));
334
+		$andX->add($expr->eq($aliasM.'.user_type', $qb->createNamedParameter(Member::TYPE_GROUP)));
335
+		$andX->add($expr->eq($aliasM.'.instance', $qb->createNamedParameter('')));
336
+		$andX->add($expr->eq($aliasM.'.circle_id', $aliasC.'.unique_id'));
337
+		$andX->add($expr->gte($aliasM.'.level', $qb->createNamedParameter(Member::LEVEL_MEMBER)));
338 338
 
339 339
 		return $andX;
340 340
 	}
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
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 	 * returns the index of a specific UserID in a Members List
317 317
 	 *
318 318
 	 * @param array $members
319
-	 * @param $userId
319
+	 * @param string $userId
320 320
 	 *
321 321
 	 * @return int
322 322
 	 */
@@ -656,6 +656,9 @@  discard block
 block discarded – undo
656 656
 	}
657 657
 
658 658
 
659
+	/**
660
+	 * @param string $groupId
661
+	 */
659 662
 	public function unlinkAllFromGroup($groupId) {
660 663
 		$qb = $this->getMembersDeleteSql();
661 664
 
Please login to merge, or discard this patch.
lib/GlobalScale/MemberAdd.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			$this->sendMailExistingShares($template, $author, $recipient);
178 178
 			$this->sendPasswordExistingShares($author, $recipient, $password);
179 179
 		} catch (Exception $e) {
180
-			$this->miscService->log('Failed to send mail about existing share ' . $e->getMessage());
180
+			$this->miscService->log('Failed to send mail about existing share '.$e->getMessage());
181 181
 		}
182 182
 	}
183 183
 
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$authorName = ($authorUser instanceof IUser) ? $authorUser->getDisplayName() : $author;
328 328
 		$authorEmail = ($authorUser instanceof IUser) ? $authorUser->getEMailAddress() : null;
329 329
 
330
-		$this->miscService->log("Sending password mail about existing files to '" . $email . "'", 0);
330
+		$this->miscService->log("Sending password mail about existing files to '".$email."'", 0);
331 331
 
332 332
 		$plainBodyPart = $this->l10n->t(
333 333
 			"%1\$s shared multiple files with you.\nYou should have already received a separate mail with a link to access them.\n",
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		$message->setFrom([\OCP\Util::getDefaultEmailAddress($instanceName) => $senderName]);
370 370
 		if ($authorEmail !== null) {
371 371
 			$message->setReplyTo([$authorEmail => $authorName]);
372
-			$emailTemplate->addFooter($instanceName . ' - ' . $this->defaults->getSlogan());
372
+			$emailTemplate->addFooter($instanceName.' - '.$this->defaults->getSlogan());
373 373
 		} else {
374 374
 			$emailTemplate->addFooter();
375 375
 		}
Please login to merge, or discard this patch.
lib/Controller/GlobalScaleController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@
 block discarded – undo
91 91
 			$wrappers = $this->gsUpstreamService->getEventsByToken($token);
92 92
 		} catch (Exception $e) {
93 93
 			$this->miscService->log(
94
-				'exception during async: ' . ['token' => $token, 'error' => $e->getMessage()]
94
+				'exception during async: '.['token' => $token, 'error' => $e->getMessage()]
95 95
 			);
96 96
 
97 97
 			return $this->fail(['token' => $token, 'error' => $e->getMessage()]);
Please login to merge, or discard this patch.
lib/GlobalScale/GlobalSync.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 				}
117 117
 
118 118
 				$this->miscService->log(
119
-					'updating member :' . json_encode($member) . ' from ' . json_encode($knownMember), 2
119
+					'updating member :'.json_encode($member).' from '.json_encode($knownMember), 2
120 120
 				);
121 121
 				$this->membersRequest->updateMemberLevel($member);
122 122
 			} catch (MemberDoesNotExistException $e) {
123 123
 				try {
124 124
 					$this->miscService->log(
125
-						'creating member :' . json_encode($member), 2
125
+						'creating member :'.json_encode($member), 2
126 126
 					);
127 127
 					$this->membersRequest->createMember($member);
128 128
 				} catch (MemberAlreadyExistsException $e) {
@@ -140,7 +140,7 @@  discard block
 block discarded – undo
140 140
 			try {
141 141
 				$this->getMember($knownItem, $circle->getMembers(), $source);
142 142
 			} catch (MemberDoesNotExistException $e) {
143
-				$this->miscService->log('removing deprecated member :' . json_encode($knownItem), 2);
143
+				$this->miscService->log('removing deprecated member :'.json_encode($knownItem), 2);
144 144
 				$this->membersRequest->removeMember($knownItem);
145 145
 				$this->gsSharesRequest->removeGSSharesFromMember($knownItem);
146 146
 			}
Please login to merge, or discard this patch.
lib/Service/GSUpstreamService.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 			}
151 151
 		} catch (Exception $e) {
152 152
 			$this->miscService->log(
153
-				get_class($e) . ' on new event: ' . $e->getMessage() . ' - ' . json_encode($event), 1
153
+				get_class($e).' on new event: '.$e->getMessage().' - '.json_encode($event), 1
154 154
 			);
155 155
 			throw $e;
156 156
 		}
@@ -246,13 +246,13 @@  discard block
 block discarded – undo
246 246
 		$request->setDataSerialize($event);
247 247
 
248 248
 		$result = $this->retrieveJson($request);
249
-		$this->miscService->log('result ' . json_encode($result), 0);
249
+		$this->miscService->log('result '.json_encode($result), 0);
250 250
 		if ($this->getInt('status', $result) === 0) {
251 251
 			throw new GlobalScaleEventException($this->get('error', $result));
252 252
 		}
253 253
 
254 254
 		$updatedData = $this->getArray('event', $result);
255
-		$this->miscService->log('updatedEvent: ' . json_encode($updatedData), 0);
255
+		$this->miscService->log('updatedEvent: '.json_encode($updatedData), 0);
256 256
 		if (!empty($updatedData)) {
257 257
 			$updated = new GSEvent();
258 258
 			try {
Please login to merge, or discard this patch.
Doc Comments   +1 added lines, -3 removed lines patch added patch discarded remove patch
@@ -160,7 +160,6 @@  discard block
 block discarded – undo
160 160
 
161 161
 	/**
162 162
 	 * @param GSWrapper $wrapper
163
-	 * @param string $protocol
164 163
 	 */
165 164
 	public function broadcastWrapper(GSWrapper $wrapper): void {
166 165
 		$status = GSWrapper::STATUS_FAILED;
@@ -184,7 +183,6 @@  discard block
 block discarded – undo
184 183
 	/**
185 184
 	 * @param GSEvent $event
186 185
 	 * @param string $instance
187
-	 * @param string $protocol
188 186
 	 *
189 187
 	 * @throws RequestContentException
190 188
 	 * @throws RequestNetworkException
@@ -333,7 +331,7 @@  discard block
 block discarded – undo
333 331
 
334 332
 
335 333
 	/**
336
-	 * @param array $sync
334
+	 * @param Circle[] $sync
337 335
 	 *
338 336
 	 * @throws GSStatusException
339 337
 	 */
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -467,7 +467,7 @@
 block discarded – undo
467 467
 	/**
468 468
 	 * @param string $type
469 469
 	 *
470
-	 * @return array|bool|mixed
470
+	 * @return string
471 471
 	 * @throws GSStatusException
472 472
 	 */
473 473
 	public function getGSStatus(string $type = '') {
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 		if ((!$this->isNonSSLLinksAllowed() || strpos($remote, 'http://') !== 0)
252 252
 			&& strpos($remote, 'https://') !== 0
253 253
 		) {
254
-			$remote = 'https://' . $remote;
254
+			$remote = 'https://'.$remote;
255 255
 		}
256 256
 
257 257
 		return rtrim($remote, '/');
@@ -509,7 +509,7 @@  discard block
 block discarded – undo
509 509
 				return false;
510 510
 			}
511 511
 
512
-			throw new GSStatusException('GS and lookup are not configured : ' . $lookup . ', ' . $enabled);
512
+			throw new GSStatusException('GS and lookup are not configured : '.$lookup.', '.$enabled);
513 513
 		}
514 514
 
515 515
 		$clef = $this->config->getSystemValue('gss.jwt.key', '');
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 			}
574 574
 
575 575
 			if (array_key_exists('port', $local)) {
576
-				return $local['host'] . ':' . $local['port'];
576
+				return $local['host'].':'.$local['port'];
577 577
 			} else {
578 578
 				return $local['host'];
579 579
 			}
@@ -595,13 +595,13 @@  discard block
 block discarded – undo
595 595
 	 * @return string
596 596
 	 */
597 597
 	public function getRemotePath(string $route = 'circles.Navigation.navigate', array $args = []): string {
598
-		$base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME) . '://' . $this->getLocalInstance();
598
+		$base = $this->getAppValue(self::LOCAL_CLOUD_SCHEME).'://'.$this->getLocalInstance();
599 599
 
600 600
 		if ($route === '') {
601 601
 			return $base;
602 602
 		}
603 603
 
604
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
604
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
605 605
 	}
606 606
 
607 607
 	/**
@@ -702,7 +702,7 @@  discard block
 block discarded – undo
702 702
 			$ncBase = substr($ncBase, 0, -strlen($forcedPath));
703 703
 		}
704 704
 
705
-		return rtrim($ncBase, '/') . $link;
705
+		return rtrim($ncBase, '/').$link;
706 706
 	}
707 707
 
708 708
 }
Please login to merge, or discard this patch.
lib/Service/FederatedLinkCreationService.php 1 patch
Doc Comments   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -249,8 +249,8 @@  discard block
 block discarded – undo
249 249
 
250 250
 
251 251
 	/**
252
-	 * @param $circleUniqueId
253
-	 * @param $remote
252
+	 * @param string $circleUniqueId
253
+	 * @param string $remote
254 254
 	 *
255 255
 	 * @return FederatedLink
256 256
 	 * @throws Exception
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 	 *
343 343
 	 * Will parse the error reason returned by requestLink() and throw an Exception
344 344
 	 *
345
-	 * @param $reason
345
+	 * @param string $reason
346 346
 	 *
347 347
 	 * @throws Exception
348 348
 	 * @throws FederatedRemoteDoesNotAllowException
Please login to merge, or discard this patch.