Completed
Pull Request — master (#2007)
by
unknown
27s
created
tests/bootstrap.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -14,10 +14,10 @@
 block discarded – undo
14 14
 	define('PHPUNIT_RUN', 1);
15 15
 }
16 16
 
17
-require_once __DIR__ . '/../../../lib/base.php';
18
-require_once __DIR__ . '/../vendor/autoload.php';
17
+require_once __DIR__.'/../../../lib/base.php';
18
+require_once __DIR__.'/../vendor/autoload.php';
19 19
 
20
-require_once __DIR__ . '/../../../tests/autoload.php';
20
+require_once __DIR__.'/../../../tests/autoload.php';
21 21
 
22 22
 Server::get(IAppManager::class)->loadApp('circles');
23 23
 
Please login to merge, or discard this patch.
lib/FileSharingTeamResourceProvider.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -43,18 +43,18 @@  discard block
 block discarded – undo
43 43
 		}
44 44
 
45 45
 		$shares = $this->shareByCircleProvider->getSharesToCircle($teamId);
46
-		usort($shares, function ($a, $b) {
46
+		usort($shares, function($a, $b) {
47 47
 			return (int)($b->getItemType() === 'folder') - (int)($a->getItemType() === 'folder');
48 48
 		});
49
-		return array_map(function (ShareWrapper $shareWrapper) {
49
+		return array_map(function(ShareWrapper $shareWrapper) {
50 50
 			$isFolder = $shareWrapper->getItemType() === 'folder';
51 51
 			return new TeamResource(
52 52
 				$this,
53 53
 				(string)$shareWrapper->getFileSource(),
54 54
 				basename($shareWrapper->getFileTarget()),
55
-				$this->urlGenerator->getAbsoluteURL('/index.php/f/' . $shareWrapper->getFileSource()),
55
+				$this->urlGenerator->getAbsoluteURL('/index.php/f/'.$shareWrapper->getFileSource()),
56 56
 				iconSvg: $isFolder ? '<svg xmlns="http://www.w3.org/2000/svg" id="mdi-folder" viewBox="0 0 24 24"><path d="M10,4H4C2.89,4 2,4.89 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V8C22,6.89 21.1,6 20,6H12L10,4Z" /></svg>' : null,
57
-				iconURL: !$isFolder
57
+				iconURL : !$isFolder
58 58
 					? $this->urlGenerator->linkToRouteAbsolute('core.preview.getPreviewByFileId', ['fileId' => $shareWrapper->getFileSource(), 'mimeFallback' => true, ])
59 59
 					: null,
60 60
 			);
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
 			return false;
67 67
 		}
68 68
 
69
-		return count(array_filter($this->getSharedWith($teamId), function (TeamResource $resource) use ($resourceId) {
69
+		return count(array_filter($this->getSharedWith($teamId), function(TeamResource $resource) use ($resourceId) {
70 70
 			return $resource->getId() === $resourceId;
71 71
 		})) !== 0;
72 72
 	}
@@ -78,7 +78,7 @@  discard block
 block discarded – undo
78 78
 
79 79
 		$shares = $this->shareByCircleProvider->getSharesByFileId((int)$resourceId);
80 80
 
81
-		return array_map(function ($share) {
81
+		return array_map(function($share) {
82 82
 			return $share->getSharedWith();
83 83
 		}, $shares);
84 84
 	}
Please login to merge, or discard this patch.
lib/Service/MaintenanceService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -44,9 +44,9 @@  discard block
 block discarded – undo
44 44
 	public const TIMEOUT = 18000;
45 45
 	public static $DELAY
46 46
 		= [
47
-			1 => 60,    // every minute
48
-			2 => 300,   // every 5 minutes
49
-			3 => 3600,  // every hour
47
+			1 => 60, // every minute
48
+			2 => 300, // every 5 minutes
49
+			3 => 3600, // every hour
50 50
 			4 => 75400, // every day
51 51
 			5 => 432000 // evey week
52 52
 		];
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 		$this->federatedUserService->bypassCurrentUserCondition(true);
97 97
 
98 98
 		$this->lockMaintenanceRun();
99
-		$this->debug('running maintenance (' . $level . ')');
99
+		$this->debug('running maintenance ('.$level.')');
100 100
 
101 101
 		switch ($level) {
102 102
 			case 1:
@@ -289,14 +289,14 @@  discard block
 block discarded – undo
289 289
 			->includeSystemCircles();
290 290
 
291 291
 		$circles = array_map(
292
-			function (Circle $circle) {
292
+			function(Circle $circle) {
293 293
 				return $circle->getSingleId();
294 294
 			}, $this->circleRequest->getCircles(null, $probe)
295 295
 		);
296 296
 
297 297
 		$shares = array_unique(
298 298
 			array_map(
299
-				function (ShareWrapper $share) {
299
+				function(ShareWrapper $share) {
300 300
 					return $share->getSharedWith();
301 301
 				}, $this->shareWrapperRequest->getShares()
302 302
 			)
@@ -438,6 +438,6 @@  discard block
 block discarded – undo
438 438
 	 * @param string $message
439 439
 	 */
440 440
 	private function output(string $message): void {
441
-		$this->output?->writeln('- ' . $message);
441
+		$this->output?->writeln('- '.$message);
442 442
 	}
443 443
 }
Please login to merge, or discard this patch.
lib/Service/MigrationService.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -255,7 +255,7 @@  discard block
 block discarded – undo
255 255
 		$done = [];
256 256
 		foreach ($circles as $circle) {
257 257
 			$this->outputService->output(
258
-				'Caching memberships for Members of \'' . $circle->getDisplayName() . '\'',
258
+				'Caching memberships for Members of \''.$circle->getDisplayName().'\'',
259 259
 				true
260 260
 			);
261 261
 
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 				try {
290 290
 					$data = new SimpleDataStore($row);
291 291
 					$this->outputService->output(
292
-						'Migrating Circle \'' . $data->g('name') . '\' (' . $data->g('unique_id') . ')',
292
+						'Migrating Circle \''.$data->g('name').'\' ('.$data->g('unique_id').')',
293 293
 						true
294 294
 					);
295 295
 
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 				try {
394 394
 					$data = new SimpleDataStore($row);
395 395
 					$this->outputService->output(
396
-						'Migrating Member \'' . $data->g('user_id') . '\' from \'' . $data->g('circle_id')
396
+						'Migrating Member \''.$data->g('user_id').'\' from \''.$data->g('circle_id')
397 397
 						. '\'',
398 398
 						true
399 399
 					);
@@ -503,8 +503,8 @@  discard block
 block discarded – undo
503 503
 					$federatedUser
504 504
 						= $this->federatedUserService->getLocalFederatedUser($data->g('share_with'));
505 505
 					$this->outputService->output(
506
-						'Migrating child share #' . $data->gInt('id') . ' owner: ' . $data->g('share_with')
507
-						. ' -> ' . $federatedUser->getSingleId(),
506
+						'Migrating child share #'.$data->gInt('id').' owner: '.$data->g('share_with')
507
+						. ' -> '.$federatedUser->getSingleId(),
508 508
 						true
509 509
 					);
510 510
 
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 			$addressBook
575 575
 				= $this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry));
576 576
 
577
-			$member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId);
577
+			$member->setUserId($userId.'/'.$addressBook->getUri().'/'.$contactId);
578 578
 		}
579 579
 	}
580 580
 
@@ -609,7 +609,7 @@  discard block
 block discarded – undo
609 609
 				try {
610 610
 					$data = new SimpleDataStore($row);
611 611
 					$this->outputService->output(
612
-						'Migrating ShareToken \'' . $data->g('token') . '\' for \'' . $data->g('user_id')
612
+						'Migrating ShareToken \''.$data->g('token').'\' for \''.$data->g('user_id')
613 613
 						. '\'',
614 614
 						true
615 615
 					);
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -167,11 +167,11 @@  discard block
 block discarded – undo
167 167
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
168 168
 			$circle = $this->circleService->getCircle($circleId);
169 169
 
170
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
170
+			$output->writeln('<info>Name</info>: '.$circle->getName());
171 171
 			$owner = $circle->getOwner();
172
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
172
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
173 173
 			$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
174
-			$output->writeln('<info>Config</info>: ' . $type);
174
+			$output->writeln('<info>Config</info>: '.$type);
175 175
 			$output->writeln(' ');
176 176
 
177 177
 			$tree = new TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 						$this->input->getOption('display-name')
238 238
 					),
239 239
 					($level > 0) ? Member::$DEF_LEVEL[$level]
240
-						: '(' . strtolower($member->getStatus()) . ')',
240
+						: '('.strtolower($member->getStatus()).')',
241 241
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
242 242
 						$member->getInvitedBy(),
243 243
 						$this->input->getOption('display-name')
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 							$circle = $this->remoteService->getCircleFromInstance(
328 328
 								$member->getSingleId(), $member->getInstance(), $data
329 329
 							);
330
-						} catch (CircleNotFoundException|RemoteInstanceException $e) {
330
+						} catch (CircleNotFoundException | RemoteInstanceException $e) {
331 331
 						}
332 332
 					} else {
333 333
 						$this->federatedUserService->commandLineInitiator(
@@ -403,14 +403,14 @@  discard block
 block discarded – undo
403 403
 				$member = $data->gObj('member', Member::class);
404 404
 
405 405
 				if ($lineNumber === 1) {
406
-					$line .= '<info>' . $member->getSingleId() . '</info>';
406
+					$line .= '<info>'.$member->getSingleId().'</info>';
407 407
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
408
-						$line .= '@' . $member->getInstance();
408
+						$line .= '@'.$member->getInstance();
409 409
 					}
410
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
410
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
411 411
 
412
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
413
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
412
+					$line .= ' <info>MemberId</info>: '.$member->getId();
413
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
414 414
 						$member,
415 415
 						$this->input->getOption('display-name')
416 416
 					);
@@ -418,7 +418,7 @@  discard block
 block discarded – undo
418 418
 						$line .= ' <info>Source</info>: '
419 419
 								 . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()];
420 420
 					} else {
421
-						$line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()];
421
+						$line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()];
422 422
 					}
423 423
 				}
424 424
 
@@ -431,21 +431,21 @@  discard block
 block discarded – undo
431 431
 						return $line;
432 432
 					}
433 433
 					$owner = $circle->getOwner();
434
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
434
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
435 435
 					$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
436
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
436
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
437 437
 				}
438 438
 			} else {
439 439
 				if ($lineNumber === 1 && !is_null($circle)) {
440
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
440
+					$line .= '<info>'.$circle->getSingleId().'</info>';
441 441
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
442
-						$line .= '@' . $circle->getInstance();
442
+						$line .= '@'.$circle->getInstance();
443 443
 					}
444 444
 				}
445 445
 			}
446 446
 
447 447
 			return $line;
448
-		} catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) {
448
+		} catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) {
449 449
 		}
450 450
 
451 451
 		return '';
Please login to merge, or discard this patch.
lib/Command/CirclesReport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	 * @return string[]
201 201
 	 */
202 202
 	public function fillCommandList(string $source, string $field): array {
203
-		echo $source . ' ' . $field . "\n";
203
+		echo $source.' '.$field."\n";
204 204
 
205 205
 		return ['abcd', 'abdde', 'erfg'];
206 206
 	}
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 * @return string
378 378
 	 */
379 379
 	private function obfuscateId(string $id): string {
380
-		return substr($id, 0, 5) . '.' . md5(substr($id, 5));
380
+		return substr($id, 0, 5).'.'.md5(substr($id, 5));
381 381
 	}
382 382
 
383 383
 
@@ -386,7 +386,7 @@  discard block
 block discarded – undo
386 386
 	 */
387 387
 	public function onNewPrompt(NC22InteractiveShellSession $session): void {
388 388
 		$prompt
389
-			= 'Circles Report [<info>' . $this->report->getSource() . '</info>]:<comment>%PATH%</comment>';
389
+			= 'Circles Report [<info>'.$this->report->getSource().'</info>]:<comment>%PATH%</comment>';
390 390
 
391 391
 		$commands = [];
392 392
 		if ($session->getData()->g('currentStatus') === 'write') {
Please login to merge, or discard this patch.
lib/Command/CirclesTest.php 1 patch
Spacing   +66 added lines, -66 removed lines patch added patch discarded remove patch
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 
184 184
 		// get the singleId of a Group
185 185
 		$federatedUser = $circlesManager->getFederatedUser('testGroup', Member::TYPE_GROUP);
186
-		echo 'singleId: ' . $federatedUser->getSingleId() . "\n";
186
+		echo 'singleId: '.$federatedUser->getSingleId()."\n";
187 187
 
188 188
 		//		$federatedUser->getMemberships();
189 189
 
@@ -222,8 +222,8 @@  discard block
 block discarded – undo
222 222
 
223 223
 
224 224
 		$members = array_map(
225
-			function (Member $member): string {
226
-				return $member->getUserId() . ' ' . $member->getSingleId() . '   - ' . $member->getUserType();
225
+			function(Member $member): string {
226
+				return $member->getUserId().' '.$member->getSingleId().'   - '.$member->getUserType();
227 227
 			}, $circle->getInheritedMembers()
228 228
 		);
229 229
 
@@ -309,7 +309,7 @@  discard block
 block discarded – undo
309 309
 			} catch (Exception $e) {
310 310
 				if ($this->pOn) {
311 311
 					$message = ($e->getMessage() !== '') ? $e->getMessage() : get_class($e);
312
-					$this->output->writeln('<error>' . $message . '</error>');
312
+					$this->output->writeln('<error>'.$message.'</error>');
313 313
 				} else {
314 314
 					throw $e;
315 315
 				}
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 	 */
394 394
 	private function loadConfiguration() {
395 395
 		$this->p('Loading configuration');
396
-		$configuration = file_get_contents(__DIR__ . '/../../testConfiguration.json');
396
+		$configuration = file_get_contents(__DIR__.'/../../testConfiguration.json');
397 397
 		$this->config = json_decode($configuration, true);
398 398
 		$this->r(true, 'testConfiguration.json');
399 399
 
@@ -426,22 +426,22 @@  discard block
 block discarded – undo
426 426
 		$this->r();
427 427
 
428 428
 		foreach ($this->getInstances() as $instance) {
429
-			$this->p('Creating users on ' . $instance);
429
+			$this->p('Creating users on '.$instance);
430 430
 			foreach ($this->getConfigArray($instance, 'users') as $userId) {
431 431
 				$this->pm($userId);
432 432
 				$this->occ(
433
-					$instance, 'user:add --password-from-env ' . $userId, false, false,
433
+					$instance, 'user:add --password-from-env '.$userId, false, false,
434 434
 					['OC_PASS' => 'testtest']
435 435
 				);
436 436
 			}
437 437
 			$this->r();
438 438
 
439 439
 			foreach ($this->getConfigArray($instance, 'groups') as $groupId => $users) {
440
-				$this->p('Creating group <info>' . $groupId . '</info> on <info>' . $instance . '</info>');
441
-				$this->occ($instance, 'group:add ' . $groupId, false, false);
440
+				$this->p('Creating group <info>'.$groupId.'</info> on <info>'.$instance.'</info>');
441
+				$this->occ($instance, 'group:add '.$groupId, false, false);
442 442
 				foreach ($users as $userId) {
443 443
 					$this->pm($userId);
444
-					$this->occ($instance, 'group:adduser ' . $groupId . ' ' . $userId, true, false);
444
+					$this->occ($instance, 'group:adduser '.$groupId.' '.$userId, true, false);
445 445
 				}
446 446
 				$this->r();
447 447
 			}
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 		foreach ($this->getInstances(true) as $instance) {
476 476
 			$this->pm($instance);
477 477
 			foreach ($this->getConfigArray($instance, 'config') as $k => $v) {
478
-				$this->occ($instance, 'config:app:set --value ' . $v . ' circles ' . $k, true, false);
478
+				$this->occ($instance, 'config:app:set --value '.$v.' circles '.$k, true, false);
479 479
 			}
480 480
 		}
481 481
 		$this->r();
@@ -488,7 +488,7 @@  discard block
 block discarded – undo
488 488
 	 */
489 489
 	private function confirmVersion() {
490 490
 		$version = $this->configService->getAppValue('installed_version');
491
-		$this->p('Confirming version <info>' . $version . '</info>');
491
+		$this->p('Confirming version <info>'.$version.'</info>');
492 492
 		foreach ($this->getInstances(false) as $instance) {
493 493
 			$this->pm($instance);
494 494
 			$capabilities = $this->occ($instance, 'circles:check --capabilities');
@@ -539,12 +539,12 @@  discard block
 block discarded – undo
539 539
 	 */
540 540
 	private function statusFreshInstances() {
541 541
 		foreach ($this->getInstances() as $instanceId) {
542
-			$this->p('Circles on ' . $instanceId);
542
+			$this->p('Circles on '.$instanceId);
543 543
 			$result = $this->occ($instanceId, 'circles:manage:list --all');
544 544
 			$expectedSize = sizeof($this->getConfigArray($instanceId, 'groups'))
545 545
 							+ sizeof($this->getConfigArray($instanceId, 'users'))
546 546
 							+ 1;
547
-			$this->r((sizeof($result) === $expectedSize), ((string)sizeof($result)) . ' circles');
547
+			$this->r((sizeof($result) === $expectedSize), ((string)sizeof($result)).' circles');
548 548
 
549 549
 			$membersList = $groupsList = [];
550 550
 			foreach ($result as $item) {
@@ -563,12 +563,12 @@  discard block
 block discarded – undo
563 563
 			$instance = $this->getConfig($instanceId, 'config.frontal_cloud_id');
564 564
 
565 565
 			foreach ($this->getConfigArray($instanceId, 'users') as $userId) {
566
-				$this->p('Checking Single Circle for <comment>' . $userId . '@' . $instance . '</comment>');
566
+				$this->p('Checking Single Circle for <comment>'.$userId.'@'.$instance.'</comment>');
567 567
 				$circle = $this->getSingleCircleForMember($membersList, $userId, $instance);
568 568
 
569 569
 				$compareToOwnerBasedOn = new Circle();
570 570
 				$compareToOwnerBasedOn->setConfig(Circle::CFG_SINGLE)
571
-					->setName('user:' . $userId . ':{CIRCLEID}')
571
+					->setName('user:'.$userId.':{CIRCLEID}')
572 572
 					->setDisplayName($userId);
573 573
 
574 574
 				$compareToOwner = new Member();
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 				$compareTo = new Circle();
587 587
 				$compareTo->setOwner($compareToOwner)
588 588
 					->setConfig(Circle::CFG_SINGLE)
589
-					->setName('user:' . $userId . ':{CIRCLEID}')
589
+					->setName('user:'.$userId.':{CIRCLEID}')
590 590
 					->setDisplayName($userId);
591 591
 
592 592
 				$this->confirmCircleData($circle, $compareTo);
@@ -623,8 +623,8 @@  discard block
 block discarded – undo
623 623
 			$this->r(true, $circle->getSingleId());
624 624
 
625 625
 			foreach ($this->getConfigArray($instanceId, 'groups') as $groupId => $members) {
626
-				$this->p('Checking Circle for <comment>' . $groupId . '@' . $instance . '</comment>');
627
-				$circle = $this->getCircleFromList($groupsList, 'group:' . $groupId);
626
+				$this->p('Checking Circle for <comment>'.$groupId.'@'.$instance.'</comment>');
627
+				$circle = $this->getCircleFromList($groupsList, 'group:'.$groupId);
628 628
 
629 629
 				$appCircle = $this->getSingleCircleForMember($membersList, 'circles', $instance);
630 630
 				$appOwner = $appCircle->getOwner();
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
 				$compareTo = new Circle();
649 649
 				$compareTo->setOwner($compareToOwner)
650 650
 					->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN)
651
-					->setName('group:' . $groupId)
651
+					->setName('group:'.$groupId)
652 652
 					->setDisplayName($groupId);
653 653
 
654 654
 				$this->confirmCircleData($circle, $compareTo);
@@ -665,12 +665,12 @@  discard block
 block discarded – undo
665 665
 	 */
666 666
 	private function createRemoteLink() {
667 667
 		foreach ($this->getInstances() as $instanceId) {
668
-			$this->p('Init remote link from ' . $instanceId);
668
+			$this->p('Init remote link from '.$instanceId);
669 669
 			$links = $this->getConfigArray($instanceId, 'remote');
670 670
 			foreach ($links as $link => $type) {
671 671
 				$remote = $this->getConfig($link, 'config.frontal_cloud_id');
672
-				$this->pm($remote . '(' . $type . ')');
673
-				$this->occ($instanceId, 'circles:remote ' . $remote . ' --type ' . $type . ' --yes');
672
+				$this->pm($remote.'('.$type.')');
673
+				$this->occ($instanceId, 'circles:remote '.$remote.' --type '.$type.' --yes');
674 674
 			}
675 675
 			$this->r();
676 676
 		}
@@ -684,7 +684,7 @@  discard block
 block discarded – undo
684 684
 	private function buildingLocalDatabase() {
685 685
 		$this->circles = $this->federatedUsers = [];
686 686
 		foreach ($this->getInstances() as $instanceId) {
687
-			$this->p('Retrieving Circles from ' . $instanceId);
687
+			$this->p('Retrieving Circles from '.$instanceId);
688 688
 			$circles = $this->occ($instanceId, 'circles:manage:list --all');
689 689
 			foreach ($circles as $item) {
690 690
 				/** @var Circle $circle */
@@ -719,7 +719,7 @@  discard block
 block discarded – undo
719 719
 		$name = self::$TEST_CIRCLES[0];
720 720
 		$owner = $this->getInstanceUsers($localInstanceId)[1];
721 721
 		$dataCreatedCircle001
722
-			= $this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name);
722
+			= $this->occ($localInstanceId, 'circles:manage:create --type user '.$owner.' '.$name);
723 723
 		/** @var Circle $createdCircle */
724 724
 		$createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class);
725 725
 		$this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle;
@@ -751,7 +751,7 @@  discard block
 block discarded – undo
751 751
 
752 752
 
753 753
 		$this->p('Comparing local stored data');
754
-		$dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId());
754
+		$dataCircle = $this->occ($localInstanceId, 'circle:manage:details '.$createdCircle->getSingleId());
755 755
 
756 756
 		/** @var Circle $tmpCircle */
757 757
 		$tmpCircle = $this->deserialize($dataCircle, Circle::class);
@@ -760,9 +760,9 @@  discard block
 block discarded – undo
760 760
 
761 761
 		$links = $this->getConfigArray('global-scale-1', 'remote');
762 762
 		foreach ($this->getInstances(false) as $instanceId) {
763
-			$this->p('Comparing data stored on ' . $instanceId);
763
+			$this->p('Comparing data stored on '.$instanceId);
764 764
 			$dataCircle
765
-				= $this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false);
765
+				= $this->occ($instanceId, 'circle:manage:details '.$createdCircle->getSingleId(), false);
766 766
 
767 767
 			if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') {
768 768
 				/** @var Circle $tmpCircle */
@@ -815,11 +815,11 @@  discard block
 block discarded – undo
815 815
 		$name = self::$TEST_CIRCLES[0];
816 816
 		$circle = $this->getCircleByName($localInstanceId, $name);
817 817
 		$userId = $this->getInstanceUsers($localInstanceId)[6];
818
-		$userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId);
818
+		$userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId);
819 819
 		$user = $userCircle->getOwner();
820 820
 		$dataAddedMember
821 821
 			= $this->occ(
822
-				$localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId()
822
+				$localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId()
823 823
 			);
824 824
 		/** @var Member $addedMember */
825 825
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
@@ -839,11 +839,11 @@  discard block
 block discarded – undo
839 839
 
840 840
 		$circle = $this->getCircleByName($localInstanceId, $circleName);
841 841
 		$userId = $this->getInstanceUsers($localInstanceId)[6];
842
-		$userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId);
842
+		$userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId);
843 843
 		$user = $userCircle->getOwner();
844 844
 		$dataAddedMember
845 845
 			= $this->occ(
846
-				$localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId()
846
+				$localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId()
847 847
 			);
848 848
 		/** @var Member $addedMember */
849 849
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
@@ -937,19 +937,19 @@  discard block
 block discarded – undo
937 937
 			];
938 938
 		}
939 939
 
940
-		$this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix . '.id', $params);
941
-		$this->compare($compareTo->getName(), $circle->getName(), $prefix . '.name', $params);
940
+		$this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix.'.id', $params);
941
+		$this->compare($compareTo->getName(), $circle->getName(), $prefix.'.name', $params);
942 942
 		$this->compare(
943
-			$compareTo->getDisplayName(), $circle->getDisplayName(), $prefix . '.displayName', $params
943
+			$compareTo->getDisplayName(), $circle->getDisplayName(), $prefix.'.displayName', $params
944 944
 		);
945
-		$this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix . '.config', true);
946
-		$this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix . '.source');
945
+		$this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix.'.config', true);
946
+		$this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix.'.source');
947 947
 
948 948
 		if ($compareTo->hasOwner()) {
949 949
 			$compareToOwner = $compareTo->getOwner();
950 950
 			$owner = $circle->getOwner();
951 951
 			if ($owner->getCircleId() !== $circle->getSingleId()) {
952
-				throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id');
952
+				throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id');
953 953
 			}
954 954
 			$this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params);
955 955
 		}
@@ -960,7 +960,7 @@  discard block
 block discarded – undo
960 960
 			}
961 961
 			$initiator = $circle->getInitiator();
962 962
 			if ($initiator->getCircleId() !== $circle->getSingleId()) {
963
-				throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id');
963
+				throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id');
964 964
 			}
965 965
 			$this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params);
966 966
 		}
@@ -986,27 +986,27 @@  discard block
 block discarded – undo
986 986
 		bool $versa = false,
987 987
 		array $params = [],
988 988
 	) {
989
-		$this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params);
990
-		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params);
991
-		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params);
992
-		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params);
989
+		$this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params);
990
+		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params);
991
+		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params);
992
+		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params);
993 993
 		$this->compare(
994
-			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params
994
+			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params
995 995
 		);
996
-		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType');
997
-		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params);
998
-		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true);
999
-		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params);
996
+		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType');
997
+		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params);
998
+		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true);
999
+		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params);
1000 1000
 
1001 1001
 		if ($compareTo->hasBasedOn()) {
1002 1002
 			if (!$member->hasBasedOn()) {
1003
-				throw new Exception('empty ' . $prefix . '.basedOn');
1003
+				throw new Exception('empty '.$prefix.'.basedOn');
1004 1004
 			}
1005 1005
 			$basedOn = $member->getBasedOn();
1006 1006
 			$this->confirmCircleData(
1007 1007
 				$basedOn,
1008 1008
 				$compareTo->getBasedOn(),
1009
-				$prefix . '.basedOn',
1009
+				$prefix.'.basedOn',
1010 1010
 				false,
1011 1011
 				$params
1012 1012
 			);
@@ -1025,7 +1025,7 @@  discard block
 block discarded – undo
1025 1025
 	private function compare(string $expected, string $compare, string $def, array $params) {
1026 1026
 		if ($expected !== ''
1027 1027
 			&& $this->feedStringWithParams($expected, $params) !== $compare) {
1028
-			throw new Exception($def . ': ' . $compare . ' (' . $expected . ')');
1028
+			throw new Exception($def.': '.$compare.' ('.$expected.')');
1029 1029
 		}
1030 1030
 	}
1031 1031
 
@@ -1041,7 +1041,7 @@  discard block
 block discarded – undo
1041 1041
 	private function compareInt(int $expected, int $compare, string $def, bool $force = false) {
1042 1042
 		if (($expected > 0 || ($force && $expected >= 0))
1043 1043
 			&& $expected !== $compare) {
1044
-			throw new Exception('wrong ' . $def . ': ' . ((string)$compare) . ' (' . ((string)$expected) . ')');
1044
+			throw new Exception('wrong '.$def.': '.((string)$compare).' ('.((string)$expected).')');
1045 1045
 		}
1046 1046
 	}
1047 1047
 
@@ -1077,7 +1077,7 @@  discard block
 block discarded – undo
1077 1077
 			}
1078 1078
 		}
1079 1079
 
1080
-		throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle');
1080
+		throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle');
1081 1081
 	}
1082 1082
 
1083 1083
 
@@ -1095,7 +1095,7 @@  discard block
 block discarded – undo
1095 1095
 		}
1096 1096
 
1097 1097
 		throw new CircleNotFoundException(
1098
-			'cannot extract \'' . $name . '\' from the list of generated Circles'
1098
+			'cannot extract \''.$name.'\' from the list of generated Circles'
1099 1099
 		);
1100 1100
 	}
1101 1101
 
@@ -1115,7 +1115,7 @@  discard block
 block discarded – undo
1115 1115
 		}
1116 1116
 
1117 1117
 		throw new CircleNotFoundException(
1118
-			'cannot extract  \'' . $name . '\' from the list of provided Circles'
1118
+			'cannot extract  \''.$name.'\' from the list of provided Circles'
1119 1119
 		);
1120 1120
 	}
1121 1121
 
@@ -1160,7 +1160,7 @@  discard block
 block discarded – undo
1160 1160
 			}
1161 1161
 		}
1162 1162
 
1163
-		throw new ItemNotFoundException($instance . ' not found');
1163
+		throw new ItemNotFoundException($instance.' not found');
1164 1164
 	}
1165 1165
 
1166 1166
 
@@ -1195,7 +1195,7 @@  discard block
 block discarded – undo
1195 1195
 	): ?array {
1196 1196
 		$configInstance = $this->getConfigInstance($instance);
1197 1197
 		$path = $this->get('path', $configInstance);
1198
-		$occ = rtrim($path, '/') . '/occ';
1198
+		$occ = rtrim($path, '/').'/occ';
1199 1199
 
1200 1200
 		$command = array_merge([$occ], explode(' ', $cmd));
1201 1201
 		if ($jsonAsOutput) {
@@ -1205,7 +1205,7 @@  discard block
 block discarded – undo
1205 1205
 		$process->run(null, $env);
1206 1206
 
1207 1207
 		if ($exceptionOnFail && !$process->isSuccessful()) {
1208
-			throw new Exception(implode(' ', $command) . ' failed');
1208
+			throw new Exception(implode(' ', $command).' failed');
1209 1209
 		}
1210 1210
 
1211 1211
 		$output = json_decode($process->getOutput(), true);
@@ -1228,7 +1228,7 @@  discard block
 block discarded – undo
1228 1228
 	 */
1229 1229
 	private function t(string $title): void {
1230 1230
 		$this->output->writeln('');
1231
-		$this->output->writeln('<comment>### ' . $title . '</comment>');
1231
+		$this->output->writeln('<comment>### '.$title.'</comment>');
1232 1232
 		$this->output->writeln('');
1233 1233
 	}
1234 1234
 
@@ -1237,14 +1237,14 @@  discard block
 block discarded – undo
1237 1237
 	 */
1238 1238
 	private function p(string $processing): void {
1239 1239
 		$this->pOn = true;
1240
-		$this->output->write('- ' . $processing . ': ');
1240
+		$this->output->write('- '.$processing.': ');
1241 1241
 	}
1242 1242
 
1243 1243
 	/**
1244 1244
 	 * @param string $more
1245 1245
 	 */
1246 1246
 	private function pm(string $more): void {
1247
-		$this->output->write($more . ' ');
1247
+		$this->output->write($more.' ');
1248 1248
 	}
1249 1249
 
1250 1250
 	/**
@@ -1254,9 +1254,9 @@  discard block
 block discarded – undo
1254 1254
 	private function r(bool $result = true, string $info = ''): void {
1255 1255
 		$this->pOn = false;
1256 1256
 		if ($result) {
1257
-			$this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>');
1257
+			$this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>');
1258 1258
 		} else {
1259
-			$this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>');
1259
+			$this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>');
1260 1260
 		}
1261 1261
 	}
1262 1262
 
@@ -1278,16 +1278,16 @@  discard block
 block discarded – undo
1278 1278
 		$dataAddedMember
1279 1279
 			= $this->occ(
1280 1280
 				$instanceId,
1281
-				'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type
1281
+				'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type
1282 1282
 			);
1283 1283
 		/** @var Member $addedMember */
1284 1284
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
1285 1285
 
1286 1286
 
1287
-		echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n";
1287
+		echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n";
1288 1288
 
1289 1289
 		$federatedUser = $this->federatedUsers[$instanceId][$userId];
1290
-		echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n";
1290
+		echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n";
1291 1291
 
1292 1292
 		return $addedMember;
1293 1293
 	}
Please login to merge, or discard this patch.
lib/Command/CirclesCheck.php 1 patch
Spacing   +37 added lines, -37 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 			throw new Exception('Please specify a --type for the test');
110 110
 		}
111 111
 		if ($test !== '' && !in_array($type, self::$checks)) {
112
-			throw new Exception('Unknown type: ' . implode(', ', self::$checks));
112
+			throw new Exception('Unknown type: '.implode(', ', self::$checks));
113 113
 		}
114 114
 
115 115
 		//		$this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test);
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 		}
166 166
 
167 167
 		$output->writeln('');
168
-		$output->writeln('* testing current address: ' . $test);
168
+		$output->writeln('* testing current address: '.$test);
169 169
 
170 170
 		try {
171 171
 			$this->setupLoopback($input, $output, $test);
@@ -200,8 +200,8 @@  discard block
 block discarded – undo
200 200
 				continue;
201 201
 			}
202 202
 
203
-			$loopback = rtrim($scheme . '://' . $cloudId . $path, '/');
204
-			$output->writeln('* testing address: ' . $loopback . ' ');
203
+			$loopback = rtrim($scheme.'://'.$cloudId.$path, '/');
204
+			$output->writeln('* testing address: '.$loopback.' ');
205 205
 
206 206
 			try {
207 207
 				$this->setupLoopback($input, $output, $loopback);
@@ -272,8 +272,8 @@  discard block
 block discarded – undo
272 272
 		$test = new FederatedEvent(LoopbackTest::class);
273 273
 		$this->federatedEventService->newEvent($test);
274 274
 		$output->writeln(
275
-			'<info>' . $test->getWrapperToken() . '</info> '
276
-			. '(took ' . ((string)(round(microtime(true) * 1000.0) - $timer)) . 'ms)'
275
+			'<info>'.$test->getWrapperToken().'</info> '
276
+			. '(took '.((string)(round(microtime(true) * 1000.0) - $timer)).'ms)'
277 277
 		);
278 278
 
279 279
 		$output->writeln('- Waiting for async process to finish (5s)');
@@ -292,18 +292,18 @@  discard block
 block discarded – undo
292 292
 
293 293
 		$checkVerify = $wrapper->getEvent()->getData()->gInt('verify');
294 294
 		if ($checkVerify === LoopbackTest::VERIFY) {
295
-			$output->write('<info>verify=' . ((string)$checkVerify) . '</info> ');
295
+			$output->write('<info>verify='.((string)$checkVerify).'</info> ');
296 296
 		} else {
297
-			$output->writeln('<error>verify=' . ((string)$checkVerify) . '</error>');
297
+			$output->writeln('<error>verify='.((string)$checkVerify).'</error>');
298 298
 
299 299
 			return false;
300 300
 		}
301 301
 
302 302
 		$checkManage = $wrapper->getResult()->gInt('manage');
303 303
 		if ($checkManage === LoopbackTest::MANAGE) {
304
-			$output->write('<info>manage=' . ((string)$checkManage) . '</info> ');
304
+			$output->write('<info>manage='.((string)$checkManage).'</info> ');
305 305
 		} else {
306
-			$output->writeln('<error>manage=' . ((string)$checkManage) . '</error>');
306
+			$output->writeln('<error>manage='.((string)$checkManage).'</error>');
307 307
 
308 308
 			return false;
309 309
 		}
@@ -342,7 +342,7 @@  discard block
 block discarded – undo
342 342
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId);
343 343
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path);
344 344
 		$output->writeln(
345
-			'- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>'
345
+			'- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>'
346 346
 		);
347 347
 	}
348 348
 
@@ -395,8 +395,8 @@  discard block
 block discarded – undo
395 395
 				continue;
396 396
 			}
397 397
 
398
-			$internal = rtrim($scheme . '://' . $cloudId, '/');
399
-			$fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/');
398
+			$internal = rtrim($scheme.'://'.$cloudId, '/');
399
+			$fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/');
400 400
 
401 401
 			$question = new ConfirmationQuestion(
402 402
 				'<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true,
@@ -415,9 +415,9 @@  discard block
 block discarded – undo
415 415
 					'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: '
416 416
 				);
417 417
 				$output->writeln(
418
-					'     curl -L "' . $internal
418
+					'     curl -L "'.$internal
419 419
 					. '/.well-known/webfinger?resource=http://nextcloud.com/&test='
420
-					. $testToken . '"'
420
+					. $testToken.'"'
421 421
 				);
422 422
 
423 423
 				$output->writeln('paste the result here: ');
@@ -451,7 +451,7 @@  discard block
 block discarded – undo
451 451
 
452 452
 				if ($pastedHref !== $href) {
453 453
 					$output->writeln(
454
-						'<error>The returned data (' . $pastedHref . ') are not the one expected: </error>'
454
+						'<error>The returned data ('.$pastedHref.') are not the one expected: </error>'
455 455
 						. $href
456 456
 					);
457 457
 					continue;
@@ -463,7 +463,7 @@  discard block
 block discarded – undo
463 463
 					'Next step, please run this <info>curl</info> command from a terminal on your local network and paste its result: '
464 464
 				);
465 465
 				$output->writeln(
466
-					'     curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"'
466
+					'     curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"'
467 467
 				);
468 468
 
469 469
 				$output->writeln('paste the result here: ');
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
 					|| $appSignatory->getRoot() !== $pastedSignatory->g('root')) {
480 480
 					$output->writeln(
481 481
 						'<error>The returned data ('
482
-						. $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root')
482
+						. $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root')
483 483
 						. ') are not the one expected: </error>'
484
-						. $appSignatory->getUid(true) . '/' . $appSignatory->getRoot()
484
+						. $appSignatory->getUid(true).'/'.$appSignatory->getRoot()
485 485
 					);
486 486
 					continue;
487 487
 				}
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 
508 508
 		$output->writeln('');
509 509
 		$question = new ConfirmationQuestion(
510
-			'- Do you want to save <info>' . $internal
510
+			'- Do you want to save <info>'.$internal
511 511
 			. '</info> as your <info>internal</info> address ? (y/N) ',
512 512
 			false, '/^(y|Y)/i'
513 513
 		);
@@ -524,7 +524,7 @@  discard block
 block discarded – undo
524 524
 		$this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_ID, $cloudId);
525 525
 		$this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path);
526 526
 
527
-		$output->writeln('- Address <info>' . $internal . '</info> is now used as <info>internal</info>');
527
+		$output->writeln('- Address <info>'.$internal.'</info> is now used as <info>internal</info>');
528 528
 	}
529 529
 
530 530
 	/**
@@ -575,8 +575,8 @@  discard block
 block discarded – undo
575 575
 				continue;
576 576
 			}
577 577
 
578
-			$frontal = rtrim($scheme . '://' . $cloudId, '/');
579
-			$fullFrontal = rtrim($scheme . '://' . $cloudId . $path, '/');
578
+			$frontal = rtrim($scheme.'://'.$cloudId, '/');
579
+			$fullFrontal = rtrim($scheme.'://'.$cloudId.$path, '/');
580 580
 
581 581
 			$question = new ConfirmationQuestion(
582 582
 				'<comment>Do you want to check the validity of this frontal address?</comment> (y/N) ', false,
@@ -595,9 +595,9 @@  discard block
 block discarded – undo
595 595
 					'You will need to run this <info>curl</info> command from a remote terminal and paste its result: '
596 596
 				);
597 597
 				$output->writeln(
598
-					'     curl -L "' . $frontal
598
+					'     curl -L "'.$frontal
599 599
 					. '/.well-known/webfinger?resource=http://nextcloud.com/&test='
600
-					. $testToken . '"'
600
+					. $testToken.'"'
601 601
 				);
602 602
 
603 603
 				$output->writeln('paste the result here: ');
@@ -631,7 +631,7 @@  discard block
 block discarded – undo
631 631
 
632 632
 				if ($pastedHref !== $href) {
633 633
 					$output->writeln(
634
-						'<error>The returned data (' . $pastedHref . ') are not the one expected: </error>'
634
+						'<error>The returned data ('.$pastedHref.') are not the one expected: </error>'
635 635
 						. $href
636 636
 					);
637 637
 					continue;
@@ -643,7 +643,7 @@  discard block
 block discarded – undo
643 643
 					'Next step, please run this <info>curl</info> command from a remote terminal and paste its result: '
644 644
 				);
645 645
 				$output->writeln(
646
-					'     curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"'
646
+					'     curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"'
647 647
 				);
648 648
 
649 649
 				$output->writeln('paste the result here: ');
@@ -659,9 +659,9 @@  discard block
 block discarded – undo
659 659
 					|| $appSignatory->getRoot() !== $pastedSignatory->g('root')) {
660 660
 					$output->writeln(
661 661
 						'<error>The returned data ('
662
-						. $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root')
662
+						. $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root')
663 663
 						. ') are not the one expected: </error>'
664
-						. $appSignatory->getUid(true) . '/' . $appSignatory->getRoot()
664
+						. $appSignatory->getUid(true).'/'.$appSignatory->getRoot()
665 665
 					);
666 666
 					continue;
667 667
 				}
@@ -687,7 +687,7 @@  discard block
 block discarded – undo
687 687
 
688 688
 		$output->writeln('');
689 689
 		$question = new ConfirmationQuestion(
690
-			'- Do you want to save <info>' . $frontal
690
+			'- Do you want to save <info>'.$frontal
691 691
 			. '</info> as your <info>frontal</info> address ? (y/N) ',
692 692
 			false, '/^(y|Y)/i'
693 693
 		);
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 		$this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_ID, $cloudId);
705 705
 		$this->configService->setAppValue(ConfigService::FRONTAL_CLOUD_PATH, $path);
706 706
 
707
-		$output->writeln('- Address <info>' . $frontal . '</info> is now used as <info>frontal</info>');
707
+		$output->writeln('- Address <info>'.$frontal.'</info> is now used as <info>frontal</info>');
708 708
 	}
709 709
 
710 710
 	/**
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
 			$request->setDataSerialize(new SimpleDataStore(['empty' => 1]));
730 730
 		}
731 731
 
732
-		$output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': ');
732
+		$output->write('- '.$type.' request on '.$request->getCompleteUrl().': ');
733 733
 
734 734
 		try {
735 735
 			$this->doRequest($request);
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
 				$color = 'info';
741 741
 			}
742 742
 
743
-			$output->writeln('<' . $color . '>' . ((string)$result->getStatusCode()) . '</' . $color . '>');
743
+			$output->writeln('<'.$color.'>'.((string)$result->getStatusCode()).'</'.$color.'>');
744 744
 			if ($result->getStatusCode() === 200) {
745 745
 				return true;
746 746
 			}
@@ -763,7 +763,7 @@  discard block
 block discarded – undo
763 763
 
764 764
 		$output->writeln('');
765 765
 		$output->writeln(
766
-			'The address <info>' . $address . '</info> seems to reach your local Nextcloud.'
766
+			'The address <info>'.$address.'</info> seems to reach your local Nextcloud.'
767 767
 		);
768 768
 
769 769
 		/** @var QuestionHelper $helper */
@@ -781,8 +781,8 @@  discard block
 block discarded – undo
781 781
 
782 782
 		$this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address);
783 783
 		$output->writeln(
784
-			'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\''
785
-			. $address . '\'</info> stored in database'
784
+			'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\''
785
+			. $address.'\'</info> stored in database'
786 786
 		);
787 787
 	}
788 788
 
@@ -809,7 +809,7 @@  discard block
 block discarded – undo
809 809
 		$path = rtrim($path, '/');
810 810
 
811 811
 		if (!is_null($cloudIdPort)) {
812
-			$cloudId = $cloudId . ':' . ((string)$cloudIdPort);
812
+			$cloudId = $cloudId.':'.((string)$cloudIdPort);
813 813
 		}
814 814
 
815 815
 		return [$scheme, $cloudId, $path];
Please login to merge, or discard this patch.
lib/Command/CirclesMemberships.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -192,10 +192,10 @@  discard block
 block discarded – undo
192 192
 		//			return 0;
193 193
 		//		}
194 194
 
195
-		$output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>');
196
-		$output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>');
197
-		$output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>');
198
-		$output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>');
195
+		$output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>');
196
+		$output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>');
197
+		$output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>');
198
+		$output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>');
199 199
 
200 200
 		$output->writeln('');
201 201
 		$output->writeln('Memberships:');
@@ -204,14 +204,14 @@  discard block
 block discarded – undo
204 204
 		if ($count === 0) {
205 205
 			$output->writeln('(database not updated)');
206 206
 		} else {
207
-			$output->writeln('(' . ((string)$count) . ' entries generated/updated in the database)');
207
+			$output->writeln('('.((string)$count).' entries generated/updated in the database)');
208 208
 		}
209 209
 
210 210
 		foreach ($federatedUser->getMemberships() as $membership) {
211 211
 			$this->memberships[$membership->getCircleId()] = $membership;
212 212
 			$output->writeln(
213
-				'- <info>' . $membership->getCircleId() . '</info> ('
214
-				. Member::$DEF_LEVEL[$membership->getLevel()] . ')'
213
+				'- <info>'.$membership->getCircleId().'</info> ('
214
+				. Member::$DEF_LEVEL[$membership->getLevel()].')'
215 215
 			);
216 216
 		}
217 217
 
@@ -285,9 +285,9 @@  discard block
 block discarded – undo
285 285
 				if ($lineNumber === 2) {
286 286
 					return '';
287 287
 				}
288
-				$line .= '<info>' . $federatedUser->getSingleId() . '</info>';
288
+				$line .= '<info>'.$federatedUser->getSingleId().'</info>';
289 289
 				if (!$this->configService->isLocalInstance($federatedUser->getInstance())) {
290
-					$line .= '@' . $federatedUser->getInstance();
290
+					$line .= '@'.$federatedUser->getInstance();
291 291
 				}
292 292
 
293 293
 				return $line;
@@ -299,33 +299,33 @@  discard block
 block discarded – undo
299 299
 				$circle = $member->getCircle();
300 300
 
301 301
 				if ($lineNumber === 1) {
302
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
302
+					$line .= '<info>'.$circle->getSingleId().'</info>';
303 303
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
304
-						$line .= '@' . $circle->getInstance();
304
+						$line .= '@'.$circle->getInstance();
305 305
 					}
306
-					$line .= ' (' . ($this->input->getOption('display-name')
307
-							? $circle->getDisplayName() : $circle->getName()) . ')';
308
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
309
-					$line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()];
306
+					$line .= ' ('.($this->input->getOption('display-name')
307
+							? $circle->getDisplayName() : $circle->getName()).')';
308
+					$line .= ' <info>MemberId</info>: '.$member->getId();
309
+					$line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()];
310 310
 
311 311
 					$knownMembership = $this->memberships[$member->getCircleId()];
312 312
 					if ($member->getLevel() !== $knownMembership->getLevel()) {
313
-						$line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')';
313
+						$line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')';
314 314
 					}
315 315
 				}
316 316
 				if ($lineNumber === 2) {
317 317
 					$owner = $circle->getOwner();
318
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' ';
318
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' ';
319 319
 					if ($owner->hasBasedOn()) {
320
-						$line .= '(' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') ';
320
+						$line .= '('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') ';
321 321
 					}
322 322
 					$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
323
-					$line .= ($type === '') ? '' : '<info>Config</info>: ' . $type;
323
+					$line .= ($type === '') ? '' : '<info>Config</info>: '.$type;
324 324
 				}
325 325
 
326 326
 				return $line;
327 327
 			}
328
-		} catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) {
328
+		} catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) {
329 329
 		}
330 330
 
331 331
 		return '';
@@ -379,6 +379,6 @@  discard block
 block discarded – undo
379 379
 			);
380 380
 		}
381 381
 
382
-		$output->writeln(((string)$count) . ' memberships updated');
382
+		$output->writeln(((string)$count).' memberships updated');
383 383
 	}
384 384
 }
Please login to merge, or discard this patch.