Completed
Pull Request — master (#803)
by Maxence
52s queued 14s
created
lib/Service/MaintenanceService.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 		$this->federatedUserService->bypassCurrentUserCondition(true);
150 150
 
151 151
 		$this->lockMaintenanceRun();
152
-		$this->debug('running maintenance (' . $level . ')');
152
+		$this->debug('running maintenance ('.$level.')');
153 153
 
154 154
 		switch ($level) {
155 155
 			case 1:
@@ -308,14 +308,14 @@  discard block
 block discarded – undo
308 308
 			  ->includeSystemCircles();
309 309
 
310 310
 		$circles = array_map(
311
-			function (Circle $circle) {
311
+			function(Circle $circle) {
312 312
 				return $circle->getSingleId();
313 313
 			}, $this->circleRequest->getCircles(null, $probe)
314 314
 		);
315 315
 
316 316
 		$shares = array_unique(
317 317
 			array_map(
318
-				function (ShareWrapper $share) {
318
+				function(ShareWrapper $share) {
319 319
 					return $share->getSharedWith();
320 320
 				}, $this->shareWrapperRequest->getShares()
321 321
 			)
@@ -360,7 +360,7 @@  discard block
 block discarded – undo
360 360
 	 */
361 361
 	private function output(string $message): void {
362 362
 		if (!is_null($this->output)) {
363
-			$this->output->writeln('- ' . $message);
363
+			$this->output->writeln('- '.$message);
364 364
 		}
365 365
 	}
366 366
 }
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
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 
204 204
 		// get the singleId of a Group
205 205
 		$federatedUser = $circlesManager->getFederatedUser('testGroup', Member::TYPE_GROUP);
206
-		echo 'singleId: ' . $federatedUser->getSingleId() . "\n";
206
+		echo 'singleId: '.$federatedUser->getSingleId()."\n";
207 207
 
208 208
 //		$federatedUser->getMemberships();
209 209
 
@@ -242,8 +242,8 @@  discard block
 block discarded – undo
242 242
 
243 243
 
244 244
 		$members = array_map(
245
-			function (Member $member): string {
246
-				return $member->getUserId() . ' ' . $member->getSingleId() . '   - ' . $member->getUserType();
245
+			function(Member $member): string {
246
+				return $member->getUserId().' '.$member->getSingleId().'   - '.$member->getUserType();
247 247
 			}, $circle->getInheritedMembers()
248 248
 		);
249 249
 
@@ -329,7 +329,7 @@  discard block
 block discarded – undo
329 329
 			} catch (Exception $e) {
330 330
 				if ($this->pOn) {
331 331
 					$message = ($e->getMessage() !== '') ? $e->getMessage() : get_class($e);
332
-					$this->output->writeln('<error>' . $message . '</error>');
332
+					$this->output->writeln('<error>'.$message.'</error>');
333 333
 				} else {
334 334
 					throw $e;
335 335
 				}
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 	 */
414 414
 	private function loadConfiguration() {
415 415
 		$this->p('Loading configuration');
416
-		$configuration = file_get_contents(__DIR__ . '/../../testConfiguration.json');
416
+		$configuration = file_get_contents(__DIR__.'/../../testConfiguration.json');
417 417
 		$this->config = json_decode($configuration, true);
418 418
 		$this->r(true, 'testConfiguration.json');
419 419
 
@@ -446,22 +446,22 @@  discard block
 block discarded – undo
446 446
 		$this->r();
447 447
 
448 448
 		foreach ($this->getInstances() as $instance) {
449
-			$this->p('Creating users on ' . $instance);
449
+			$this->p('Creating users on '.$instance);
450 450
 			foreach ($this->getConfigArray($instance, 'users') as $userId) {
451 451
 				$this->pm($userId);
452 452
 				$this->occ(
453
-					$instance, 'user:add --password-from-env ' . $userId, false, false,
453
+					$instance, 'user:add --password-from-env '.$userId, false, false,
454 454
 					['OC_PASS' => 'testtest']
455 455
 				);
456 456
 			}
457 457
 			$this->r();
458 458
 
459 459
 			foreach ($this->getConfigArray($instance, 'groups') as $groupId => $users) {
460
-				$this->p('Creating group <info>' . $groupId . '</info> on <info>' . $instance . '</info>');
461
-				$this->occ($instance, 'group:add ' . $groupId, false, false);
460
+				$this->p('Creating group <info>'.$groupId.'</info> on <info>'.$instance.'</info>');
461
+				$this->occ($instance, 'group:add '.$groupId, false, false);
462 462
 				foreach ($users as $userId) {
463 463
 					$this->pm($userId);
464
-					$this->occ($instance, 'group:adduser ' . $groupId . ' ' . $userId, true, false);
464
+					$this->occ($instance, 'group:adduser '.$groupId.' '.$userId, true, false);
465 465
 				}
466 466
 				$this->r();
467 467
 			}
@@ -495,7 +495,7 @@  discard block
 block discarded – undo
495 495
 		foreach ($this->getInstances(true) as $instance) {
496 496
 			$this->pm($instance);
497 497
 			foreach ($this->getConfigArray($instance, 'config') as $k => $v) {
498
-				$this->occ($instance, 'config:app:set --value ' . $v . ' circles ' . $k, true, false);
498
+				$this->occ($instance, 'config:app:set --value '.$v.' circles '.$k, true, false);
499 499
 			}
500 500
 		}
501 501
 		$this->r();
@@ -508,7 +508,7 @@  discard block
 block discarded – undo
508 508
 	 */
509 509
 	private function confirmVersion() {
510 510
 		$version = $this->configService->getAppValue('installed_version');
511
-		$this->p('Confirming version <info>' . $version . '</info>');
511
+		$this->p('Confirming version <info>'.$version.'</info>');
512 512
 		foreach ($this->getInstances(false) as $instance) {
513 513
 			$this->pm($instance);
514 514
 			$capabilities = $this->occ($instance, 'circles:check --capabilities');
@@ -559,12 +559,12 @@  discard block
 block discarded – undo
559 559
 	 */
560 560
 	private function statusFreshInstances() {
561 561
 		foreach ($this->getInstances() as $instanceId) {
562
-			$this->p('Circles on ' . $instanceId);
562
+			$this->p('Circles on '.$instanceId);
563 563
 			$result = $this->occ($instanceId, 'circles:manage:list --all');
564 564
 			$expectedSize = sizeof($this->getConfigArray($instanceId, 'groups'))
565 565
 							+ sizeof($this->getConfigArray($instanceId, 'users'))
566 566
 							+ 1;
567
-			$this->r((sizeof($result) === $expectedSize), sizeof($result) . ' circles');
567
+			$this->r((sizeof($result) === $expectedSize), sizeof($result).' circles');
568 568
 
569 569
 			$membersList = $groupsList = [];
570 570
 			foreach ($result as $item) {
@@ -583,12 +583,12 @@  discard block
 block discarded – undo
583 583
 			$instance = $this->getConfig($instanceId, 'config.frontal_cloud_id');
584 584
 
585 585
 			foreach ($this->getConfigArray($instanceId, 'users') as $userId) {
586
-				$this->p('Checking Single Circle for <comment>' . $userId . '@' . $instance . '</comment>');
586
+				$this->p('Checking Single Circle for <comment>'.$userId.'@'.$instance.'</comment>');
587 587
 				$circle = $this->getSingleCircleForMember($membersList, $userId, $instance);
588 588
 
589 589
 				$compareToOwnerBasedOn = new Circle();
590 590
 				$compareToOwnerBasedOn->setConfig(Circle::CFG_SINGLE)
591
-									  ->setName('user:' . $userId . ':{CIRCLEID}')
591
+									  ->setName('user:'.$userId.':{CIRCLEID}')
592 592
 									  ->setDisplayName($userId);
593 593
 
594 594
 				$compareToOwner = new Member();
@@ -606,7 +606,7 @@  discard block
 block discarded – undo
606 606
 				$compareTo = new Circle();
607 607
 				$compareTo->setOwner($compareToOwner)
608 608
 						  ->setConfig(Circle::CFG_SINGLE)
609
-						  ->setName('user:' . $userId . ':{CIRCLEID}')
609
+						  ->setName('user:'.$userId.':{CIRCLEID}')
610 610
 						  ->setDisplayName($userId);
611 611
 
612 612
 				$this->confirmCircleData($circle, $compareTo);
@@ -643,8 +643,8 @@  discard block
 block discarded – undo
643 643
 			$this->r(true, $circle->getSingleId());
644 644
 
645 645
 			foreach ($this->getConfigArray($instanceId, 'groups') as $groupId => $members) {
646
-				$this->p('Checking Circle for <comment>' . $groupId . '@' . $instance . '</comment>');
647
-				$circle = $this->getCircleFromList($groupsList, 'group:' . $groupId);
646
+				$this->p('Checking Circle for <comment>'.$groupId.'@'.$instance.'</comment>');
647
+				$circle = $this->getCircleFromList($groupsList, 'group:'.$groupId);
648 648
 
649 649
 				$appCircle = $this->getSingleCircleForMember($membersList, 'circles', $instance);
650 650
 				$appOwner = $appCircle->getOwner();
@@ -668,7 +668,7 @@  discard block
 block discarded – undo
668 668
 				$compareTo = new Circle();
669 669
 				$compareTo->setOwner($compareToOwner)
670 670
 						  ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN)
671
-						  ->setName('group:' . $groupId)
671
+						  ->setName('group:'.$groupId)
672 672
 						  ->setDisplayName($groupId);
673 673
 
674 674
 				$this->confirmCircleData($circle, $compareTo);
@@ -685,12 +685,12 @@  discard block
 block discarded – undo
685 685
 	 */
686 686
 	private function createRemoteLink() {
687 687
 		foreach ($this->getInstances() as $instanceId) {
688
-			$this->p('Init remote link from ' . $instanceId);
688
+			$this->p('Init remote link from '.$instanceId);
689 689
 			$links = $this->getConfigArray($instanceId, 'remote');
690 690
 			foreach ($links as $link => $type) {
691 691
 				$remote = $this->getConfig($link, 'config.frontal_cloud_id');
692
-				$this->pm($remote . '(' . $type . ')');
693
-				$this->occ($instanceId, 'circles:remote ' . $remote . ' --type ' . $type . ' --yes');
692
+				$this->pm($remote.'('.$type.')');
693
+				$this->occ($instanceId, 'circles:remote '.$remote.' --type '.$type.' --yes');
694 694
 			}
695 695
 			$this->r();
696 696
 		}
@@ -704,7 +704,7 @@  discard block
 block discarded – undo
704 704
 	private function buildingLocalDatabase() {
705 705
 		$this->circles = $this->federatedUsers = [];
706 706
 		foreach ($this->getInstances() as $instanceId) {
707
-			$this->p('Retrieving Circles from ' . $instanceId);
707
+			$this->p('Retrieving Circles from '.$instanceId);
708 708
 			$circles = $this->occ($instanceId, 'circles:manage:list --all');
709 709
 			foreach ($circles as $item) {
710 710
 				/** @var Circle $circle */
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
 		$name = self::$TEST_CIRCLES[0];
740 740
 		$owner = $this->getInstanceUsers($localInstanceId)[1];
741 741
 		$dataCreatedCircle001 =
742
-			$this->occ($localInstanceId, 'circles:manage:create --type user ' . $owner . ' ' . $name);
742
+			$this->occ($localInstanceId, 'circles:manage:create --type user '.$owner.' '.$name);
743 743
 		/** @var Circle $createdCircle */
744 744
 		$createdCircle = $this->deserialize($dataCreatedCircle001, Circle::class);
745 745
 		$this->circles[$localInstanceId][$createdCircle->getName()] = $createdCircle;
@@ -771,7 +771,7 @@  discard block
 block discarded – undo
771 771
 
772 772
 
773 773
 		$this->p('Comparing local stored data');
774
-		$dataCircle = $this->occ($localInstanceId, 'circle:manage:details ' . $createdCircle->getSingleId());
774
+		$dataCircle = $this->occ($localInstanceId, 'circle:manage:details '.$createdCircle->getSingleId());
775 775
 
776 776
 		/** @var Circle $tmpCircle */
777 777
 		$tmpCircle = $this->deserialize($dataCircle, Circle::class);
@@ -780,9 +780,9 @@  discard block
 block discarded – undo
780 780
 
781 781
 		$links = $this->getConfigArray('global-scale-1', 'remote');
782 782
 		foreach ($this->getInstances(false) as $instanceId) {
783
-			$this->p('Comparing data stored on ' . $instanceId);
783
+			$this->p('Comparing data stored on '.$instanceId);
784 784
 			$dataCircle =
785
-				$this->occ($instanceId, 'circle:manage:details ' . $createdCircle->getSingleId(), false);
785
+				$this->occ($instanceId, 'circle:manage:details '.$createdCircle->getSingleId(), false);
786 786
 
787 787
 			if ($instanceId === $localInstanceId || $links[$instanceId] === 'GlobalScale') {
788 788
 				/** @var Circle $tmpCircle */
@@ -835,11 +835,11 @@  discard block
 block discarded – undo
835 835
 		$name = self::$TEST_CIRCLES[0];
836 836
 		$circle = $this->getCircleByName($localInstanceId, $name);
837 837
 		$userId = $this->getInstanceUsers($localInstanceId)[6];
838
-		$userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId);
838
+		$userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId);
839 839
 		$user = $userCircle->getOwner();
840 840
 		$dataAddedMember =
841 841
 			$this->occ(
842
-				$localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId()
842
+				$localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId()
843 843
 			);
844 844
 		/** @var Member $addedMember */
845 845
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
@@ -859,11 +859,11 @@  discard block
 block discarded – undo
859 859
 
860 860
 		$circle = $this->getCircleByName($localInstanceId, $circleName);
861 861
 		$userId = $this->getInstanceUsers($localInstanceId)[6];
862
-		$userCircle = $this->getCircleByName($localInstanceId, 'user:' . $userId);
862
+		$userCircle = $this->getCircleByName($localInstanceId, 'user:'.$userId);
863 863
 		$user = $userCircle->getOwner();
864 864
 		$dataAddedMember =
865 865
 			$this->occ(
866
-				$localInstanceId, 'circles:members:add ' . $circle->getSingleId() . ' ' . $user->getSingleId()
866
+				$localInstanceId, 'circles:members:add '.$circle->getSingleId().' '.$user->getSingleId()
867 867
 			);
868 868
 		/** @var Member $addedMember */
869 869
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
@@ -957,13 +957,13 @@  discard block
 block discarded – undo
957 957
 			];
958 958
 		}
959 959
 
960
-		$this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix . '.id', $params);
961
-		$this->compare($compareTo->getName(), $circle->getName(), $prefix . '.name', $params);
960
+		$this->compare($compareTo->getSingleId(), $circle->getSingleId(), $prefix.'.id', $params);
961
+		$this->compare($compareTo->getName(), $circle->getName(), $prefix.'.name', $params);
962 962
 		$this->compare(
963
-			$compareTo->getDisplayName(), $circle->getDisplayName(), $prefix . '.displayName', $params
963
+			$compareTo->getDisplayName(), $circle->getDisplayName(), $prefix.'.displayName', $params
964 964
 		);
965
-		$this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix . '.config', true);
966
-		$this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix . '.source');
965
+		$this->compareInt($compareTo->getConfig(), $circle->getConfig(), $prefix.'.config', true);
966
+		$this->compareInt($compareTo->getSource(), $circle->getSource(), $prefix.'.source');
967 967
 
968 968
 		if ($compareTo->hasOwner()) {
969 969
 			$compareToOwner = $compareTo->getOwner();
@@ -973,7 +973,7 @@  discard block
 block discarded – undo
973 973
 					throw new Exception('empty owner');
974 974
 				}
975 975
 				if ($owner->getCircleId() !== $circle->getSingleId()) {
976
-					throw new Exception($prefix . '.owner.circleId is different than ' . $prefix . '.id');
976
+					throw new Exception($prefix.'.owner.circleId is different than '.$prefix.'.id');
977 977
 				}
978 978
 				$this->confirmMemberData($owner, $compareToOwner, 'owner', false, $params);
979 979
 			}
@@ -986,7 +986,7 @@  discard block
 block discarded – undo
986 986
 				}
987 987
 				$initiator = $circle->getInitiator();
988 988
 				if ($initiator->getCircleId() !== $circle->getSingleId()) {
989
-					throw new Exception($prefix . '.initiator.circleId is different than ' . $prefix . '.id');
989
+					throw new Exception($prefix.'.initiator.circleId is different than '.$prefix.'.id');
990 990
 				}
991 991
 				$this->confirmMemberData($initiator, $compareToInitiator, 'owner', false, $params);
992 992
 			}
@@ -1013,27 +1013,27 @@  discard block
 block discarded – undo
1013 1013
 		bool $versa = false,
1014 1014
 		array $params = []
1015 1015
 	) {
1016
-		$this->compare($compareTo->getId(), $member->getId(), $prefix . '.id', $params);
1017
-		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix . '.circleId', $params);
1018
-		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix . '.singleId', $params);
1019
-		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix . '.userId', $params);
1016
+		$this->compare($compareTo->getId(), $member->getId(), $prefix.'.id', $params);
1017
+		$this->compare($compareTo->getCircleId(), $member->getCircleId(), $prefix.'.circleId', $params);
1018
+		$this->compare($compareTo->getSingleId(), $member->getSingleId(), $prefix.'.singleId', $params);
1019
+		$this->compare($compareTo->getUserId(), $member->getUserId(), $prefix.'.userId', $params);
1020 1020
 		$this->compare(
1021
-			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix . '.displayName', $params
1021
+			$compareTo->getDisplayName(), $member->getDisplayName(), $prefix.'.displayName', $params
1022 1022
 		);
1023
-		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix . '.userType');
1024
-		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix . '.instance', $params);
1025
-		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix . '.level', true);
1026
-		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix . '.status', $params);
1023
+		$this->compareInt($compareTo->getUserType(), $member->getUserType(), $prefix.'.userType');
1024
+		$this->compare($compareTo->getInstance(), $member->getInstance(), $prefix.'.instance', $params);
1025
+		$this->compareInt($compareTo->getLevel(), $member->getLevel(), $prefix.'.level', true);
1026
+		$this->compare($compareTo->getStatus(), $member->getStatus(), $prefix.'.status', $params);
1027 1027
 
1028 1028
 		if ($compareTo->hasBasedOn()) {
1029 1029
 			if (!$member->hasBasedOn()) {
1030
-				throw new Exception('empty ' . $prefix . '.basedOn');
1030
+				throw new Exception('empty '.$prefix.'.basedOn');
1031 1031
 			}
1032 1032
 			$basedOn = $member->getBasedOn();
1033 1033
 			$this->confirmCircleData(
1034 1034
 				$basedOn,
1035 1035
 				$compareTo->getBasedOn(),
1036
-				$prefix . '.basedOn',
1036
+				$prefix.'.basedOn',
1037 1037
 				false,
1038 1038
 				$params
1039 1039
 			);
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 	private function compare(string $expected, string $compare, string $def, array $params) {
1053 1053
 		if ($expected !== ''
1054 1054
 			&& $this->feedStringWithParams($expected, $params) !== $compare) {
1055
-			throw new Exception($def . ': ' . $compare . ' (' . $expected . ')');
1055
+			throw new Exception($def.': '.$compare.' ('.$expected.')');
1056 1056
 		}
1057 1057
 	}
1058 1058
 
@@ -1068,7 +1068,7 @@  discard block
 block discarded – undo
1068 1068
 	private function compareInt(int $expected, int $compare, string $def, bool $force = false) {
1069 1069
 		if (($expected > 0 || ($force && $expected >= 0))
1070 1070
 			&& $expected !== $compare) {
1071
-			throw new Exception('wrong ' . $def . ': ' . $compare . ' (' . $expected . ')');
1071
+			throw new Exception('wrong '.$def.': '.$compare.' ('.$expected.')');
1072 1072
 		}
1073 1073
 	}
1074 1074
 
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
 			}
1105 1105
 		}
1106 1106
 
1107
-		throw new CircleNotFoundException('cannot find ' . $userId . ' in the list of Single Circle');
1107
+		throw new CircleNotFoundException('cannot find '.$userId.' in the list of Single Circle');
1108 1108
 	}
1109 1109
 
1110 1110
 
@@ -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 generated Circles'
1125
+			'cannot extract \''.$name.'\' from the list of generated Circles'
1126 1126
 		);
1127 1127
 	}
1128 1128
 
@@ -1142,7 +1142,7 @@  discard block
 block discarded – undo
1142 1142
 		}
1143 1143
 
1144 1144
 		throw new CircleNotFoundException(
1145
-			'cannot extract  \'' . $name . '\' from the list of provided Circles'
1145
+			'cannot extract  \''.$name.'\' from the list of provided Circles'
1146 1146
 		);
1147 1147
 	}
1148 1148
 
@@ -1187,7 +1187,7 @@  discard block
 block discarded – undo
1187 1187
 			}
1188 1188
 		}
1189 1189
 
1190
-		throw new ItemNotFoundException($instance . ' not found');
1190
+		throw new ItemNotFoundException($instance.' not found');
1191 1191
 	}
1192 1192
 
1193 1193
 
@@ -1222,7 +1222,7 @@  discard block
 block discarded – undo
1222 1222
 	): ?array {
1223 1223
 		$configInstance = $this->getConfigInstance($instance);
1224 1224
 		$path = $this->get('path', $configInstance);
1225
-		$occ = rtrim($path, '/') . '/occ';
1225
+		$occ = rtrim($path, '/').'/occ';
1226 1226
 
1227 1227
 		$command = array_merge([$occ], explode(' ', $cmd));
1228 1228
 		if ($jsonAsOutput) {
@@ -1232,7 +1232,7 @@  discard block
 block discarded – undo
1232 1232
 		$process->run(null, $env);
1233 1233
 
1234 1234
 		if ($exceptionOnFail && !$process->isSuccessful()) {
1235
-			throw new Exception(implode(' ', $command) . ' failed');
1235
+			throw new Exception(implode(' ', $command).' failed');
1236 1236
 		}
1237 1237
 
1238 1238
 		$output = json_decode($process->getOutput(), true);
@@ -1255,7 +1255,7 @@  discard block
 block discarded – undo
1255 1255
 	 */
1256 1256
 	private function t(string $title): void {
1257 1257
 		$this->output->writeln('');
1258
-		$this->output->writeln('<comment>### ' . $title . '</comment>');
1258
+		$this->output->writeln('<comment>### '.$title.'</comment>');
1259 1259
 		$this->output->writeln('');
1260 1260
 	}
1261 1261
 
@@ -1264,14 +1264,14 @@  discard block
 block discarded – undo
1264 1264
 	 */
1265 1265
 	private function p(string $processing): void {
1266 1266
 		$this->pOn = true;
1267
-		$this->output->write('- ' . $processing . ': ');
1267
+		$this->output->write('- '.$processing.': ');
1268 1268
 	}
1269 1269
 
1270 1270
 	/**
1271 1271
 	 * @param string $more
1272 1272
 	 */
1273 1273
 	private function pm(string $more): void {
1274
-		$this->output->write($more . ' ');
1274
+		$this->output->write($more.' ');
1275 1275
 	}
1276 1276
 
1277 1277
 	/**
@@ -1281,9 +1281,9 @@  discard block
 block discarded – undo
1281 1281
 	private function r(bool $result = true, string $info = ''): void {
1282 1282
 		$this->pOn = false;
1283 1283
 		if ($result) {
1284
-			$this->output->writeln('<info>' . (($info !== '') ? $info : 'done') . '</info>');
1284
+			$this->output->writeln('<info>'.(($info !== '') ? $info : 'done').'</info>');
1285 1285
 		} else {
1286
-			$this->output->writeln('<error>' . (($info !== '') ? $info : 'done') . '</error>');
1286
+			$this->output->writeln('<error>'.(($info !== '') ? $info : 'done').'</error>');
1287 1287
 		}
1288 1288
 	}
1289 1289
 
@@ -1305,16 +1305,16 @@  discard block
 block discarded – undo
1305 1305
 		$dataAddedMember =
1306 1306
 			$this->occ(
1307 1307
 				$instanceId,
1308
-				'circles:members:add ' . $circle->getSingleId() . ' ' . $userId . ' --type ' . $type
1308
+				'circles:members:add '.$circle->getSingleId().' '.$userId.' --type '.$type
1309 1309
 			);
1310 1310
 		/** @var Member $addedMember */
1311 1311
 		$addedMember = $this->deserialize($dataAddedMember, Member::class);
1312 1312
 
1313 1313
 
1314
-		echo 'ADDEDMEMBER: ' . json_encode($addedMember, JSON_PRETTY_PRINT) . "\n";
1314
+		echo 'ADDEDMEMBER: '.json_encode($addedMember, JSON_PRETTY_PRINT)."\n";
1315 1315
 
1316 1316
 		$federatedUser = $this->federatedUsers[$instanceId][$userId];
1317
-		echo 'FEDERATEDUER: ' . json_encode($federatedUser, JSON_PRETTY_PRINT) . "\n";
1317
+		echo 'FEDERATEDUER: '.json_encode($federatedUser, JSON_PRETTY_PRINT)."\n";
1318 1318
 
1319 1319
 		return $addedMember;
1320 1320
 	}
Please login to merge, or discard this patch.
lib/Command/MembersList.php 1 patch
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
188 188
 			$circle = $this->circleService->getCircle($circleId);
189 189
 
190
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
190
+			$output->writeln('<info>Name</info>: '.$circle->getName());
191 191
 			$owner = $circle->getOwner();
192
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
192
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
193 193
 			$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
194
-			$output->writeln('<info>Config</info>: ' . $type);
194
+			$output->writeln('<info>Config</info>: '.$type);
195 195
 			$output->writeln(' ');
196 196
 
197 197
 			$tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -258,8 +258,7 @@  discard block
 block discarded – undo
258 258
 						), 40
259 259
 					),
260 260
 					$this->configService->displayInstance($member->getInstance()),
261
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
262
-						'(' . strtolower($member->getStatus()) . ')',
261
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
263 262
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
264 263
 						$member->getInvitedBy(), $this->input->getOption('display-name')
265 264
 					) : 'Unknown'
@@ -424,14 +423,14 @@  discard block
 block discarded – undo
424 423
 				$member = $data->gObj('member', Member::class);
425 424
 
426 425
 				if ($lineNumber === 1) {
427
-					$line .= '<info>' . $member->getSingleId() . '</info>';
426
+					$line .= '<info>'.$member->getSingleId().'</info>';
428 427
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
429
-						$line .= '@' . $member->getInstance();
428
+						$line .= '@'.$member->getInstance();
430 429
 					}
431
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
430
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
432 431
 
433
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
434
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
432
+					$line .= ' <info>MemberId</info>: '.$member->getId();
433
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
435 434
 							$member,
436 435
 							$this->input->getOption('display-name')
437 436
 						);
@@ -439,7 +438,7 @@  discard block
 block discarded – undo
439 438
 						$line .= ' <info>Source</info>: '
440 439
 								 . Circle::$DEF_SOURCE[$member->getBasedOn()->getSource()];
441 440
 					} else {
442
-						$line .= ' <info>Type</info>: ' . Member::$TYPE[$member->getUserType()];
441
+						$line .= ' <info>Type</info>: '.Member::$TYPE[$member->getUserType()];
443 442
 					}
444 443
 				}
445 444
 
@@ -452,15 +451,15 @@  discard block
 block discarded – undo
452 451
 						return $line;
453 452
 					}
454 453
 					$owner = $circle->getOwner();
455
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
454
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
456 455
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
457
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
456
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
458 457
 				}
459 458
 			} else {
460 459
 				if ($lineNumber === 1 && !is_null($circle)) {
461
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
460
+					$line .= '<info>'.$circle->getSingleId().'</info>';
462 461
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
463
-						$line .= '@' . $circle->getInstance();
462
+						$line .= '@'.$circle->getInstance();
464 463
 					}
465 464
 				}
466 465
 			}
Please login to merge, or discard this patch.
lib/Service/InterfaceService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -409,12 +409,12 @@  discard block
 block discarded – undo
409 409
 			throw new UnknownInterfaceException('misconfigured scheme');
410 410
 		}
411 411
 
412
-		$base = $scheme . '://' . $this->getCloudInstance($interface) . $path;
412
+		$base = $scheme.'://'.$this->getCloudInstance($interface).$path;
413 413
 		if ($route === '') {
414 414
 			return $base;
415 415
 		}
416 416
 
417
-		return $base . $this->configService->linkToRoute($route, $args);
417
+		return $base.$this->configService->linkToRoute($route, $args);
418 418
 	}
419 419
 
420 420
 
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 			return $this->configService->getLoopbackPath($route, $args);
448 448
 		}
449 449
 
450
-		return rtrim($base, '/') . $this->configService->linkToRoute($route, $args);
450
+		return rtrim($base, '/').$this->configService->linkToRoute($route, $args);
451 451
 	}
452 452
 
453 453
 
Please login to merge, or discard this patch.
lib/Command/CirclesCheck.php 1 patch
Spacing   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 			throw new Exception('Please specify a --type for the test');
178 178
 		}
179 179
 		if ($test !== '' && !in_array($type, self::$checks)) {
180
-			throw new Exception('Unknown type: ' . implode(', ', self::$checks));
180
+			throw new Exception('Unknown type: '.implode(', ', self::$checks));
181 181
 		}
182 182
 
183 183
 //		$this->configService->setAppValue(ConfigService::TEST_NC_BASE, $test);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		}
236 236
 
237 237
 		$output->writeln('');
238
-		$output->writeln('* testing current address: ' . $test);
238
+		$output->writeln('* testing current address: '.$test);
239 239
 
240 240
 		try {
241 241
 			$this->setupLoopback($input, $output, $test);
@@ -271,8 +271,8 @@  discard block
 block discarded – undo
271 271
 				continue;
272 272
 			}
273 273
 
274
-			$loopback = rtrim($scheme . '://' . $cloudId . $path, '/');
275
-			$output->writeln('* testing address: ' . $loopback . ' ');
274
+			$loopback = rtrim($scheme.'://'.$cloudId.$path, '/');
275
+			$output->writeln('* testing address: '.$loopback.' ');
276 276
 
277 277
 			try {
278 278
 				$this->setupLoopback($input, $output, $loopback);
@@ -344,7 +344,7 @@  discard block
 block discarded – undo
344 344
 		$test = new FederatedEvent(LoopbackTest::class);
345 345
 		$this->federatedEventService->newEvent($test);
346 346
 
347
-		$output->writeln('<info>' . $test->getWrapperToken() . '</info>');
347
+		$output->writeln('<info>'.$test->getWrapperToken().'</info>');
348 348
 
349 349
 		$output->writeln('- Waiting for async process to finish (5s)');
350 350
 		sleep(5);
@@ -359,18 +359,18 @@  discard block
 block discarded – undo
359 359
 
360 360
 		$checkVerify = $wrapper->getEvent()->getData()->gInt('verify');
361 361
 		if ($checkVerify === LoopbackTest::VERIFY) {
362
-			$output->write('<info>verify=' . $checkVerify . '</info> ');
362
+			$output->write('<info>verify='.$checkVerify.'</info> ');
363 363
 		} else {
364
-			$output->writeln('<error>verify=' . $checkVerify . '</error>');
364
+			$output->writeln('<error>verify='.$checkVerify.'</error>');
365 365
 
366 366
 			return false;
367 367
 		}
368 368
 
369 369
 		$checkManage = $wrapper->getResult()->gInt('manage');
370 370
 		if ($checkManage === LoopbackTest::MANAGE) {
371
-			$output->write('<info>manage=' . $checkManage . '</info> ');
371
+			$output->write('<info>manage='.$checkManage.'</info> ');
372 372
 		} else {
373
-			$output->writeln('<error>manage=' . $checkManage . '</error>');
373
+			$output->writeln('<error>manage='.$checkManage.'</error>');
374 374
 
375 375
 			return false;
376 376
 		}
@@ -392,7 +392,7 @@  discard block
 block discarded – undo
392 392
 		[$scheme, $cloudId, $path] = $this->parseAddress($loopback);
393 393
 
394 394
 		$question = new ConfirmationQuestion(
395
-			'- Do you want to save <info>' . $loopback
395
+			'- Do you want to save <info>'.$loopback
396 396
 			. '</info> as your <info>loopback</info> address ? (y/N) ', false, '/^(y|Y)/i'
397 397
 		);
398 398
 
@@ -407,7 +407,7 @@  discard block
 block discarded – undo
407 407
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_ID, $cloudId);
408 408
 		$this->configService->setAppValue(ConfigService::LOOPBACK_CLOUD_PATH, $path);
409 409
 		$output->writeln(
410
-			'- Address <info>' . $loopback . '</info> is now used as <info>loopback</info>'
410
+			'- Address <info>'.$loopback.'</info> is now used as <info>loopback</info>'
411 411
 		);
412 412
 	}
413 413
 
@@ -459,8 +459,8 @@  discard block
 block discarded – undo
459 459
 				continue;
460 460
 			}
461 461
 
462
-			$internal = rtrim($scheme . '://' . $cloudId, '/');
463
-			$fullInternal = rtrim($scheme . '://' . $cloudId . $path, '/');
462
+			$internal = rtrim($scheme.'://'.$cloudId, '/');
463
+			$fullInternal = rtrim($scheme.'://'.$cloudId.$path, '/');
464 464
 
465 465
 			$question = new ConfirmationQuestion(
466 466
 				'<comment>Do you want to check the validity of this internal address?</comment> (Y/n) ', true,
@@ -479,9 +479,9 @@  discard block
 block discarded – undo
479 479
 					'You will need to run this <info>curl</info> command from a terminal on your local network and paste its result: '
480 480
 				);
481 481
 				$output->writeln(
482
-					'     curl -L "' . $internal
482
+					'     curl -L "'.$internal
483 483
 					. '/.well-known/webfinger?resource=http://nextcloud.com/&test='
484
-					. $testToken . '"'
484
+					. $testToken.'"'
485 485
 				);
486 486
 
487 487
 				$output->writeln('paste the result here: ');
@@ -515,7 +515,7 @@  discard block
 block discarded – undo
515 515
 
516 516
 				if ($pastedHref !== $href) {
517 517
 					$output->writeln(
518
-						'<error>The returned data (' . $pastedHref . ') are not the one expected: </error>'
518
+						'<error>The returned data ('.$pastedHref.') are not the one expected: </error>'
519 519
 						. $href
520 520
 					);
521 521
 					continue;
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 					'Now, please run this <info>curl</info> command from a terminal on your local network and paste its result: '
528 528
 				);
529 529
 				$output->writeln(
530
-					'     curl -L "' . $pastedHref . '?test=' . $testToken . '" -H "Accept: application/json"'
530
+					'     curl -L "'.$pastedHref.'?test='.$testToken.'" -H "Accept: application/json"'
531 531
 				);
532 532
 
533 533
 				$output->writeln('paste the result here: ');
@@ -544,9 +544,9 @@  discard block
 block discarded – undo
544 544
 					|| $appSignatory->getRoot() !== $pastedSignatory->g('root')) {
545 545
 					$output->writeln(
546 546
 						'<error>The returned data ('
547
-						. $pastedSignatory->g('uid') . '/' . $pastedSignatory->g('root')
547
+						. $pastedSignatory->g('uid').'/'.$pastedSignatory->g('root')
548 548
 						. ') are not the one expected: </error>'
549
-						. $appSignatory->getUid(true) . '/' . $appSignatory->getRoot()
549
+						. $appSignatory->getUid(true).'/'.$appSignatory->getRoot()
550 550
 					);
551 551
 					continue;
552 552
 				}
@@ -573,7 +573,7 @@  discard block
 block discarded – undo
573 573
 
574 574
 		$output->writeln('');
575 575
 		$question = new ConfirmationQuestion(
576
-			'- Do you want to save <info>' . $internal
576
+			'- Do you want to save <info>'.$internal
577 577
 			. '</info> as your <info>internal</info> address ? (y/N) ', false, '/^(y|Y)/i'
578 578
 		);
579 579
 
@@ -589,7 +589,7 @@  discard block
 block discarded – undo
589 589
 		$this->configService->setAppValue(ConfigService::INTERNAL_CLOUD_PATH, $path);
590 590
 
591 591
 		$output->writeln(
592
-			'- Address <info>' . $internal . '</info> is now used as <info>internal</info>'
592
+			'- Address <info>'.$internal.'</info> is now used as <info>internal</info>'
593 593
 		);
594 594
 	}
595 595
 
@@ -642,7 +642,7 @@  discard block
 block discarded – undo
642 642
 				continue;
643 643
 			}
644 644
 
645
-			$frontal = rtrim($scheme . '://' . $cloudId . $path, '/');
645
+			$frontal = rtrim($scheme.'://'.$cloudId.$path, '/');
646 646
 			break;
647 647
 		}
648 648
 
@@ -656,13 +656,13 @@  discard block
 block discarded – undo
656 656
 				'You will need to run this <info>curl</info> command from a remote terminal and paste its result: '
657 657
 			);
658 658
 			$output->writeln(
659
-				'     curl ' . $frontal . '/.well-known/webfinger?resource=http://nextcloud.com/'
659
+				'     curl '.$frontal.'/.well-known/webfinger?resource=http://nextcloud.com/'
660 660
 			);
661 661
 
662 662
 			$question = new Question('result: ', '');
663 663
 			$pasteWebfinger = $helper->ask($input, $output, $question);
664 664
 
665
-			echo '__ ' . $pasteWebfinger;
665
+			echo '__ '.$pasteWebfinger;
666 666
 
667 667
 			$output->writeln('TESTING !!');
668 668
 			$output->writeln('TESTING !!');
@@ -789,7 +789,7 @@  discard block
 block discarded – undo
789 789
 			$request->setDataSerialize(new SimpleDataStore(['empty' => 1]));
790 790
 		}
791 791
 
792
-		$output->write('- ' . $type . ' request on ' . $request->getCompleteUrl() . ': ');
792
+		$output->write('- '.$type.' request on '.$request->getCompleteUrl().': ');
793 793
 
794 794
 		try {
795 795
 			$this->doRequest($request);
@@ -800,7 +800,7 @@  discard block
 block discarded – undo
800 800
 				$color = 'info';
801 801
 			}
802 802
 
803
-			$output->writeln('<' . $color . '>' . $result->getStatusCode() . '</' . $color . '>');
803
+			$output->writeln('<'.$color.'>'.$result->getStatusCode().'</'.$color.'>');
804 804
 			if ($result->getStatusCode() === 200) {
805 805
 				return true;
806 806
 			}
@@ -824,7 +824,7 @@  discard block
 block discarded – undo
824 824
 
825 825
 		$output->writeln('');
826 826
 		$output->writeln(
827
-			'The address <info>' . $address . '</info> seems to reach your local Nextcloud.'
827
+			'The address <info>'.$address.'</info> seems to reach your local Nextcloud.'
828 828
 		);
829 829
 
830 830
 		$helper = $this->getHelper('question');
@@ -841,8 +841,8 @@  discard block
 block discarded – undo
841 841
 
842 842
 		$this->configService->setAppValue(ConfigService::FORCE_NC_BASE, $address);
843 843
 		$output->writeln(
844
-			'New configuration <info>' . Application::APP_ID . '.' . ConfigService::FORCE_NC_BASE . '=\''
845
-			. $address . '\'</info> stored in database'
844
+			'New configuration <info>'.Application::APP_ID.'.'.ConfigService::FORCE_NC_BASE.'=\''
845
+			. $address.'\'</info> stored in database'
846 846
 		);
847 847
 	}
848 848
 
@@ -870,7 +870,7 @@  discard block
 block discarded – undo
870 870
 		$path = rtrim($path, '/');
871 871
 
872 872
 		if (!is_null($cloudIdPort)) {
873
-			$cloudId = $cloudId . ':' . $cloudIdPort;
873
+			$cloudId = $cloudId.':'.$cloudIdPort;
874 874
 		}
875 875
 
876 876
 		return [$scheme, $cloudId, $path];
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -223,7 +223,7 @@  discard block
 block discarded – undo
223 223
 			return $value;
224 224
 		}
225 225
 
226
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
226
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
227 227
 			return $value;
228 228
 		}
229 229
 
@@ -442,7 +442,7 @@  discard block
 block discarded – undo
442 442
 	 */
443 443
 	public function getTrustedDomains(): array {
444 444
 		return array_map(
445
-			function (string $address) {
445
+			function(string $address) {
446 446
 				return strtolower($address);
447 447
 			}, $this->config->getSystemValue('trusted_domains', [])
448 448
 		);
@@ -478,7 +478,7 @@  discard block
 block discarded – undo
478 478
 		}
479 479
 
480 480
 		if (array_key_exists('port', $loopback)) {
481
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
481
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
482 482
 		} else {
483 483
 			$loopbackCloudId = $loopback['host'];
484 484
 		}
@@ -517,13 +517,13 @@  discard block
 block discarded – undo
517 517
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
518 518
 		}
519 519
 
520
-		$base = $scheme . '://' . $instance . $path;
520
+		$base = $scheme.'://'.$instance.$path;
521 521
 
522 522
 		if ($route === '') {
523 523
 			return $base;
524 524
 		}
525 525
 
526
-		return rtrim($base, '/') . $this->linkToRoute($route, $args);
526
+		return rtrim($base, '/').$this->linkToRoute($route, $args);
527 527
 	}
528 528
 
529 529
 
@@ -624,10 +624,10 @@  discard block
 block discarded – undo
624 624
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
625 625
 
626 626
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
627
-			return $name . ' (' . $this->displayInstance($federatedUser->getInstance(), false) . ')';
627
+			return $name.' ('.$this->displayInstance($federatedUser->getInstance(), false).')';
628 628
 		}
629 629
 
630
-		return $name . $this->displayInstance($federatedUser->getInstance(), true);
630
+		return $name.$this->displayInstance($federatedUser->getInstance(), true);
631 631
 	}
632 632
 
633 633
 	/**
@@ -641,7 +641,7 @@  discard block
 block discarded – undo
641 641
 			return '';
642 642
 		}
643 643
 
644
-		return (($showAt) ? '@' : '') . $instance;
644
+		return (($showAt) ? '@' : '').$instance;
645 645
 	}
646 646
 
647 647
 
Please login to merge, or discard this patch.
lib/FederatedItems/SingleMemberAdd.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -338,10 +338,10 @@
 block discarded – undo
338 338
 	protected function generateMember(FederatedEvent $event, Circle $circle, Member $member): Member {
339 339
 		try {
340 340
 			if ($member->getSingleId() !== '') {
341
-				$userId = $member->getSingleId() . '@' . $member->getInstance();
341
+				$userId = $member->getSingleId().'@'.$member->getInstance();
342 342
 				$federatedUser = $this->federatedUserService->getFederatedUser($userId, Member::TYPE_SINGLE);
343 343
 			} else {
344
-				$userId = $member->getUserId() . '@' . $member->getInstance();
344
+				$userId = $member->getUserId().'@'.$member->getInstance();
345 345
 				$federatedUser = $this->federatedUserService->getFederatedUser(
346 346
 					$userId,
347 347
 					$member->getUserType()
Please login to merge, or discard this patch.
lib/Model/Circle.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -87,26 +87,26 @@  discard block
 block discarded – undo
87 87
 
88 88
 
89 89
 	// specific value
90
-	public const CFG_CIRCLE = 0;        // only for code readability. Circle is locked by default.
91
-	public const CFG_SINGLE = 1;        // Circle with only one single member.
92
-	public const CFG_PERSONAL = 2;      // Personal circle, only the owner can see it.
90
+	public const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default.
91
+	public const CFG_SINGLE = 1; // Circle with only one single member.
92
+	public const CFG_PERSONAL = 2; // Personal circle, only the owner can see it.
93 93
 
94 94
 	// bitwise
95
-	public const CFG_SYSTEM = 4;            // System Circle (not managed by the official front-end). Meaning some config are limited
96
-	public const CFG_VISIBLE = 8;           // Visible to everyone, if not visible, people have to know its name to be able to find it
97
-	public const CFG_OPEN = 16;             // Circle is open, people can join
98
-	public const CFG_INVITE = 32;           // Adding a member generate an invitation that needs to be accepted
99
-	public const CFG_REQUEST = 64;          // Request to join Circles needs to be confirmed by a moderator
100
-	public const CFG_FRIEND = 128;          // Members of the circle can invite their friends
101
-	public const CFG_PROTECTED = 256;       // Password protected to join/request
102
-	public const CFG_NO_OWNER = 512;        // no owner, only members
103
-	public const CFG_HIDDEN = 1024;         // hidden from listing, but available as a share entity
104
-	public const CFG_BACKEND = 2048;            // Fully hidden, only backend Circles
105
-	public const CFG_LOCAL = 4096;              // Local even on GlobalScale
106
-	public const CFG_ROOT = 8192;               // Circle cannot be inside another Circle
107
-	public const CFG_CIRCLE_INVITE = 16384;     // Circle must confirm when invited in another circle
108
-	public const CFG_FEDERATED = 32768;         // Federated
109
-	public const CFG_MOUNTPOINT = 65536;        // Generate a Files folder for this Circle
95
+	public const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited
96
+	public const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it
97
+	public const CFG_OPEN = 16; // Circle is open, people can join
98
+	public const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted
99
+	public const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator
100
+	public const CFG_FRIEND = 128; // Members of the circle can invite their friends
101
+	public const CFG_PROTECTED = 256; // Password protected to join/request
102
+	public const CFG_NO_OWNER = 512; // no owner, only members
103
+	public const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity
104
+	public const CFG_BACKEND = 2048; // Fully hidden, only backend Circles
105
+	public const CFG_LOCAL = 4096; // Local even on GlobalScale
106
+	public const CFG_ROOT = 8192; // Circle cannot be inside another Circle
107
+	public const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle
108
+	public const CFG_FEDERATED = 32768; // Federated
109
+	public const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle
110 110
 
111 111
 	public static $DEF_CFG_MAX = 131071;
112 112
 
@@ -469,7 +469,7 @@  discard block
 block discarded – undo
469 469
 	 */
470 470
 	public function addInheritedMembers(array $members): self {
471 471
 		$knownIds = array_map(
472
-			function (Member $member): string {
472
+			function(Member $member): string {
473 473
 				return $member->getId();
474 474
 			}, $this->inheritedMembers
475 475
 		);
@@ -842,24 +842,24 @@  discard block
 block discarded – undo
842 842
 	 * @throws CircleNotFoundException
843 843
 	 */
844 844
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
845
-		if ($this->get($prefix . 'unique_id', $data) === '') {
845
+		if ($this->get($prefix.'unique_id', $data) === '') {
846 846
 			throw new CircleNotFoundException();
847 847
 		}
848 848
 
849
-		$this->setSingleId($this->get($prefix . 'unique_id', $data))
850
-			 ->setName($this->get($prefix . 'name', $data))
851
-			 ->setDisplayName($this->get($prefix . 'display_name', $data))
852
-			 ->setSanitizedName($this->get($prefix . 'sanitized_name', $data))
853
-			 ->setConfig($this->getInt($prefix . 'config', $data))
854
-			 ->setSource($this->getInt($prefix . 'source', $data))
855
-			 ->setInstance($this->get($prefix . 'instance', $data))
856
-			 ->setPopulation($this->getInt($prefix . 'population', $data))
857
-			 ->setSettings($this->getArray($prefix . 'settings', $data))
858
-			 ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data))
859
-			 ->setContactGroupName($this->get($prefix . 'contact_groupname', $data))
860
-			 ->setDescription($this->get($prefix . 'description', $data));
861
-
862
-		$creation = $this->get($prefix . 'creation', $data);
849
+		$this->setSingleId($this->get($prefix.'unique_id', $data))
850
+			 ->setName($this->get($prefix.'name', $data))
851
+			 ->setDisplayName($this->get($prefix.'display_name', $data))
852
+			 ->setSanitizedName($this->get($prefix.'sanitized_name', $data))
853
+			 ->setConfig($this->getInt($prefix.'config', $data))
854
+			 ->setSource($this->getInt($prefix.'source', $data))
855
+			 ->setInstance($this->get($prefix.'instance', $data))
856
+			 ->setPopulation($this->getInt($prefix.'population', $data))
857
+			 ->setSettings($this->getArray($prefix.'settings', $data))
858
+			 ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data))
859
+			 ->setContactGroupName($this->get($prefix.'contact_groupname', $data))
860
+			 ->setDescription($this->get($prefix.'description', $data));
861
+
862
+		$creation = $this->get($prefix.'creation', $data);
863 863
 		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
864 864
 
865 865
 		$this->getManager()->manageImportFromDatabase($this, $data, $prefix);
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
@@ -239,7 +239,7 @@  discard block
 block discarded – undo
239 239
 		$done = [];
240 240
 		foreach ($circles as $circle) {
241 241
 			$this->outputService->output(
242
-				'Caching memberships for Members of \'' . $circle->getDisplayName() . '\'',
242
+				'Caching memberships for Members of \''.$circle->getDisplayName().'\'',
243 243
 				true
244 244
 			);
245 245
 
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 				try {
288 288
 					$data = new SimpleDataStore($row);
289 289
 					$this->outputService->output(
290
-						'Migrating Circle \'' . $data->g('name') . '\' (' . $data->g('unique_id') . ')',
290
+						'Migrating Circle \''.$data->g('name').'\' ('.$data->g('unique_id').')',
291 291
 						true
292 292
 					);
293 293
 
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
 				try {
392 392
 					$data = new SimpleDataStore($row);
393 393
 					$this->outputService->output(
394
-						'Migrating Member \'' . $data->g('user_id') . '\' from \'' . $data->g('circle_id')
394
+						'Migrating Member \''.$data->g('user_id').'\' from \''.$data->g('circle_id')
395 395
 						. '\'',
396 396
 						true
397 397
 					);
@@ -506,8 +506,8 @@  discard block
 block discarded – undo
506 506
 					$federatedUser =
507 507
 						$this->federatedUserService->getLocalFederatedUser($data->g('share_with'));
508 508
 					$this->outputService->output(
509
-						'Migrating child share #' . $data->gInt('id') . ' owner: ' . $data->g('share_with')
510
-						. ' -> ' . $federatedUser->getSingleId(),
509
+						'Migrating child share #'.$data->gInt('id').' owner: '.$data->g('share_with')
510
+						. ' -> '.$federatedUser->getSingleId(),
511 511
 						true
512 512
 					);
513 513
 
@@ -578,7 +578,7 @@  discard block
 block discarded – undo
578 578
 			$addressBook =
579 579
 				$this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry));
580 580
 
581
-			$member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId);
581
+			$member->setUserId($userId.'/'.$addressBook->getUri().'/'.$contactId);
582 582
 		}
583 583
 	}
584 584
 
@@ -613,7 +613,7 @@  discard block
 block discarded – undo
613 613
 				try {
614 614
 					$data = new SimpleDataStore($row);
615 615
 					$this->outputService->output(
616
-						'Migrating ShareToken \'' . $data->g('token') . '\' for \'' . $data->g('user_id')
616
+						'Migrating ShareToken \''.$data->g('token').'\' for \''.$data->g('user_id')
617 617
 						. '\'',
618 618
 						true
619 619
 					);
Please login to merge, or discard this patch.