Completed
Push — master ( f608e1...8172ba )
by Maxence
16s queued 12s
created
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/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.
lib/Service/MembershipService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -250,7 +250,7 @@  discard block
 block discarded – undo
250 250
 	 */
251 251
 	private function getChildrenMembers(string $id, array &$knownIds = []): array {
252 252
 		$singleIds = array_map(
253
-			function (Member $item): string {
253
+			function(Member $item): string {
254 254
 				return $item->getSingleId();
255 255
 			}, $this->memberRequest->getMembers($id)
256 256
 		);
@@ -274,7 +274,7 @@  discard block
 block discarded – undo
274 274
 	 */
275 275
 	private function getChildrenMemberships(string $id, array &$knownIds = []): array {
276 276
 		$singleIds = array_map(
277
-			function (Membership $item): string {
277
+			function(Membership $item): string {
278 278
 				return $item->getSingleId();
279 279
 			}, $this->membershipRequest->getInherited($id)
280 280
 		);
@@ -320,7 +320,7 @@  discard block
 block discarded – undo
320 320
 	 */
321 321
 	private function removeDeprecatedMemberships(array $memberships, array $known): array {
322 322
 		$circleIds = array_map(
323
-			function (Membership $membership): string {
323
+			function(Membership $membership): string {
324 324
 				return $membership->getCircleId();
325 325
 			}, $memberships
326 326
 		);
Please login to merge, or discard this patch.
lib/Command/CirclesMemberships.php 1 patch
Spacing   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -212,10 +212,10 @@  discard block
 block discarded – undo
212 212
 //			return 0;
213 213
 //		}
214 214
 
215
-		$output->writeln('Id: <info>' . $federatedUser->getUserId() . '</info>');
216
-		$output->writeln('Instance: <info>' . $federatedUser->getInstance() . '</info>');
217
-		$output->writeln('Type: <info>' . Member::$TYPE[$federatedUser->getUserType()] . '</info>');
218
-		$output->writeln('SingleId: <info>' . $federatedUser->getSingleId() . '</info>');
215
+		$output->writeln('Id: <info>'.$federatedUser->getUserId().'</info>');
216
+		$output->writeln('Instance: <info>'.$federatedUser->getInstance().'</info>');
217
+		$output->writeln('Type: <info>'.Member::$TYPE[$federatedUser->getUserType()].'</info>');
218
+		$output->writeln('SingleId: <info>'.$federatedUser->getSingleId().'</info>');
219 219
 
220 220
 		$output->writeln('');
221 221
 		$output->writeln('Memberships:');
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
 		if ($count === 0) {
225 225
 			$output->writeln('(database not updated)');
226 226
 		} else {
227
-			$output->writeln('(' . $count . ' entries generated/updated in the database)');
227
+			$output->writeln('('.$count.' entries generated/updated in the database)');
228 228
 		}
229 229
 
230 230
 		foreach ($federatedUser->getMemberships() as $membership) {
231 231
 			$this->memberships[$membership->getCircleId()] = $membership;
232 232
 			$output->writeln(
233
-				'- <info>' . $membership->getCircleId() . '</info> ('
234
-				. Member::$DEF_LEVEL[$membership->getLevel()] . ')'
233
+				'- <info>'.$membership->getCircleId().'</info> ('
234
+				. Member::$DEF_LEVEL[$membership->getLevel()].')'
235 235
 			);
236 236
 		}
237 237
 
@@ -305,9 +305,9 @@  discard block
 block discarded – undo
305 305
 				if ($lineNumber === 2) {
306 306
 					return '';
307 307
 				}
308
-				$line .= '<info>' . $federatedUser->getSingleId() . '</info>';
308
+				$line .= '<info>'.$federatedUser->getSingleId().'</info>';
309 309
 				if (!$this->configService->isLocalInstance($federatedUser->getInstance())) {
310
-					$line .= '@' . $federatedUser->getInstance();
310
+					$line .= '@'.$federatedUser->getInstance();
311 311
 				}
312 312
 
313 313
 				return $line;
@@ -319,28 +319,28 @@  discard block
 block discarded – undo
319 319
 				$circle = $member->getCircle();
320 320
 
321 321
 				if ($lineNumber === 1) {
322
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
322
+					$line .= '<info>'.$circle->getSingleId().'</info>';
323 323
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
324
-						$line .= '@' . $circle->getInstance();
324
+						$line .= '@'.$circle->getInstance();
325 325
 					}
326
-					$line .= ' (' . ($this->input->getOption('display-name') ?
327
-							$circle->getDisplayName() : $circle->getName()) . ')';
328
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
329
-					$line .= ' <info>Level</info>: ' . Member::$DEF_LEVEL[$member->getLevel()];
326
+					$line .= ' ('.($this->input->getOption('display-name') ?
327
+							$circle->getDisplayName() : $circle->getName()).')';
328
+					$line .= ' <info>MemberId</info>: '.$member->getId();
329
+					$line .= ' <info>Level</info>: '.Member::$DEF_LEVEL[$member->getLevel()];
330 330
 
331 331
 					$knownMembership = $this->memberships[$member->getCircleId()];
332 332
 					if ($member->getLevel() !== $knownMembership->getLevel()) {
333
-						$line .= ' (' . Member::$DEF_LEVEL[$knownMembership->getLevel()] . ')';
333
+						$line .= ' ('.Member::$DEF_LEVEL[$knownMembership->getLevel()].')';
334 334
 					}
335 335
 				}
336 336
 				if ($lineNumber === 2) {
337 337
 					$owner = $circle->getOwner();
338
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance() . ' ';
338
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance().' ';
339 339
 					if ($owner->hasBasedOn()) {
340
-						$line .= '(' . Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()] . ') ';
340
+						$line .= '('.Circle::$DEF_SOURCE[$owner->getBasedOn()->getSource()].') ';
341 341
 					}
342 342
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
343
-					$line .= ($type === '') ? '' : '<info>Config</info>: ' . $type;
343
+					$line .= ($type === '') ? '' : '<info>Config</info>: '.$type;
344 344
 				}
345 345
 
346 346
 				return $line;
@@ -399,6 +399,6 @@  discard block
 block discarded – undo
399 399
 			);
400 400
 		}
401 401
 
402
-		$output->writeln($count . ' memberships updated');
402
+		$output->writeln($count.' memberships updated');
403 403
 	}
404 404
 }
Please login to merge, or discard this patch.
lib/Command/CirclesMaintenance.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 				'<error>WARNING! You are about to delete all data related to the Circles App!</error>'
118 118
 			);
119 119
 			$question = new ConfirmationQuestion(
120
-				'<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false,
120
+				'<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false,
121 121
 				'/^(y|Y)/i'
122 122
 			);
123 123
 
@@ -132,7 +132,7 @@  discard block
 block discarded – undo
132 132
 			$output->writeln('<error>WARNING! This operation is not reversible.</error>');
133 133
 
134 134
 			$question = new Question(
135
-				'<comment>Please confirm this destructive operation by typing \'' . $action
135
+				'<comment>Please confirm this destructive operation by typing \''.$action
136 136
 				. '\'</comment>: ', ''
137 137
 			);
138 138
 
@@ -149,7 +149,7 @@  discard block
 block discarded – undo
149 149
 				$this->coreRequestBuilder->uninstall();
150 150
 			}
151 151
 
152
-			$output->writeln('<info>' . $action . ' done</info>');
152
+			$output->writeln('<info>'.$action.' done</info>');
153 153
 
154 154
 			return 0;
155 155
 		}
Please login to merge, or discard this patch.
lib/Model/Federated/RemoteInstance.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 class RemoteInstance extends NC22Signatory implements INC22QueryRow, JsonSerializable {
47 47
 	use TArrayTools;
48 48
 
49
-	public const TYPE_UNKNOWN = 'Unknown';    // not trusted
50
-	public const TYPE_PASSIVE = 'Passive';    // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
51
-	public const TYPE_EXTERNAL = 'External';  // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
52
-	public const TYPE_TRUSTED = 'Trusted';    // everything about Federated Circles are broadcasted.
53
-	public const TYPE_GLOBALSCALE = 'GlobalScale';  // every Circle is broadcasted,
49
+	public const TYPE_UNKNOWN = 'Unknown'; // not trusted
50
+	public const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
51
+	public const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
52
+	public const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted.
53
+	public const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted,
54 54
 
55 55
 	public static $LIST_TYPE = [
56 56
 		self::TYPE_UNKNOWN,
@@ -526,7 +526,7 @@  discard block
 block discarded – undo
526 526
 		];
527 527
 
528 528
 		if ($this->getAuthSigned() !== '') {
529
-			$data[self::AUTH_SIGNED] = $this->getAlgorithm() . ':' . $this->getAuthSigned();
529
+			$data[self::AUTH_SIGNED] = $this->getAlgorithm().':'.$this->getAuthSigned();
530 530
 		}
531 531
 
532 532
 		if (!empty($this->getAliases())) {
@@ -545,17 +545,17 @@  discard block
 block discarded – undo
545 545
 	 * @throws RemoteNotFoundException
546 546
 	 */
547 547
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
548
-		if ($this->getInt($prefix . 'id', $data) === 0) {
548
+		if ($this->getInt($prefix.'id', $data) === 0) {
549 549
 			throw new RemoteNotFoundException();
550 550
 		}
551 551
 
552
-		$this->setDbId($this->getInt($prefix . 'id', $data));
553
-		$this->import($this->getArray($prefix . 'item', $data));
554
-		$this->setOrigData($this->getArray($prefix . 'item', $data));
555
-		$this->setType($this->get($prefix . 'type', $data));
556
-		$this->setInterface($this->getInt($prefix . 'interface', $data));
557
-		$this->setInstance($this->get($prefix . 'instance', $data));
558
-		$this->setId($this->get($prefix . 'href', $data));
552
+		$this->setDbId($this->getInt($prefix.'id', $data));
553
+		$this->import($this->getArray($prefix.'item', $data));
554
+		$this->setOrigData($this->getArray($prefix.'item', $data));
555
+		$this->setType($this->get($prefix.'type', $data));
556
+		$this->setInterface($this->getInt($prefix.'interface', $data));
557
+		$this->setInstance($this->get($prefix.'instance', $data));
558
+		$this->setId($this->get($prefix.'href', $data));
559 559
 
560 560
 		return $this;
561 561
 	}
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -230,7 +230,7 @@  discard block
 block discarded – undo
230 230
 			return $value;
231 231
 		}
232 232
 
233
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
233
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
234 234
 			return $value;
235 235
 		}
236 236
 
@@ -449,7 +449,7 @@  discard block
 block discarded – undo
449 449
 	 */
450 450
 	public function getTrustedDomains(): array {
451 451
 		return array_map(
452
-			function (string $address) {
452
+			function(string $address) {
453 453
 				return strtolower($address);
454 454
 			}, $this->config->getSystemValue('trusted_domains', [])
455 455
 		);
@@ -485,7 +485,7 @@  discard block
 block discarded – undo
485 485
 		}
486 486
 
487 487
 		if (array_key_exists('port', $loopback)) {
488
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
488
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
489 489
 		} else {
490 490
 			$loopbackCloudId = $loopback['host'];
491 491
 		}
@@ -524,13 +524,13 @@  discard block
 block discarded – undo
524 524
 			$path = $this->getAppValue(self::LOOPBACK_CLOUD_PATH);
525 525
 		}
526 526
 
527
-		$base = $scheme . '://' . $instance . $path;
527
+		$base = $scheme.'://'.$instance.$path;
528 528
 
529 529
 		if ($route === '') {
530 530
 			return $base;
531 531
 		}
532 532
 
533
-		return rtrim($base, '/') . $this->linkToRoute($route, $args);
533
+		return rtrim($base, '/').$this->linkToRoute($route, $args);
534 534
 	}
535 535
 
536 536
 
@@ -631,13 +631,13 @@  discard block
 block discarded – undo
631 631
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
632 632
 
633 633
 		if ($federatedUser->getUserType() === Member::TYPE_MAIL) {
634
-			return $name . ' ' . $this->displayInstance(
634
+			return $name.' '.$this->displayInstance(
635 635
 					$federatedUser->getInstance(),
636 636
 					self::DISPLAY_PARENTHESIS
637 637
 				);
638 638
 		}
639 639
 
640
-		return $name . $this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
640
+		return $name.$this->displayInstance($federatedUser->getInstance(), self::DISPLAY_AT);
641 641
 	}
642 642
 
643 643
 	/**
@@ -653,9 +653,9 @@  discard block
 block discarded – undo
653 653
 
654 654
 		switch ($type) {
655 655
 			case self::DISPLAY_AT:
656
-				return '@' . $instance;
656
+				return '@'.$instance;
657 657
 			case self::DISPLAY_PARENTHESIS:
658
-				return '(' . $instance . ')';
658
+				return '('.$instance.')';
659 659
 		}
660 660
 
661 661
 		return $instance;
Please login to merge, or discard this patch.