Completed
Pull Request — master (#634)
by Maxence
02:35
created
lib/Service/InterfaceService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,13 +230,13 @@
 block discarded – undo
230 230
 			throw new UnknownInterfaceException('misconfigured scheme');
231 231
 		}
232 232
 
233
-		$base = $scheme . '://' . $this->getCloudInstance();
233
+		$base = $scheme.'://'.$this->getCloudInstance();
234 234
 
235 235
 		if ($route === '') {
236 236
 			return $base;
237 237
 		}
238 238
 
239
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
239
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
240 240
 	}
241 241
 
242 242
 
Please login to merge, or discard this patch.
lib/Command/CirclesRemote.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -176,19 +176,19 @@  discard block
 block discarded – undo
176 176
 
177 177
 		$webfinger = $this->getWebfinger($host, Application::APP_SUBJECT);
178 178
 		if ($this->input->getOption('all')) {
179
-			$this->output->writeln('- Webfinger on <info>' . $host . '</info>');
179
+			$this->output->writeln('- Webfinger on <info>'.$host.'</info>');
180 180
 			$this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
181 181
 			$this->output->writeln('');
182 182
 		}
183 183
 
184 184
 		if ($this->input->getOption('all')) {
185 185
 			$circleLink = $this->extractLink(Application::APP_REL, $webfinger);
186
-			$this->output->writeln('- Information about Circles app on <info>' . $host . '</info>');
186
+			$this->output->writeln('- Information about Circles app on <info>'.$host.'</info>');
187 187
 			$this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
188 188
 			$this->output->writeln('');
189 189
 		}
190 190
 
191
-		$this->output->writeln('- Available services on <info>' . $host . '</info>');
191
+		$this->output->writeln('- Available services on <info>'.$host.'</info>');
192 192
 		foreach ($webfinger->getLinks() as $link) {
193 193
 			$app = $link->getProperty('name');
194 194
 			$ver = $link->getProperty('version');
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 				$app .= ' ';
197 197
 			}
198 198
 			if ($ver !== '') {
199
-				$ver = 'v' . $ver;
199
+				$ver = 'v'.$ver;
200 200
 			}
201 201
 
202
-			$this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver);
202
+			$this->output->writeln(' * '.$link->getRel().' '.$app.$ver);
203 203
 		}
204 204
 		$this->output->writeln('');
205 205
 
206
-		$this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>');
206
+		$this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>');
207 207
 		$resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL);
208 208
 		$this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
209 209
 		$this->output->writeln('');
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
 		$tempUid = $resource->g('uid');
213 213
 		$this->output->writeln(
214
-			'- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>'
214
+			'- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>'
215 215
 		);
216 216
 
217 217
 		try {
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 			$this->output->writeln(' * No SignatureException: <info>Identity authed</info>');
220 220
 		} catch (SignatureException $e) {
221 221
 			$this->output->writeln(
222
-				'<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>'
222
+				'<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>'
223 223
 			);
224 224
 
225 225
 			return;
226 226
 		}
227 227
 
228
-		$this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>');
228
+		$this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>');
229 229
 		if ($remoteSignatory->getUid(true) !== $tempUid) {
230
-			$this->output->writeln('<error>looks like ' . $host . ' is faking its identity');
230
+			$this->output->writeln('<error>looks like '.$host.' is faking its identity');
231 231
 
232 232
 			return;
233 233
 		}
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		$this->output->writeln('');
236 236
 
237 237
 		$testUrl = $resource->g('test');
238
-		$this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>');
238
+		$this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>');
239 239
 
240 240
 		try {
241 241
 			$localSignatory = $this->remoteStreamService->getAppSignatory();
@@ -257,18 +257,18 @@  discard block
 block discarded – undo
257 257
 		$this->output->writeln('');
258 258
 
259 259
 		$this->output->writeln(' * Clear Signature: ');
260
-		$this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>');
260
+		$this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>');
261 261
 		$this->output->writeln('');
262 262
 
263 263
 		$this->output->writeln(' * Signed Signature (base64 encoded): ');
264 264
 		$this->output->writeln(
265
-			'<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>'
265
+			'<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>'
266 266
 		);
267 267
 		$this->output->writeln('');
268 268
 
269 269
 		$result = $signedRequest->getOutgoingRequest()->getResult();
270 270
 		$code = $result->getStatusCode();
271
-		$this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code));
271
+		$this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code));
272 272
 		$this->output->writeln(
273 273
 			json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
274 274
 		);
@@ -290,13 +290,13 @@  discard block
 block discarded – undo
290 290
 				$stored = new RemoteInstance();
291 291
 				$this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored);
292 292
 				$this->output->writeln(
293
-					'<info>The remote instance ' . $host
293
+					'<info>The remote instance '.$host
294 294
 					. ' is already known with this current identity</info>'
295 295
 				);
296 296
 
297 297
 				if ($remoteSignatory->getType() !== $stored->getType()) {
298 298
 					$this->output->writeln(
299
-						'- updating type from ' . $stored->getType() . ' to '
299
+						'- updating type from '.$stored->getType().' to '
300 300
 						. $remoteSignatory->getType()
301 301
 					);
302 302
 					$this->remoteStreamService->update(
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
 				if ($remoteSignatory->getInstance() !== $stored->getInstance()) {
308 308
 					$this->output->writeln(
309
-						'- updating host from ' . $stored->getInstance() . ' to '
309
+						'- updating host from '.$stored->getInstance().' to '
310 310
 						. $remoteSignatory->getInstance()
311 311
 					);
312 312
 					$this->remoteStreamService->update(
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 				}
316 316
 				if ($remoteSignatory->getId() !== $stored->getId()) {
317 317
 					$this->output->writeln(
318
-						'- updating href/Id from ' . $stored->getId() . ' to '
318
+						'- updating href/Id from '.$stored->getId().' to '
319 319
 						. $remoteSignatory->getId()
320 320
 					);
321 321
 					$this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF);
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
 		$helper = $this->getHelper('question');
342 342
 
343 343
 		$this->output->writeln(
344
-			'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.'
344
+			'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.'
345 345
 		);
346 346
 		$question = new ConfirmationQuestion(
347
-			'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType()
347
+			'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType()
348 348
 			. '</comment>\' using interface \'<comment>'
349 349
 			. InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()]
350 350
 			. '</comment>\' ? (y/N) ',
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		$helper = $this->getHelper('question');
370 370
 
371 371
 		$this->output->writeln(
372
-			'The remote instance <info>' . $remoteSignatory->getInstance()
372
+			'The remote instance <info>'.$remoteSignatory->getInstance()
373 373
 			. '</info> is known but <error>its identity has changed.</error>'
374 374
 		);
375 375
 		$this->output->writeln(
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 			return;
448 448
 		}
449 449
 
450
-		$this->output->write('Adding <comment>' . $instance . '</comment>: ');
450
+		$this->output->write('Adding <comment>'.$instance.'</comment>: ');
451 451
 		try {
452 452
 			$this->remoteStreamService->addRemoteInstance(
453 453
 				$instance,
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 			);
458 458
 			$this->output->writeln('<info>ok</info>');
459 459
 		} catch (Exception $e) {
460
-			$msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')';
461
-			$this->output->writeln('<error>' . get_class($e) . $msg . '</error>');
460
+			$msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')';
461
+			$this->output->writeln('<error>'.get_class($e).$msg.'</error>');
462 462
 		}
463 463
 	}
464 464
 
@@ -476,12 +476,12 @@  discard block
 block discarded – undo
476 476
 			try {
477 477
 				$current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance());
478 478
 				if ($current->getUid(true) === $instance->getUid(true)) {
479
-					$currentUid = '<info>' . $current->getUid(true) . '</info>';
479
+					$currentUid = '<info>'.$current->getUid(true).'</info>';
480 480
 				} else {
481
-					$currentUid = '<error>' . $current->getUid(true) . '</error>';
481
+					$currentUid = '<error>'.$current->getUid(true).'</error>';
482 482
 				}
483 483
 			} catch (Exception $e) {
484
-				$currentUid = '<error>' . $e->getMessage() . '</error>';
484
+				$currentUid = '<error>'.$e->getMessage().'</error>';
485 485
 			}
486 486
 
487 487
 			$table->appendRow(
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 			}
508 508
 		}
509 509
 
510
-		throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE));
510
+		throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE));
511 511
 	}
512 512
 
513 513
 	/**
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 			}
521 521
 		}
522 522
 
523
-		throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE));
523
+		throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE));
524 524
 	}
525 525
 
526 526
 }
Please login to merge, or discard this patch.
lib/Migration/Version0022Date20220526111723.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -78,7 +78,7 @@
 block discarded – undo
78 78
 		$tables = $schema->getTables();
79 79
 		foreach ($tables as $table) {
80 80
 			$tableName = $table->getName();
81
-			if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix . 'circles_') {
81
+			if (substr($tableName, 0, 8 + strlen($prefix)) === $prefix.'circles_') {
82 82
 				$tableName = substr($tableName, strlen($prefix));
83 83
 				$schema->dropTable($tableName);
84 84
 			}
Please login to merge, or discard this patch.
lib/Listeners/Examples/ExampleMembershipsRemoved.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -104,16 +104,16 @@
 block discarded – undo
104 104
 				} catch (Exception $e) {
105 105
 					$this->e($e);
106 106
 
107
-					return $membership->getSingleId() . ' is not ' . $inheritance . ' of '
108
-						   . $membership->getCircleId() . ' anymore';
107
+					return $membership->getSingleId().' is not '.$inheritance.' of '
108
+						   . $membership->getCircleId().' anymore';
109 109
 				}
110 110
 
111
-				return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()]
112
-					   . ') is not ' . $inheritance . ' of ' . $membership->getCircleId() . ' anymore';
111
+				return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()]
112
+					   . ') is not '.$inheritance.' of '.$membership->getCircleId().' anymore';
113 113
 			}, $event->getMemberships()
114 114
 		);
115 115
 
116
-		$this->log(3, $prefix . implode('. ', $memberships));
116
+		$this->log(3, $prefix.implode('. ', $memberships));
117 117
 	}
118 118
 
119 119
 }
Please login to merge, or discard this patch.
lib/Listeners/Examples/ExampleMembershipsCreated.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -104,16 +104,16 @@
 block discarded – undo
104 104
 				} catch (Exception $e) {
105 105
 					$this->e($e);
106 106
 
107
-					return $membership->getSingleId() . ' is now ' . $inheritance . ' of '
107
+					return $membership->getSingleId().' is now '.$inheritance.' of '
108 108
 						   . $membership->getCircleId();
109 109
 				}
110 110
 
111
-				return $federatedUser->getUserId() . ' (' . Member::$TYPE[$federatedUser->getUserType()]
112
-					   . ') is now ' . $inheritance . ' of ' . $membership->getCircleId();
111
+				return $federatedUser->getUserId().' ('.Member::$TYPE[$federatedUser->getUserType()]
112
+					   . ') is now '.$inheritance.' of '.$membership->getCircleId();
113 113
 			}, $event->getMemberships()
114 114
 		);
115 115
 
116
-		$this->log(3, $prefix . implode('. ', $memberships));
116
+		$this->log(3, $prefix.implode('. ', $memberships));
117 117
 	}
118 118
 
119 119
 }
Please login to merge, or discard this patch.
lib/Db/CoreQueryBuilder.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -644,7 +644,7 @@
 block discarded – undo
644 644
 	 * @param string $alias
645 645
 	 * @param IFederatedUser|null $initiator
646 646
 	 * @param string $field
647
-	 * @param string $helpedAlias
647
+	 * @param string $helperAlias
648 648
 	 *
649 649
 	 * @throws RequestBuilderException
650 650
 	 */
Please login to merge, or discard this patch.
Spacing   +76 added lines, -76 removed lines patch added patch discarded remove patch
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 		}
378 378
 
379 379
 		if ($circle->getDisplayName() !== '') {
380
-			$this->searchInDBField('display_name', '%' . $circle->getDisplayName() . '%');
380
+			$this->searchInDBField('display_name', '%'.$circle->getDisplayName().'%');
381 381
 		}
382 382
 		if ($circle->getConfig() > 0) {
383 383
 			$this->limitBitwise('config', $circle->getConfig());
@@ -396,7 +396,7 @@  discard block
 block discarded – undo
396 396
 			$this->generateRemoteInstanceSelectAlias($aliasRemoteInstance)
397 397
 				 ->leftJoin(
398 398
 					 $alias, CoreRequestBuilder::TABLE_REMOTE, $aliasRemoteInstance,
399
-					 $expr->eq($alias . '.instance', $aliasRemoteInstance . '.instance')
399
+					 $expr->eq($alias.'.instance', $aliasRemoteInstance.'.instance')
400 400
 				 );
401 401
 		} catch (RequestBuilderException $e) {
402 402
 		}
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 		$expr = $this->expr();
450 450
 		$this->leftJoin(
451 451
 			$this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_REMOTE, $aliasRemote,
452
-			$expr->eq($aliasRemote . '.instance', $this->createNamedParameter($remoteInstance->getInstance()))
452
+			$expr->eq($aliasRemote.'.instance', $this->createNamedParameter($remoteInstance->getInstance()))
453 453
 		);
454 454
 	}
455 455
 
@@ -477,12 +477,12 @@  discard block
 block discarded – undo
477 477
 		$this->leftJoin(
478 478
 			$this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteMember,
479 479
 			$expr->andX(
480
-				$expr->eq($aliasRemoteMember . '.circle_id', $aliasCircle . '.unique_id'),
480
+				$expr->eq($aliasRemoteMember.'.circle_id', $aliasCircle.'.unique_id'),
481 481
 				$expr->eq(
482
-					$aliasRemoteMember . '.instance',
482
+					$aliasRemoteMember.'.instance',
483 483
 					$this->createNamedParameter($remoteInstance->getInstance())
484 484
 				),
485
-				$expr->gte($aliasRemoteMember . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
485
+				$expr->gte($aliasRemoteMember.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
486 486
 			)
487 487
 		);
488 488
 	}
@@ -514,21 +514,21 @@  discard block
 block discarded – undo
514 514
 		$this->leftJoin(
515 515
 			$this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircle,
516 516
 			$expr->andX(
517
-				$expr->eq($aliasRemoteCircle . '.single_id', $aliasCircle . '.unique_id'),
518
-				$expr->emptyString($aliasRemoteCircle . '.instance'),
519
-				$expr->gte($aliasRemoteCircle . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
517
+				$expr->eq($aliasRemoteCircle.'.single_id', $aliasCircle.'.unique_id'),
518
+				$expr->emptyString($aliasRemoteCircle.'.instance'),
519
+				$expr->gte($aliasRemoteCircle.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
520 520
 			)
521 521
 		);
522 522
 		$this->leftJoin(
523 523
 			$this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasRemoteCircleOwner,
524 524
 			$expr->andX(
525
-				$expr->eq($aliasRemoteCircle . '.circle_id', $aliasRemoteCircleOwner . '.circle_id'),
525
+				$expr->eq($aliasRemoteCircle.'.circle_id', $aliasRemoteCircleOwner.'.circle_id'),
526 526
 				$expr->eq(
527
-					$aliasRemoteCircleOwner . '.instance',
527
+					$aliasRemoteCircleOwner.'.instance',
528 528
 					$this->createNamedParameter($remoteInstance->getInstance())
529 529
 				),
530 530
 				$expr->eq(
531
-					$aliasRemoteCircleOwner . '.level', $this->createNamedParameter(Member::LEVEL_OWNER)
531
+					$aliasRemoteCircleOwner.'.level', $this->createNamedParameter(Member::LEVEL_OWNER)
532 532
 				)
533 533
 			)
534 534
 		);
@@ -561,16 +561,16 @@  discard block
 block discarded – undo
561 561
 		$expr = $this->expr();
562 562
 		$orX = $expr->orX();
563 563
 		$orX->add(
564
-			$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE))
564
+			$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_GLOBALSCALE))
565 565
 		);
566 566
 
567 567
 		$orExtOrPassive = $expr->orX();
568 568
 		$orExtOrPassive->add(
569
-			$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))
569
+			$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_EXTERNAL))
570 570
 		);
571 571
 		if (!$sensitive) {
572 572
 			$orExtOrPassive->add(
573
-				$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
573
+				$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
574 574
 			);
575 575
 		} else {
576 576
 			if ($this->getDefaultSelectAlias() === CoreQueryBuilder::MEMBER) {
@@ -579,8 +579,8 @@  discard block
 block discarded – undo
579 579
 		}
580 580
 
581 581
 		$orInstance = $expr->orX();
582
-		$orInstance->add($expr->isNotNull($aliasRemoteMember . '.instance'));
583
-		$orInstance->add($expr->isNotNull($aliasRemoteCircleOwner . '.instance'));
582
+		$orInstance->add($expr->isNotNull($aliasRemoteMember.'.instance'));
583
+		$orInstance->add($expr->isNotNull($aliasRemoteCircleOwner.'.instance'));
584 584
 
585 585
 		$andExternal = $expr->andX();
586 586
 		$andExternal->add($orExtOrPassive);
@@ -589,13 +589,13 @@  discard block
 block discarded – undo
589 589
 		$orExtOrTrusted = $expr->orX();
590 590
 		$orExtOrTrusted->add($andExternal);
591 591
 		$orExtOrTrusted->add(
592
-			$expr->eq($aliasRemote . '.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED))
592
+			$expr->eq($aliasRemote.'.type', $this->createNamedParameter(RemoteInstance::TYPE_TRUSTED))
593 593
 		);
594 594
 
595 595
 		$andTrusted = $expr->andX();
596 596
 		$andTrusted->add($orExtOrTrusted);
597 597
 		$andTrusted->add($this->exprLimitBitwise('config', Circle::CFG_FEDERATED, $aliasCircle));
598
-		$andTrusted->add($expr->emptyString($aliasOwner . '.instance'));
598
+		$andTrusted->add($expr->emptyString($aliasOwner.'.instance'));
599 599
 		$orX->add($andTrusted);
600 600
 
601 601
 		$this->andWhere($orX);
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
 		}
623 623
 		$this->leftJoin(
624 624
 			$this->getDefaultSelectAlias(), CoreRequestBuilder::TABLE_MEMBER, $aliasMember,
625
-			$expr->eq($aliasMember . '.circle_id', $alias . '.unique_id')
625
+			$expr->eq($aliasMember.'.circle_id', $alias.'.unique_id')
626 626
 		);
627 627
 
628 628
 		$this->filterDirectMembership($aliasMember, $member);
@@ -643,30 +643,30 @@  discard block
 block discarded – undo
643 643
 
644 644
 		if ($member->getUserId() !== '') {
645 645
 			$andX->add(
646
-				$expr->eq($aliasMember . '.user_id', $this->createNamedParameter($member->getUserId()))
646
+				$expr->eq($aliasMember.'.user_id', $this->createNamedParameter($member->getUserId()))
647 647
 			);
648 648
 		}
649 649
 
650 650
 		if ($member->getSingleId() !== '') {
651 651
 			$andX->add(
652
-				$expr->eq($aliasMember . '.single_id', $this->createNamedParameter($member->getSingleId()))
652
+				$expr->eq($aliasMember.'.single_id', $this->createNamedParameter($member->getSingleId()))
653 653
 			);
654 654
 		}
655 655
 
656 656
 		if ($member->getUserType() > 0) {
657 657
 			$andX->add(
658
-				$expr->eq($aliasMember . '.user_type', $this->createNamedParameter($member->getUserType()))
658
+				$expr->eq($aliasMember.'.user_type', $this->createNamedParameter($member->getUserType()))
659 659
 			);
660 660
 		}
661 661
 
662 662
 		$andX->add(
663
-			$expr->eq($aliasMember . '.instance', $this->createNamedParameter($this->getInstance($member)))
663
+			$expr->eq($aliasMember.'.instance', $this->createNamedParameter($this->getInstance($member)))
664 664
 		);
665 665
 
666 666
 		if ($member->getLevel() > 0) {
667 667
 			$andX->add(
668 668
 				$expr->gte(
669
-					$aliasMember . '.level',
669
+					$aliasMember.'.level',
670 670
 					$this->createNamedParameter($member->getLevel(), IQueryBuilder::PARAM_INT)
671 671
 				)
672 672
 			);
@@ -694,12 +694,12 @@  discard block
 block discarded – undo
694 694
 
695 695
 		$expr = $this->expr();
696 696
 		$this->selectAlias(
697
-			$this->createFunction('COUNT(`' . $aliasMemberCount . '`.`member_id`)'),
698
-			(($alias !== $this->getDefaultSelectAlias()) ? $alias . '_' : '') . 'population'
697
+			$this->createFunction('COUNT(`'.$aliasMemberCount.'`.`member_id`)'),
698
+			(($alias !== $this->getDefaultSelectAlias()) ? $alias.'_' : '').'population'
699 699
 		);
700 700
 		$this->leftJoin(
701 701
 			$alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMemberCount,
702
-			$expr->eq($alias . '.unique_id', $aliasMemberCount . '.circle_id')
702
+			$expr->eq($alias.'.unique_id', $aliasMemberCount.'.circle_id')
703 703
 		);
704 704
 	}
705 705
 
@@ -735,7 +735,7 @@  discard block
 block discarded – undo
735 735
 			$helperAlias,
736 736
 			CoreRequestBuilder::TABLE_CIRCLE,
737 737
 			$aliasCircle,
738
-			$expr->eq($aliasCircle . '.unique_id', $helperAlias . '.' . $field)
738
+			$expr->eq($aliasCircle.'.unique_id', $helperAlias.'.'.$field)
739 739
 		);
740 740
 
741 741
 		if (!is_null($initiator)) {
@@ -766,7 +766,7 @@  discard block
 block discarded – undo
766 766
 		$this->generateCircleSelectAlias($aliasInvitedBy)
767 767
 			 ->leftJoin(
768 768
 				 $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasInvitedBy,
769
-				 $expr->eq($aliasMember . '.invited_by', $aliasInvitedBy . '.unique_id')
769
+				 $expr->eq($aliasMember.'.invited_by', $aliasInvitedBy.'.unique_id')
770 770
 			 );
771 771
 
772 772
 		$this->leftJoinOwner($aliasInvitedBy);
@@ -797,7 +797,7 @@  discard block
 block discarded – undo
797 797
 		$this->generateCircleSelectAlias($aliasBasedOn)
798 798
 			 ->leftJoin(
799 799
 				 $aliasMember, CoreRequestBuilder::TABLE_CIRCLE, $aliasBasedOn,
800
-				 $expr->eq($aliasBasedOn . '.unique_id', $aliasMember . '.single_id')
800
+				 $expr->eq($aliasBasedOn.'.unique_id', $aliasMember.'.single_id')
801 801
 			 );
802 802
 
803 803
 		if (!is_null($initiator)) {
@@ -830,9 +830,9 @@  discard block
 block discarded – undo
830 830
 			 ->leftJoin(
831 831
 				 $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember,
832 832
 				 $expr->andX(
833
-					 $expr->eq($aliasMember . '.circle_id', $alias . '.' . $field),
833
+					 $expr->eq($aliasMember.'.circle_id', $alias.'.'.$field),
834 834
 					 $expr->eq(
835
-						 $aliasMember . '.level',
835
+						 $aliasMember.'.level',
836 836
 						 $this->createNamedParameter(Member::LEVEL_OWNER, self::PARAM_INT)
837 837
 					 )
838 838
 				 )
@@ -870,10 +870,10 @@  discard block
 block discarded – undo
870 870
 			 ->leftJoin(
871 871
 				 $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasMember,
872 872
 				 $expr->andX(
873
-					 $expr->eq($aliasMember . '.circle_id', $alias . '.' . $fieldCircleId),
874
-					 $expr->eq($aliasMember . '.single_id', $alias . '.' . $fieldSingleId),
873
+					 $expr->eq($aliasMember.'.circle_id', $alias.'.'.$fieldCircleId),
874
+					 $expr->eq($aliasMember.'.single_id', $alias.'.'.$fieldSingleId),
875 875
 					 $expr->gte(
876
-						 $aliasMember . '.level',
876
+						 $aliasMember.'.level',
877 877
 						 $this->createNamedParameter(Member::LEVEL_MEMBER, self::PARAM_INT)
878 878
 					 )
879 879
 				 )
@@ -906,7 +906,7 @@  discard block
 block discarded – undo
906 906
 
907 907
 		$this->leftJoin(
908 908
 			$alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership,
909
-			$expr->eq($aliasMembership . '.circle_id', $alias . '.' . $field)
909
+			$expr->eq($aliasMembership.'.circle_id', $alias.'.'.$field)
910 910
 		);
911 911
 
912 912
 //		if (!$this->getBool('getData', $options, false)) {
@@ -920,8 +920,8 @@  discard block
 block discarded – undo
920 920
 			 ->leftJoin(
921 921
 				 $alias, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy,
922 922
 				 $expr->andX(
923
-					 $expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id'),
924
-					 $expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id')
923
+					 $expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id'),
924
+					 $expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id')
925 925
 				 )
926 926
 			 );
927 927
 
@@ -938,12 +938,12 @@  discard block
 block discarded – undo
938 938
 		$aliasUpstreamMembership = $this->generateAlias($alias, self::UPSTREAM_MEMBERSHIPS, $options);
939 939
 		$this->leftJoin(
940 940
 			$alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasUpstreamMembership,
941
-			$expr->eq($aliasUpstreamMembership . '.single_id', $this->createNamedParameter($singleId))
941
+			$expr->eq($aliasUpstreamMembership.'.single_id', $this->createNamedParameter($singleId))
942 942
 		);
943 943
 
944 944
 		$orX = $expr->orX(
945
-			$expr->eq($aliasUpstreamMembership . '.circle_id', $alias . '.' . $field),
946
-			$expr->eq($alias . '.' . $field, $this->createNamedParameter($singleId))
945
+			$expr->eq($aliasUpstreamMembership.'.circle_id', $alias.'.'.$field),
946
+			$expr->eq($alias.'.'.$field, $this->createNamedParameter($singleId))
947 947
 		);
948 948
 
949 949
 		$this->andWhere($orX);
@@ -964,11 +964,11 @@  discard block
 block discarded – undo
964 964
 
965 965
 		$expr = $this->expr();
966 966
 		$aliasMembership = $this->generateAlias($alias, self::MEMBERSHIPS);
967
-		$this->andWhere($expr->eq($aliasMembership . '.circle_id', $this->createNamedParameter($singleId)));
967
+		$this->andWhere($expr->eq($aliasMembership.'.circle_id', $this->createNamedParameter($singleId)));
968 968
 		if ($level > 1) {
969 969
 			$this->andWhere(
970 970
 				$expr->gte(
971
-					$aliasMembership . '.level',
971
+					$aliasMembership.'.level',
972 972
 					$this->createNamedParameter($level, IQueryBuilder::PARAM_INT)
973 973
 				)
974 974
 			);
@@ -996,8 +996,8 @@  discard block
 block discarded – undo
996 996
 		$this->leftJoin(
997 997
 			$alias, CoreRequestBuilder::TABLE_MEMBERSHIP, $aliasMembership,
998 998
 			$expr->andX(
999
-				$expr->eq($aliasMembership . '.inheritance_last', $alias . '.' . $field),
1000
-				$expr->eq($aliasMembership . '.single_id', $alias . '.single_id')
999
+				$expr->eq($aliasMembership.'.inheritance_last', $alias.'.'.$field),
1000
+				$expr->eq($aliasMembership.'.single_id', $alias.'.single_id')
1001 1001
 			)
1002 1002
 		);
1003 1003
 
@@ -1010,8 +1010,8 @@  discard block
 block discarded – undo
1010 1010
 			 ->leftJoin(
1011 1011
 				 $aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritanceFrom,
1012 1012
 				 $expr->andX(
1013
-					 $expr->eq($aliasMembership . '.circle_id', $aliasInheritanceFrom . '.circle_id'),
1014
-					 $expr->eq($aliasMembership . '.inheritance_first', $aliasInheritanceFrom . '.single_id')
1013
+					 $expr->eq($aliasMembership.'.circle_id', $aliasInheritanceFrom.'.circle_id'),
1014
+					 $expr->eq($aliasMembership.'.inheritance_first', $aliasInheritanceFrom.'.single_id')
1015 1015
 				 )
1016 1016
 			 );
1017 1017
 	}
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
 			$aliasMembership,
1078 1078
 			$expr->andX(
1079 1079
 				$this->exprLimit('single_id', $initiator->getSingleId(), $aliasMembership),
1080
-				$expr->eq($aliasMembership . '.circle_id', $helperAlias . '.' . $field)
1080
+				$expr->eq($aliasMembership.'.circle_id', $helperAlias.'.'.$field)
1081 1081
 			)
1082 1082
 		);
1083 1083
 
@@ -1090,8 +1090,8 @@  discard block
 block discarded – undo
1090 1090
 			$this->leftJoin(
1091 1091
 				$aliasMembership, CoreRequestBuilder::TABLE_MEMBER, $aliasInitiator,
1092 1092
 				$expr->andX(
1093
-					$expr->eq($aliasMembership . '.inheritance_first', $aliasInitiator . '.single_id'),
1094
-					$expr->eq($aliasMembership . '.circle_id', $aliasInitiator . '.circle_id')
1093
+					$expr->eq($aliasMembership.'.inheritance_first', $aliasInitiator.'.single_id'),
1094
+					$expr->eq($aliasMembership.'.circle_id', $aliasInitiator.'.circle_id')
1095 1095
 				)
1096 1096
 			);
1097 1097
 
@@ -1099,8 +1099,8 @@  discard block
 block discarded – undo
1099 1099
 			$this->leftJoin(
1100 1100
 				$aliasInitiator, CoreRequestBuilder::TABLE_MEMBER, $aliasInheritedBy,
1101 1101
 				$expr->andX(
1102
-					$expr->eq($aliasMembership . '.single_id', $aliasInheritedBy . '.single_id'),
1103
-					$expr->eq($aliasMembership . '.inheritance_last', $aliasInheritedBy . '.circle_id')
1102
+					$expr->eq($aliasMembership.'.single_id', $aliasInheritedBy.'.single_id'),
1103
+					$expr->eq($aliasMembership.'.inheritance_last', $aliasInheritedBy.'.circle_id')
1104 1104
 				)
1105 1105
 			);
1106 1106
 
@@ -1120,7 +1120,7 @@  discard block
 block discarded – undo
1120 1120
 			$aliasInheritedByMembership = $this->generateAlias($aliasInheritedBy, self::MEMBERSHIPS);
1121 1121
 			$this->generateMembershipSelectAlias($aliasMembership, $aliasInheritedByMembership);
1122 1122
 		} catch (RequestBuilderException $e) {
1123
-			\OC::$server->getLogger()->log(3, '-- ' . $e->getMessage());
1123
+			\OC::$server->getLogger()->log(3, '-- '.$e->getMessage());
1124 1124
 		}
1125 1125
 	}
1126 1126
 
@@ -1144,7 +1144,7 @@  discard block
 block discarded – undo
1144 1144
 		$orX = $expr->orX();
1145 1145
 		$orX->add(
1146 1146
 			$expr->andX(
1147
-				$expr->gte($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
1147
+				$expr->gte($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_MEMBER))
1148 1148
 			)
1149 1149
 		);
1150 1150
 
@@ -1152,7 +1152,7 @@  discard block
 block discarded – undo
1152 1152
 			$orX->add(
1153 1153
 				$expr->andX(
1154 1154
 					$this->exprLimitBitwise('config', Circle::CFG_PERSONAL, $alias),
1155
-					$expr->eq($aliasMembership . '.level', $this->createNamedParameter(Member::LEVEL_OWNER))
1155
+					$expr->eq($aliasMembership.'.level', $this->createNamedParameter(Member::LEVEL_OWNER))
1156 1156
 				)
1157 1157
 			);
1158 1158
 		}
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 		}
1162 1162
 		if ($this->getBool('canBeVisitor', $options, false)) {
1163 1163
 			// TODO: should find a better way, also filter on remote initiator on non-federated ?
1164
-			$orX->add($expr->gte($alias . '.config', $this->createNamedParameter(0)));
1164
+			$orX->add($expr->gte($alias.'.config', $this->createNamedParameter(0)));
1165 1165
 		}
1166 1166
 		if ($this->getBool('canBeVisitorOnOpen', $options, false)) {
1167 1167
 			$andOpen = $expr->andX();
@@ -1229,21 +1229,21 @@  discard block
 block discarded – undo
1229 1229
 		$expr = $this->expr();
1230 1230
 		$andPassive = $expr->andX();
1231 1231
 		$andPassive->add(
1232
-			$expr->eq($alias . '.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
1232
+			$expr->eq($alias.'.type', $this->createNamedParameter(RemoteInstance::TYPE_PASSIVE))
1233 1233
 		);
1234 1234
 
1235 1235
 		$orMemberOrLevel = $expr->orX();
1236 1236
 		$orMemberOrLevel->add(
1237
-			$expr->eq($this->getDefaultSelectAlias() . '.instance', $alias . '.instance')
1237
+			$expr->eq($this->getDefaultSelectAlias().'.instance', $alias.'.instance')
1238 1238
 		);
1239 1239
 		// TODO: do we need this ? (display members from the local instance)
1240 1240
 		$orMemberOrLevel->add(
1241
-			$expr->emptyString($this->getDefaultSelectAlias() . '.instance')
1241
+			$expr->emptyString($this->getDefaultSelectAlias().'.instance')
1242 1242
 		);
1243 1243
 
1244 1244
 		$orMemberOrLevel->add(
1245 1245
 			$expr->eq(
1246
-				$this->getDefaultSelectAlias() . '.level',
1246
+				$this->getDefaultSelectAlias().'.level',
1247 1247
 				$this->createNamedParameter(Member::LEVEL_OWNER)
1248 1248
 			)
1249 1249
 		);
@@ -1280,11 +1280,11 @@  discard block
 block discarded – undo
1280 1280
 			 )
1281 1281
 			 ->leftJoin(
1282 1282
 				 $aliasShare, CoreRequestBuilder::TABLE_FILE_CACHE, $aliasFileCache,
1283
-				 $expr->eq($aliasShare . '.file_source', $aliasFileCache . '.fileid')
1283
+				 $expr->eq($aliasShare.'.file_source', $aliasFileCache.'.fileid')
1284 1284
 			 )
1285 1285
 			 ->leftJoin(
1286 1286
 				 $aliasFileCache, CoreRequestBuilder::TABLE_STORAGES, $aliasStorages,
1287
-				 $expr->eq($aliasFileCache . '.storage', $aliasStorages . '.numeric_id')
1287
+				 $expr->eq($aliasFileCache.'.storage', $aliasStorages.'.numeric_id')
1288 1288
 			 );
1289 1289
 	}
1290 1290
 
@@ -1306,8 +1306,8 @@  discard block
 block discarded – undo
1306 1306
 		$this->leftJoin(
1307 1307
 			$aliasShareMemberships, CoreRequestBuilder::TABLE_SHARE, $aliasShareChild,
1308 1308
 			$expr->andX(
1309
-				$expr->eq($aliasShareChild . '.parent', $aliasShare . '.id'),
1310
-				$expr->eq($aliasShareChild . '.share_with', $aliasShareMemberships . '.single_id')
1309
+				$expr->eq($aliasShareChild.'.parent', $aliasShare.'.id'),
1310
+				$expr->eq($aliasShareChild.'.share_with', $aliasShareMemberships.'.single_id')
1311 1311
 			)
1312 1312
 		);
1313 1313
 
@@ -1357,13 +1357,13 @@  discard block
 block discarded – undo
1357 1357
 		$this->leftJoin(
1358 1358
 			$aliasMountMemberships, CoreRequestBuilder::TABLE_MOUNTPOINT, $aliasMountpoint,
1359 1359
 			$expr->andX(
1360
-				$expr->eq($aliasMountpoint . '.mount_id', $aliasMount . '.mount_id'),
1361
-				$expr->eq($aliasMountpoint . '.single_id', $aliasMountMemberships . '.single_id')
1360
+				$expr->eq($aliasMountpoint.'.mount_id', $aliasMount.'.mount_id'),
1361
+				$expr->eq($aliasMountpoint.'.single_id', $aliasMountMemberships.'.single_id')
1362 1362
 			)
1363 1363
 		);
1364 1364
 
1365
-		$this->selectAlias($aliasMountpoint . '.mountpoint', $aliasMountpoint . '_mountpoint');
1366
-		$this->selectAlias($aliasMountpoint . '.mountpoint_hash', $aliasMountpoint . '_mountpoint_hash');
1365
+		$this->selectAlias($aliasMountpoint.'.mountpoint', $aliasMountpoint.'_mountpoint');
1366
+		$this->selectAlias($aliasMountpoint.'.mountpoint_hash', $aliasMountpoint.'_mountpoint_hash');
1367 1367
 	}
1368 1368
 
1369 1369
 
@@ -1467,10 +1467,10 @@  discard block
 block discarded – undo
1467 1467
 	 */
1468 1468
 	public function generateAlias(string $base, string $extension, ?array &$options = []): string {
1469 1469
 		$search = str_replace('_', '.', $base);
1470
-		$path = $search . '.' . $extension;
1470
+		$path = $search.'.'.$extension;
1471 1471
 		if (!$this->validKey($path, self::$SQL_PATH)
1472 1472
 			&& !in_array($extension, $this->getArray($search, self::$SQL_PATH))) {
1473
-			throw new RequestBuilderException($extension . ' not found in ' . $search);
1473
+			throw new RequestBuilderException($extension.' not found in '.$search);
1474 1474
 		}
1475 1475
 
1476 1476
 		if (!is_array($options)) {
@@ -1479,15 +1479,15 @@  discard block
 block discarded – undo
1479 1479
 
1480 1480
 		$optionPath = '';
1481 1481
 		foreach (explode('.', $path) as $p) {
1482
-			$optionPath = trim($optionPath . '.' . $p, '.');
1482
+			$optionPath = trim($optionPath.'.'.$p, '.');
1483 1483
 			$options = array_merge(
1484 1484
 				$options,
1485
-				$this->getArray($optionPath . '.' . self::OPTIONS, self::$SQL_PATH),
1486
-				$this->getArray($optionPath . '.' . self::OPTIONS, $this->options)
1485
+				$this->getArray($optionPath.'.'.self::OPTIONS, self::$SQL_PATH),
1486
+				$this->getArray($optionPath.'.'.self::OPTIONS, $this->options)
1487 1487
 			);
1488 1488
 		}
1489 1489
 
1490
-		return $base . '_' . $extension;
1490
+		return $base.'_'.$extension;
1491 1491
 	}
1492 1492
 
1493 1493
 
@@ -1507,7 +1507,7 @@  discard block
 block discarded – undo
1507 1507
 			} else {
1508 1508
 				$k = $arr;
1509 1509
 			}
1510
-			$path[$k] = $prefix . '_' . $k . '_';
1510
+			$path[$k] = $prefix.'_'.$k.'_';
1511 1511
 		}
1512 1512
 
1513 1513
 		return $path;
Please login to merge, or discard this patch.
lib/CirclesQueryHelper.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 		$circle = new Circle();
145 145
 		$circle->importFromDatabase(
146 146
 			$data,
147
-			CoreQueryBuilder::HELPER . '_' . CoreQueryBuilder::CIRCLE . '_'
147
+			CoreQueryBuilder::HELPER.'_'.CoreQueryBuilder::CIRCLE.'_'
148 148
 		);
149 149
 
150 150
 		return $circle;
Please login to merge, or discard this patch.
lib/Model/Federated/FederatedEvent.php 1 patch
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	}
134 134
 
135 135
 	/**
136
-	 * @param mixed $class
136
+	 * @param string $class
137 137
 	 *
138 138
 	 * @return self
139 139
 	 */
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 
455 455
 	/**
456 456
 	 * @param string $key
457
-	 * @param array $result
457
+	 * @param \OCA\Circles\Model\ShareWrapper[] $result
458 458
 	 *
459 459
 	 * @return $this
460 460
 	 */
Please login to merge, or discard this patch.
lib/Service/FederatedEventService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -251,16 +251,16 @@
 block discarded – undo
251 251
 		try {
252 252
 			$test = new ReflectionClass($class);
253 253
 		} catch (ReflectionException $e) {
254
-			throw new FederatedEventException('ReflectionException with ' . $class . ': ' . $e->getMessage());
254
+			throw new FederatedEventException('ReflectionException with '.$class.': '.$e->getMessage());
255 255
 		}
256 256
 
257 257
 		if (!in_array(IFederatedItem::class, $test->getInterfaceNames())) {
258
-			throw new FederatedEventException($class . ' does not implements IFederatedItem');
258
+			throw new FederatedEventException($class.' does not implements IFederatedItem');
259 259
 		}
260 260
 
261 261
 		$item = OC::$server->get($class);
262 262
 		if (!($item instanceof IFederatedItem)) {
263
-			throw new FederatedEventException($class . ' not an IFederatedItem');
263
+			throw new FederatedEventException($class.' not an IFederatedItem');
264 264
 		}
265 265
 
266 266
 		if ($item instanceof IFederatedItemHighSeverity) {
Please login to merge, or discard this patch.