Completed
Push — master ( bf476c...b09631 )
by Maxence
02:44
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
@@ -186,11 +186,11 @@  discard block
 block discarded – undo
186 186
 			$this->federatedUserService->commandLineInitiator($initiator, $initiatorType, $circleId, true);
187 187
 			$circle = $this->circleService->getCircle($circleId);
188 188
 
189
-			$output->writeln('<info>Name</info>: ' . $circle->getName());
189
+			$output->writeln('<info>Name</info>: '.$circle->getName());
190 190
 			$owner = $circle->getOwner();
191
-			$output->writeln('<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance());
191
+			$output->writeln('<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance());
192 192
 			$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
193
-			$output->writeln('<info>Config</info>: ' . $type);
193
+			$output->writeln('<info>Config</info>: '.$type);
194 194
 			$output->writeln(' ');
195 195
 
196 196
 			$tree = new NC22TreeNode(null, new SimpleDataStore(['circle' => $circle]));
@@ -255,8 +255,7 @@  discard block
 block discarded – undo
255 255
 						$member, $this->input->getOption('display-name')
256 256
 					),
257 257
 					$this->configService->displayInstance($member->getInstance()),
258
-					($level > 0) ? Member::$DEF_LEVEL[$level] :
259
-						'(' . strtolower($member->getStatus()) . ')',
258
+					($level > 0) ? Member::$DEF_LEVEL[$level] : '('.strtolower($member->getStatus()).')',
260 259
 					($member->hasInvitedBy()) ? $this->configService->displayFederatedUser(
261 260
 						$member->getInvitedBy(), $this->input->getOption('display-name')
262 261
 					) : 'Unknown'
@@ -418,19 +417,19 @@  discard block
 block discarded – undo
418 417
 				$member = $data->gObj('member', Member::class);
419 418
 
420 419
 				if ($lineNumber === 1) {
421
-					$line .= '<info>' . $member->getSingleId() . '</info>';
420
+					$line .= '<info>'.$member->getSingleId().'</info>';
422 421
 					if (!$this->configService->isLocalInstance($member->getInstance())) {
423
-						$line .= '@' . $member->getInstance();
422
+						$line .= '@'.$member->getInstance();
424 423
 					}
425
-					$line .= ' (' . Member::$DEF_LEVEL[$member->getLevel()] . ')';
424
+					$line .= ' ('.Member::$DEF_LEVEL[$member->getLevel()].')';
426 425
 
427
-					$line .= ' <info>MemberId</info>: ' . $member->getId();
428
-					$line .= ' <info>Name</info>: ' . $this->configService->displayFederatedUser(
426
+					$line .= ' <info>MemberId</info>: '.$member->getId();
427
+					$line .= ' <info>Name</info>: '.$this->configService->displayFederatedUser(
429 428
 							$member,
430 429
 							$this->input->getOption('display-name')
431 430
 						);
432 431
 					$source = ($member->hasBasedOn()) ? $member->getBasedOn()->getSource() : '';
433
-					$line .= ' <info>Source</info>: ' . Circle::$DEF_SOURCE[$source];
432
+					$line .= ' <info>Source</info>: '.Circle::$DEF_SOURCE[$source];
434 433
 				}
435 434
 
436 435
 				if ($lineNumber === 2) {
@@ -442,16 +441,16 @@  discard block
 block discarded – undo
442 441
 						return $line;
443 442
 					}
444 443
 					$owner = $circle->getOwner();
445
-					$line .= '<info>Owner</info>: ' . $owner->getUserId() . '@' . $owner->getInstance();
444
+					$line .= '<info>Owner</info>: '.$owner->getUserId().'@'.$owner->getInstance();
446 445
 					$type = implode(", ", Circle::getCircleFlags($circle, Circle::FLAGS_LONG));
447
-					$line .= ($type === '') ? '' : ' <info>Config</info>: ' . $type;
446
+					$line .= ($type === '') ? '' : ' <info>Config</info>: '.$type;
448 447
 				}
449 448
 
450 449
 			} else {
451 450
 				if ($lineNumber === 1 && !is_null($circle)) {
452
-					$line .= '<info>' . $circle->getSingleId() . '</info>';
451
+					$line .= '<info>'.$circle->getSingleId().'</info>';
453 452
 					if (!$this->configService->isLocalInstance($circle->getInstance())) {
454
-						$line .= '@' . $circle->getInstance();
453
+						$line .= '@'.$circle->getInstance();
455 454
 					}
456 455
 				}
457 456
 			}
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/CirclesList.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -224,7 +224,7 @@
 block discarded – undo
224 224
 					Circle::$DEF_SOURCE[$circle->getSource()],
225 225
 					$displayName ? $owner->getDisplayName() : $owner->getUserId(),
226 226
 					$this->configService->displayInstance($owner->getInstance()),
227
-					$circle->getPopulation() . '/' . $this->getInt('members_limit', $circle->getSettings(), -1),
227
+					$circle->getPopulation().'/'.$this->getInt('members_limit', $circle->getSettings(), -1),
228 228
 					substr(str_replace("\n", ' ', $circle->getDescription()), 0, 30)
229 229
 				]
230 230
 			);
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.