Completed
Push — master ( b09631...897add )
by Maxence
02:32
created
lib/Command/MembersList.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,6 @@
 block discarded – undo
32 32
 namespace OCA\Circles\Command;
33 33
 
34 34
 use ArtificialOwl\MySmallPhpTools\Exceptions\InvalidItemException;
35
-use ArtificialOwl\MySmallPhpTools\Exceptions\ItemNotFoundException;
36 35
 use ArtificialOwl\MySmallPhpTools\Exceptions\RequestNetworkException;
37 36
 use ArtificialOwl\MySmallPhpTools\Exceptions\SignatoryException;
38 37
 use ArtificialOwl\MySmallPhpTools\Exceptions\UnknownTypeException;
Please login to merge, or discard this patch.
Spacing   +14 added lines, -15 removed lines patch added patch discarded remove patch
@@ -189,11 +189,11 @@  discard block
 block discarded – undo
189 189
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
190 190
 			$circle = $this->circleService->getCircle($circleId);
191 191
 
192
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
192
+			$output->writeln('<info>Name</info>: '.$circle->getName());
193 193
 			$owner = $circle->getOwner();
194
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
194
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
195 195
 			$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
196
-			$output->writeln('<info>Config</info>: ' . $type);
196
+			$output->writeln('<info>Config</info>: '.$type);
197 197
 			$output->writeln(' ');
198 198
 
199 199
 			$tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -260,8 +260,7 @@  discard block
 block discarded – undo
260 260
 						), 40
261 261
 					),
262 262
 					$this->configService->displayInstance($member->getInstance()),
263
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
264
-						'(' . strtolower($member->getStatus()) . ')',
263
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
265 264
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
266 265
 						$member->getInvitedBy(), $this->input->getOption('display-name')
267 266
 					) : 'Unknown'
@@ -423,19 +422,19 @@  discard block
 block discarded – undo
423 422
 				$member = $data->gObj('member', Member::class);
424 423
 
425 424
 				if ($lineNumber === 1) {
426
-					$line .= '<info>' . $member->getSingleId() . '</info>';
425
+					$line .= '<info>'.$member->getSingleId().'</info>';
427 426
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
428
-						$line .= '@' . $member->getInstance();
427
+						$line .= '@'.$member->getInstance();
429 428
 					}
430
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
429
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
431 430
 
432
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
433
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
431
+					$line .= ' <info>MemberId</info>: '.$member->getId();
432
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
434 433
 							$member,
435 434
 							$this->input->getOption('display-name')
436 435
 						);
437 436
 					$source = ($member->hasBasedOn()) ? $member->getBasedOn()->getSource() : '';
438
-					$line .= ' <info>Source</info>: ' . Circle::$DEF_SOURCE[$source];
437
+					$line .= ' <info>Source</info>: '.Circle::$DEF_SOURCE[$source];
439 438
 				}
440 439
 
441 440
 				if ($lineNumber === 2) {
@@ -447,16 +446,16 @@  discard block
 block discarded – undo
447 446
 						return $line;
448 447
 					}
449 448
 					$owner = $circle->getOwner();
450
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
449
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
451 450
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
452
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
451
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
453 452
 				}
454 453
 
455 454
 			} else {
456 455
 				if ($lineNumber === 1 && !is_null($circle)) {
457
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
456
+					$line .= '<info>'.$circle->getSingleId().'</info>';
458 457
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
459
-						$line .= '@' . $circle->getInstance();
458
+						$line .= '@'.$circle->getInstance();
460 459
 					}
461 460
 				}
462 461
 			}
Please login to merge, or discard this patch.
lib/Handlers/WebfingerHandler.php 1 patch
Unused Use Statements   -2 removed lines patch added patch discarded remove patch
@@ -33,11 +33,9 @@
 block discarded – undo
33 33
 
34 34
 
35 35
 use ArtificialOwl\MySmallPhpTools\Exceptions\SignatoryException;
36
-use ArtificialOwl\MySmallPhpTools\Exceptions\SignatureException;
37 36
 use ArtificialOwl\MySmallPhpTools\Traits\TArrayTools;
38 37
 use OC\URLGenerator;
39 38
 use OCA\Circles\AppInfo\Application;
40
-use OCA\Circles\Exceptions\UnknownInterfaceException;
41 39
 use OCA\Circles\Service\ConfigService;
42 40
 use OCA\Circles\Service\InterfaceService;
43 41
 use OCA\Circles\Service\RemoteStreamService;
Please login to merge, or discard this patch.
lib/Model/Federated/EventWrapper.php 1 patch
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,6 @@
 block discarded – undo
37 37
 use ArtificialOwl\MySmallPhpTools\Model\SimpleDataStore;
38 38
 use ArtificialOwl\MySmallPhpTools\Traits\TArrayTools;
39 39
 use JsonSerializable;
40
-use OCA\Circles\Exceptions\UnknownInterfaceException;
41 40
 
42 41
 
43 42
 /**
Please login to merge, or discard this patch.
lib/Service/ConfigService.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 			return $value;
187 187
 		}
188 188
 
189
-		if (($value = $this->config->getSystemValue(Application::APP_ID . '.' . $key, '')) !== '') {
189
+		if (($value = $this->config->getSystemValue(Application::APP_ID.'.'.$key, '')) !== '') {
190 190
 			return $value;
191 191
 		}
192 192
 
@@ -440,7 +440,7 @@  discard block
 block discarded – undo
440 440
 		}
441 441
 
442 442
 		if (array_key_exists('port', $loopback)) {
443
-			$loopbackCloudId = $loopback['host'] . ':' . $loopback['port'];
443
+			$loopbackCloudId = $loopback['host'].':'.$loopback['port'];
444 444
 		} else {
445 445
 			$loopbackCloudId = $loopback['host'];
446 446
 		}
@@ -469,12 +469,12 @@  discard block
 block discarded – undo
469 469
 			$scheme = $this->getAppValue(self::LOOPBACK_CLOUD_SCHEME);
470 470
 		}
471 471
 
472
-		$base = $scheme . '://' . $instance;
472
+		$base = $scheme.'://'.$instance;
473 473
 		if ($route === '') {
474 474
 			return $base;
475 475
 		}
476 476
 
477
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
477
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
478 478
 	}
479 479
 
480 480
 
@@ -574,7 +574,7 @@  discard block
 block discarded – undo
574 574
 	public function displayFederatedUser(IFederatedUser $federatedUser, bool $displayName = false): string {
575 575
 		$name = ($displayName) ? $federatedUser->getDisplayName() : $federatedUser->getUserId();
576 576
 
577
-		return $name . $this->displayInstance($federatedUser->getInstance(), true);
577
+		return $name.$this->displayInstance($federatedUser->getInstance(), true);
578 578
 	}
579 579
 
580 580
 	/**
@@ -588,7 +588,7 @@  discard block
 block discarded – undo
588 588
 			return '';
589 589
 		}
590 590
 
591
-		return (($showAt) ? '@' : '') . $instance;
591
+		return (($showAt) ? '@' : '').$instance;
592 592
 	}
593 593
 
594 594
 
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
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				'<error>WARNING! You are about to delete all data related to the Circles App!</error>'
116 116
 			);
117 117
 			$question = new ConfirmationQuestion(
118
-				'<comment>Do you really want to ' . $action . ' Circles ?</comment> (y/N) ', false,
118
+				'<comment>Do you really want to '.$action.' Circles ?</comment> (y/N) ', false,
119 119
 				'/^(y|Y)/i'
120 120
 			);
121 121
 
@@ -131,7 +131,7 @@  discard block
 block discarded – undo
131 131
 
132 132
 
133 133
 			$question = new Question(
134
-				'<comment>Please confirm this destructive operation by typing \'' . $action
134
+				'<comment>Please confirm this destructive operation by typing \''.$action
135 135
 				. '\'</comment>: ', ''
136 136
 			);
137 137
 
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 				$this->coreQueryBuilder->uninstall();
149 149
 			}
150 150
 
151
-			$output->writeln('<info>' . $action . ' done</info>');
151
+			$output->writeln('<info>'.$action.' done</info>');
152 152
 
153 153
 			return 0;
154 154
 		}
Please login to merge, or discard this patch.
lib/Service/SyncService.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
 	 * @throws SingleCircleNotFoundException
251 251
 	 */
252 252
 	public function syncNextcloudUser(string $userId): FederatedUser {
253
-		$this->outputService->output('Syncing Nextcloud User \'' . $userId . '\'', true);
253
+		$this->outputService->output('Syncing Nextcloud User \''.$userId.'\'', true);
254 254
 
255 255
 		return $this->federatedUserService->getLocalFederatedUser($userId);
256 256
 	}
@@ -294,7 +294,7 @@  discard block
 block discarded – undo
294 294
 	 * @throws RequestBuilderException
295 295
 	 */
296 296
 	public function syncNextcloudGroup(string $groupId): Circle {
297
-		$this->outputService->output('Syncing Nextcloud Group \'' . $groupId . '\'', true);
297
+		$this->outputService->output('Syncing Nextcloud Group \''.$groupId.'\'', true);
298 298
 
299 299
 		$circle = $this->federatedUserService->getGroupCircle($groupId);
300 300
 		$group = $this->groupManager->get($groupId);
@@ -363,7 +363,7 @@  discard block
 block discarded – undo
363 363
 	 */
364 364
 	public function groupDeleted(string $groupId): void {
365 365
 		$circle = new Circle();
366
-		$circle->setName('group:' . $groupId)
366
+		$circle->setName('group:'.$groupId)
367 367
 			   ->setConfig(Circle::CFG_SYSTEM | Circle::CFG_NO_OWNER | Circle::CFG_HIDDEN)
368 368
 			   ->setSource(Member::TYPE_GROUP);
369 369
 
Please login to merge, or discard this patch.
lib/Service/OutputService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -82,14 +82,14 @@
 block discarded – undo
82 82
 	 */
83 83
 	public function output(string $message, bool $advance = false): void {
84 84
 		if (!is_null($this->occOutput)) {
85
-			$this->occOutput->writeln((($advance) ? '+' : '-') . ' ' . $message);
85
+			$this->occOutput->writeln((($advance) ? '+' : '-').' '.$message);
86 86
 		}
87 87
 
88 88
 		if (!is_null($this->migrationOutput)) {
89 89
 			if ($advance) {
90
-				$this->migrationOutput->advance(1, '(Circles) ' . $message);
90
+				$this->migrationOutput->advance(1, '(Circles) '.$message);
91 91
 			} else {
92
-				$this->migrationOutput->info('(Circles) ' . $message);
92
+				$this->migrationOutput->info('(Circles) '.$message);
93 93
 			}
94 94
 		}
95 95
 	}
Please login to merge, or discard this patch.
lib/Service/MigrationService.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 				try {
232 232
 					$data = new SimpleDataStore($row);
233 233
 					$this->outputService->output(
234
-						'Migrating Circle \'' . $data->g('name') . '\'',
234
+						'Migrating Circle \''.$data->g('name').'\'',
235 235
 						true
236 236
 					);
237 237
 
@@ -336,7 +336,7 @@  discard block
 block discarded – undo
336 336
 				try {
337 337
 					$data = new SimpleDataStore($row);
338 338
 					$this->outputService->output(
339
-						'Migrating Member \'' . $data->g('user_id') . '\'',
339
+						'Migrating Member \''.$data->g('user_id').'\'',
340 340
 						true
341 341
 					);
342 342
 
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 			$addressBook =
454 454
 				$this->contactService->getAddressBoxById($cm, $this->get('addressbook-key', $entry));
455 455
 
456
-			$member->setUserId($userId . '/' . $addressBook->getUri() . '/' . $contactId);
456
+			$member->setUserId($userId.'/'.$addressBook->getUri().'/'.$contactId);
457 457
 		}
458 458
 	}
459 459
 
Please login to merge, or discard this patch.
lib/Service/MembershipService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@
 block discarded – undo
145 145
 
146 146
 		foreach ($circles as $circle) {
147 147
 			$this->outputService->output(
148
-				'Caching memberships for \'' . $circle->getDisplayName() . '\'',
148
+				'Caching memberships for \''.$circle->getDisplayName().'\'',
149 149
 				true
150 150
 			);
151 151
 			$this->manageMemberships($circle->getSingleId());
Please login to merge, or discard this patch.