Completed
Push — master ( 3bdd0b...8a3449 )
by
unknown
21s queued 16s
created
lib/Tools/Model/NCSignedRequest.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -115,7 +115,7 @@
 block discarded – undo
115 115
 	 */
116 116
 	public function setBody(string $body): self {
117 117
 		$this->body = $body;
118
-		$this->setDigest('SHA-256=' . base64_encode(hash('sha256', utf8_encode($body), true)));
118
+		$this->setDigest('SHA-256='.base64_encode(hash('sha256', utf8_encode($body), true)));
119 119
 
120 120
 		return $this;
121 121
 	}
Please login to merge, or discard this patch.
lib/Command/MigrateCustomGroups.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -78,18 +78,18 @@  discard block
 block discarded – undo
78 78
 
79 79
 			$name = $rowCG['display_name'];
80 80
 			while (strlen($name) < 3) {
81
-				$name = '_' . $name;
81
+				$name = '_'.$name;
82 82
 			}
83 83
 
84 84
 			// based on owner's userid, we create federateduser and a new circle
85
-			$this->output->writeln('+ New Team <info>' . $name . '</info>, owner by <info>' . $ownerId . '</info>');
85
+			$this->output->writeln('+ New Team <info>'.$name.'</info>, owner by <info>'.$ownerId.'</info>');
86 86
 			$owner = $this->cachedFed($ownerId);
87 87
 
88 88
 			$this->circlesManager->startSession($owner);
89 89
 			try {
90 90
 				$circle = $this->circlesManager->createCircle($name);
91 91
 			} catch (\Exception $e) {
92
-				$this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error> with data ' . json_encode($rowCG));
92
+				$this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error> with data '.json_encode($rowCG));
93 93
 				$this->logger->log(2, 'error while creating circle', ['exception' => $e]);
94 94
 				$this->circlesManager->stopSession();
95 95
 				continue;
@@ -116,13 +116,13 @@  discard block
 block discarded – undo
116 116
 						continue; // owner is already in the circles
117 117
 					}
118 118
 
119
-					$this->output->writeln(' - new member <info>' . $userId . '</info>');
119
+					$this->output->writeln(' - new member <info>'.$userId.'</info>');
120 120
 					$member = $this->circlesManager->addMember($circle->getSingleId(), $this->cachedFed($userId));
121 121
 					if ($rowM['role'] === '1') {
122 122
 						$this->circlesManager->levelMember($member->getId(), Member::LEVEL_ADMIN);
123 123
 					}
124 124
 				} catch (\Exception $e) {
125
-					$this->output->writeln('<error>' . get_class($e) . ' ' . $e->getMessage() . '</error>');
125
+					$this->output->writeln('<error>'.get_class($e).' '.$e->getMessage().'</error>');
126 126
 					$this->logger->log(2, 'error while migrating custom group member', ['exception' => $e]);
127 127
 				}
128 128
 			}
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
 			->where($update->expr()->in('id', $update->createNamedParameter($shareIds, IQueryBuilder::PARAM_INT_ARRAY)));
159 159
 
160 160
 		$count = $update->executeStatement();
161
-		$this->output->writeln('> ' . $count . ' shares updated');
161
+		$this->output->writeln('> '.$count.' shares updated');
162 162
 
163 163
 		$this->fixShareChildren($shareIds, $memberIds);
164 164
 	}
@@ -198,7 +198,7 @@  discard block
 block discarded – undo
198 198
 			$count += $update->executeStatement();
199 199
 		}
200 200
 
201
-		$this->output->writeln('> ' . $count . ' children shares updated');
201
+		$this->output->writeln('> '.$count.' children shares updated');
202 202
 	}
203 203
 
204 204
 
Please login to merge, or discard this patch.
lib/Command/MembersAdd.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 		} catch (FederatedItemException $e) {
110 110
 			if ($input->getOption('status-code')) {
111 111
 				throw new FederatedItemException(
112
-					' [' . get_class($e) . ', ' . $e->getStatus() . ']' . "\n" . $e->getMessage()
112
+					' ['.get_class($e).', '.$e->getStatus().']'."\n".$e->getMessage()
113 113
 				);
114 114
 			}
115 115
 
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 		try {
149 149
 			$users = $this->retrieveJson($request);
150 150
 		} catch (
151
-			RequestContentException|
152
-			RequestNetworkException|
153
-			RequestResultSizeException|
154
-			RequestServerException|
151
+			RequestContentException |
152
+			RequestNetworkException |
153
+			RequestResultSizeException |
154
+			RequestServerException |
155 155
 			RequestResultNotJsonException $e
156 156
 		) {
157 157
 			return '';
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 				$instance = $host;
170 170
 			}
171 171
 
172
-			$result[] = $user['userid']['value'] . ' <info>@' . $host . '</info>';
172
+			$result[] = $user['userid']['value'].' <info>@'.$host.'</info>';
173 173
 		}
174 174
 
175 175
 		//		if ($userId === '') {
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +16 added lines, -17 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]));
@@ -236,8 +236,7 @@  discard block
 block discarded – undo
236 236
 						$member,
237 237
 						$this->input->getOption('display-name')
238 238
 					),
239
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
240
-						'(' . strtolower($member->getStatus()) . ')',
239
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
241 240
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
242 241
 						$member->getInvitedBy(),
243 242
 						$this->input->getOption('display-name')
@@ -327,7 +326,7 @@  discard block
 block discarded – undo
327 326
 							$circle = $this->remoteService->getCircleFromInstance(
328 327
 								$member->getSingleId(), $member->getInstance(), $data
329 328
 							);
330
-						} catch (CircleNotFoundException|RemoteInstanceException $e) {
329
+						} catch (CircleNotFoundException | RemoteInstanceException $e) {
331 330
 						}
332 331
 					} else {
333 332
 						$this->federatedUserService->commandLineInitiator(
@@ -403,14 +402,14 @@  discard block
 block discarded – undo
403 402
 				$member = $data->gObj('member', Member::class);
404 403
 
405 404
 				if ($lineNumber === 1) {
406
-					$line .= '<info>' . $member->getSingleId() . '</info>';
405
+					$line .= '<info>'.$member->getSingleId().'</info>';
407 406
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
408
-						$line .= '@' . $member->getInstance();
407
+						$line .= '@'.$member->getInstance();
409 408
 					}
410
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
409
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
411 410
 
412
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
413
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
411
+					$line .= ' <info>MemberId</info>: '.$member->getId();
412
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
414 413
 						$member,
415 414
 						$this->input->getOption('display-name')
416 415
 					);
@@ -418,7 +417,7 @@  discard block
 block discarded – undo
418 417
 						$line .= ' <info>Source</info>: '
419 418
 								 . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()];
420 419
 					} else {
421
-						$line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()];
420
+						$line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()];
422 421
 					}
423 422
 				}
424 423
 
@@ -431,21 +430,21 @@  discard block
 block discarded – undo
431 430
 						return $line;
432 431
 					}
433 432
 					$owner = $circle->getOwner();
434
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
433
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
435 434
 					$type = implode(', ', Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
436
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
435
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
437 436
 				}
438 437
 			} else {
439 438
 				if ($lineNumber === 1 && !is_null($circle)) {
440
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
439
+					$line .= '<info>'.$circle->getSingleId().'</info>';
441 440
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
442
-						$line .= '@' . $circle->getInstance();
441
+						$line .= '@'.$circle->getInstance();
443 442
 					}
444 443
 				}
445 444
 			}
446 445
 
447 446
 			return $line;
448
-		} catch (InvalidItemException|ItemNotFoundException|UnknownTypeException $e) {
447
+		} catch (InvalidItemException | ItemNotFoundException | UnknownTypeException $e) {
449 448
 		}
450 449
 
451 450
 		return '';
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), sizeof($result) . ' circles');
547
+			$this->r((sizeof($result) === $expectedSize), 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,13 +937,13 @@  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();
@@ -953,7 +953,7 @@  discard block
 block discarded – undo
953 953
 					throw new Exception('empty owner');
954 954
 				}
955 955
 				if ($owner->getCircleId() !== $circle->getSingleId()) {
956
-					throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id');
956
+					throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id');
957 957
 				}
958 958
 				$this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params);
959 959
 			}
@@ -966,7 +966,7 @@  discard block
 block discarded – undo
966 966
 				}
967 967
 				$initiator = $circle->getInitiator();
968 968
 				if ($initiator->getCircleId() !== $circle->getSingleId()) {
969
-					throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id');
969
+					throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id');
970 970
 				}
971 971
 				$this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params);
972 972
 			}
@@ -993,27 +993,27 @@  discard block
 block discarded – undo
993 993
 		bool $versa = false,
994 994
 		array $params = [],
995 995
 	) {
996
-		$this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params);
997
-		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params);
998
-		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params);
999
-		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params);
996
+		$this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params);
997
+		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params);
998
+		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params);
999
+		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params);
1000 1000
 		$this->compare(
1001
-			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params
1001
+			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params
1002 1002
 		);
1003
-		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType');
1004
-		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params);
1005
-		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true);
1006
-		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params);
1003
+		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType');
1004
+		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params);
1005
+		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true);
1006
+		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params);
1007 1007
 
1008 1008
 		if ($compareTo->hasBasedOn()) {
1009 1009
 			if (!$member->hasBasedOn()) {
1010
-				throw new Exception('empty ' . $prefix . '.basedOn');
1010
+				throw new Exception('empty '.$prefix.'.basedOn');
1011 1011
 			}
1012 1012
 			$basedOn = $member->getBasedOn();
1013 1013
 			$this->confirmCircleData(
1014 1014
 				$basedOn,
1015 1015
 				$compareTo->getBasedOn(),
1016
-				$prefix . '.basedOn',
1016
+				$prefix.'.basedOn',
1017 1017
 				false,
1018 1018
 				$params
1019 1019
 			);
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
 	private function compare(string $expected, string $compare, string $def, array $params) {
1033 1033
 		if ($expected !== ''
1034 1034
 			&& $this->feedStringWithParams($expected, $params) !== $compare) {
1035
-			throw new Exception($def . ': ' . $compare . ' (' . $expected . ')');
1035
+			throw new Exception($def.': '.$compare.' ('.$expected.')');
1036 1036
 		}
1037 1037
 	}
1038 1038
 
@@ -1048,7 +1048,7 @@  discard block
 block discarded – undo
1048 1048
 	private function compareInt(int $expected, int $compare, string $def, bool $force = false) {
1049 1049
 		if (($expected > 0 || ($force && $expected >= 0))
1050 1050
 			&& $expected !== $compare) {
1051
-			throw new Exception('wrong ' . $def . ': ' . $compare . ' (' . $expected . ')');
1051
+			throw new Exception('wrong '.$def.': '.$compare.' ('.$expected.')');
1052 1052
 		}
1053 1053
 	}
1054 1054
 
@@ -1084,7 +1084,7 @@  discard block
 block discarded – undo
1084 1084
 			}
1085 1085
 		}
1086 1086
 
1087
-		throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle');
1087
+		throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle');
1088 1088
 	}
1089 1089
 
1090 1090
 
@@ -1102,7 +1102,7 @@  discard block
 block discarded – undo
1102 1102
 		}
1103 1103
 
1104 1104
 		throw new CircleNotFoundException(
1105
-			'cannot extract \'' . $name . '\' from the list of generated Circles'
1105
+			'cannot extract \''.$name.'\' from the list of generated Circles'
1106 1106
 		);
1107 1107
 	}
1108 1108
 
@@ -1122,7 +1122,7 @@  discard block
 block discarded – undo
1122 1122
 		}
1123 1123
 
1124 1124
 		throw new CircleNotFoundException(
1125
-			'cannot extract  \'' . $name . '\' from the list of provided Circles'
1125
+			'cannot extract  \''.$name.'\' from the list of provided Circles'
1126 1126
 		);
1127 1127
 	}
1128 1128
 
@@ -1167,7 +1167,7 @@  discard block
 block discarded – undo
1167 1167
 			}
1168 1168
 		}
1169 1169
 
1170
-		throw new ItemNotFoundException($instance . ' not found');
1170
+		throw new ItemNotFoundException($instance.' not found');
1171 1171
 	}
1172 1172
 
1173 1173
 
@@ -1202,7 +1202,7 @@  discard block
 block discarded – undo
1202 1202
 	): ?array {
1203 1203
 		$configInstance = $this->getConfigInstance($instance);
1204 1204
 		$path = $this->get('path', $configInstance);
1205
-		$occ = rtrim($path, '/') . '/occ';
1205
+		$occ = rtrim($path, '/').'/occ';
1206 1206
 
1207 1207
 		$command = array_merge([$occ], explode(' ', $cmd));
1208 1208
 		if ($jsonAsOutput) {
@@ -1212,7 +1212,7 @@  discard block
 block discarded – undo
1212 1212
 		$process->run(null, $env);
1213 1213
 
1214 1214
 		if ($exceptionOnFail && !$process->isSuccessful()) {
1215
-			throw new Exception(implode(' ', $command) . ' failed');
1215
+			throw new Exception(implode(' ', $command).' failed');
1216 1216
 		}
1217 1217
 
1218 1218
 		$output = json_decode($process->getOutput(), true);
@@ -1235,7 +1235,7 @@  discard block
 block discarded – undo
1235 1235
 	 */
1236 1236
 	private function t(string $title): void {
1237 1237
 		$this->output->writeln('');
1238
-		$this->output->writeln('<comment>### ' . $title . '</comment>');
1238
+		$this->output->writeln('<comment>### '.$title.'</comment>');
1239 1239
 		$this->output->writeln('');
1240 1240
 	}
1241 1241
 
@@ -1244,14 +1244,14 @@  discard block
 block discarded – undo
1244 1244
 	 */
1245 1245
 	private function p(string $processing): void {
1246 1246
 		$this->pOn = true;
1247
-		$this->output->write('- ' . $processing . ': ');
1247
+		$this->output->write('- '.$processing.': ');
1248 1248
 	}
1249 1249
 
1250 1250
 	/**
1251 1251
 	 * @param string $more
1252 1252
 	 */
1253 1253
 	private function pm(string $more): void {
1254
-		$this->output->write($more . ' ');
1254
+		$this->output->write($more.' ');
1255 1255
 	}
1256 1256
 
1257 1257
 	/**
@@ -1261,9 +1261,9 @@  discard block
 block discarded – undo
1261 1261
 	private function r(bool $result = true, string $info = ''): void {
1262 1262
 		$this->pOn = false;
1263 1263
 		if ($result) {
1264
-			$this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>');
1264
+			$this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>');
1265 1265
 		} else {
1266
-			$this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>');
1266
+			$this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>');
1267 1267
 		}
1268 1268
 	}
1269 1269
 
@@ -1285,16 +1285,16 @@  discard block
 block discarded – undo
1285 1285
 		$dataAddedMember =
1286 1286
 			$this->occ(
1287 1287
 				$instanceId,
1288
-				'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type
1288
+				'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type
1289 1289
 			);
1290 1290
 		/** @var Member $addedMember */
1291 1291
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
1292 1292
 
1293 1293
 
1294
-		echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n";
1294
+		echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n";
1295 1295
 
1296 1296
 		$federatedUser = $this->federatedUsers[$instanceId][$userId];
1297
-		echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n";
1297
+		echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n";
1298 1298
 
1299 1299
 		return $addedMember;
1300 1300
 	}
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('(' . $count . ' entries generated/updated in the database)');
207
+			$output->writeln('('.$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($count . ' memberships updated');
382
+		$output->writeln($count.' memberships updated');
383 383
 	}
384 384
 }
Please login to merge, or discard this patch.
lib/Service/FederatedUserService.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 		if ($check) {
509 509
 			$user = $this->userManager->get($userId);
510 510
 			if ($user === null) {
511
-				throw new FederatedUserNotFoundException('user ' . $userId . ' not found');
511
+				throw new FederatedUserNotFoundException('user '.$userId.' not found');
512 512
 			}
513 513
 			$displayName = $this->userManager->getDisplayName($userId);
514 514
 		} else {
@@ -1023,7 +1023,7 @@  discard block
 block discarded – undo
1023 1023
 			$prefix = ($federatedUser->getUserType() === Member::TYPE_APP) ? 'app'
1024 1024
 				: Member::$TYPE[$federatedUser->getUserType()];
1025 1025
 
1026
-			$circle->setName($prefix . ':' . $federatedUser->getUserId() . ':' . $id)
1026
+			$circle->setName($prefix.':'.$federatedUser->getUserId().':'.$id)
1027 1027
 				->setDisplayName($federatedUser->getDisplayName())
1028 1028
 				->setSingleId($id)
1029 1029
 				->setSource($source);
@@ -1227,7 +1227,7 @@  discard block
 block discarded – undo
1227 1227
 		$owner = $this->getCurrentApp();
1228 1228
 
1229 1229
 		$circle = new Circle();
1230
-		$circle->setName('group:' . $groupId)
1230
+		$circle->setName('group:'.$groupId)
1231 1231
 			->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN)
1232 1232
 			->setSingleId($this->token(ManagedModel::ID_LENGTH))
1233 1233
 			->setSource(Member::TYPE_GROUP);
@@ -1295,8 +1295,8 @@  discard block
 block discarded – undo
1295 1295
 	 * @return string
1296 1296
 	 */
1297 1297
 	private function generateCacheKey(FederatedUser $federatedUser): string {
1298
-		return $federatedUser->getInstance() . '#'
1299
-			   . $federatedUser->getUserType() . '#'
1298
+		return $federatedUser->getInstance().'#'
1299
+			   . $federatedUser->getUserType().'#'
1300 1300
 			   . $federatedUser->getUserId();
1301 1301
 	}
1302 1302
 }
Please login to merge, or discard this patch.
lib/Service/RemoteStreamService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -266,7 +266,7 @@  discard block
 block discarded – undo
266 266
 			//		$app->setAlgorithm(NCSignatory::SHA512);
267 267
 			$signedRequest = $this->signOutgoingRequest($request, $app);
268 268
 			$this->doRequest($signedRequest->getOutgoingRequest(), false);
269
-		} catch (RequestNetworkException|SignatoryException $e) {
269
+		} catch (RequestNetworkException | SignatoryException $e) {
270 270
 			throw new RemoteInstanceException($e->getMessage());
271 271
 		}
272 272
 
@@ -310,7 +310,7 @@  discard block
 block discarded – undo
310 310
 	public function getCachedRemoteInstance(string $instance): RemoteInstance {
311 311
 		$remoteInstance = $this->remoteRequest->getFromInstance($instance);
312 312
 		if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) {
313
-			throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database');
313
+			throw new UnknownRemoteException($instance.' is set as \'unknown\' in database');
314 314
 		}
315 315
 
316 316
 		return $remoteInstance;
@@ -499,7 +499,7 @@  discard block
 block discarded – undo
499 499
 			$test = new ReflectionClass($class);
500 500
 			$this->confirmFederatedItemExceptionFromClass($test);
501 501
 			$e = $class;
502
-		} catch (ReflectionException|FederatedItemException $_e) {
502
+		} catch (ReflectionException | FederatedItemException $_e) {
503 503
 			$e = $this->getFederatedItemExceptionFromStatus($result->getStatusCode());
504 504
 		}
505 505
 
@@ -553,7 +553,7 @@  discard block
 block discarded – undo
553 553
 	 * @throws RemoteNotFoundException
554 554
 	 * @throws RemoteUidException
555 555
 	 */
556
-	public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance &$stored = null): void {
556
+	public function confirmValidRemote(RemoteInstance $remote, ?RemoteInstance & $stored = null): void {
557 557
 		try {
558 558
 			$stored = $this->remoteRequest->getFromHref($remote->getId());
559 559
 		} catch (RemoteNotFoundException $e) {
Please login to merge, or discard this patch.
lib/Service/ShareWrapperService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -324,8 +324,8 @@
 block discarded – undo
324 324
 		int $nodeId,
325 325
 		string $probeSum,
326 326
 	): string {
327
-		return $federatedUser->getSingleId() . '#'
328
-			   . $nodeId . '#'
327
+		return $federatedUser->getSingleId().'#'
328
+			   . $nodeId.'#'
329 329
 			   . $probeSum;
330 330
 	}
331 331
 }
Please login to merge, or discard this patch.