Completed
Pull Request — master (#602)
by Maxence
02:45
created
lib/Db/CircleRequestBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -77,7 +77,7 @@
 block discarded – undo
77 77
 		$qb = $this->getQueryBuilder();
78 78
 		$qb->generateSelect(self::TABLE_CIRCLE, self::$tables[self::TABLE_CIRCLE], $alias, true)
79 79
 		   ->generateGroupBy(self::$tables[self::TABLE_CIRCLE], $alias)
80
-		   ->orderBy($alias . '.creation', 'asc');
80
+		   ->orderBy($alias.'.creation', 'asc');
81 81
 
82 82
 		return $qb;
83 83
 	}
Please login to merge, or discard this patch.
lib/Db/RemoteRequest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -182,10 +182,10 @@  discard block
 block discarded – undo
182 182
 			$qb->leftJoin(
183 183
 				CoreQueryBuilder::REMOTE, self::TABLE_MEMBER, $aliasMember,
184 184
 				$expr->andX(
185
-					$expr->eq($aliasMember . '.circle_id', $qb->createNamedParameter($circle->getSingleId())),
186
-					$expr->eq($aliasMember . '.instance', CoreQueryBuilder::REMOTE . '.instance'),
185
+					$expr->eq($aliasMember.'.circle_id', $qb->createNamedParameter($circle->getSingleId())),
186
+					$expr->eq($aliasMember.'.instance', CoreQueryBuilder::REMOTE.'.instance'),
187 187
 					$expr->gte(
188
-						$aliasMember . '.level',
188
+						$aliasMember.'.level',
189 189
 						$qb->createNamedParameter(Member::LEVEL_MEMBER, IQueryBuilder::PARAM_INT)
190 190
 					)
191 191
 				)
@@ -193,7 +193,7 @@  discard block
 block discarded – undo
193 193
 
194 194
 			$external = $expr->andX();
195 195
 			$external->add($qb->exprLimitToDBField('type', RemoteInstance::TYPE_EXTERNAL, true, false));
196
-			$external->add($expr->isNotNull($aliasMember . '.instance'));
196
+			$external->add($expr->isNotNull($aliasMember.'.instance'));
197 197
 			$orX->add($external);
198 198
 		}
199 199
 
Please login to merge, or discard this patch.
lib/Db/MemberRequestBuilder.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -89,7 +89,7 @@
 block discarded – undo
89 89
 			CoreQueryBuilder::MEMBER
90 90
 		)
91 91
 		   ->generateGroupBy(self::$tables[self::TABLE_MEMBER], CoreQueryBuilder::MEMBER)
92
-		   ->orderBy(CoreQueryBuilder::MEMBER . '.joined');
92
+		   ->orderBy(CoreQueryBuilder::MEMBER.'.joined');
93 93
 
94 94
 		if ($getBasedOn) {
95 95
 			$qb->leftJoinBasedOn(CoreQueryBuilder::MEMBER, $initiator);
Please login to merge, or discard this patch.
lib/Command/CirclesReport.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 	 * @return string[]
219 219
 	 */
220 220
 	public function fillCommandList(string $source, string $field): array {
221
-		echo $source . ' ' . $field . "\n";
221
+		echo $source.' '.$field."\n";
222 222
 
223 223
 		return ['abcd', 'abdde', 'erfg'];
224 224
 	}
@@ -394,7 +394,7 @@  discard block
 block discarded – undo
394 394
 	 * @return string
395 395
 	 */
396 396
 	private function obfuscateId(string $id): string {
397
-		return substr($id, 0, 5) . '.' . md5(substr($id, 5));
397
+		return substr($id, 0, 5).'.'.md5(substr($id, 5));
398 398
 	}
399 399
 
400 400
 
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 	 */
404 404
 	public function onNewPrompt(NC22InteractiveShellSession $session): void {
405 405
 		$prompt =
406
-			'Circles Report [<info>' . $this->report->getSource() . '</info>]:<comment>%PATH%</comment>';
406
+			'Circles Report [<info>'.$this->report->getSource().'</info>]:<comment>%PATH%</comment>';
407 407
 
408 408
 		$commands = [];
409 409
 		if ($session->getData()->g('currentStatus') === 'write') {
Please login to merge, or discard this patch.
lib/Service/InterfaceService.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -230,13 +230,13 @@
 block discarded – undo
230 230
 			throw new UnknownInterfaceException('misconfigured scheme');
231 231
 		}
232 232
 
233
-		$base = $scheme . '://' . $this->getCloudInstance();
233
+		$base = $scheme.'://'.$this->getCloudInstance();
234 234
 
235 235
 		if ($route === '') {
236 236
 			return $base;
237 237
 		}
238 238
 
239
-		return $base . $this->urlGenerator->linkToRoute($route, $args);
239
+		return $base.$this->urlGenerator->linkToRoute($route, $args);
240 240
 	}
241 241
 
242 242
 
Please login to merge, or discard this patch.
lib/Service/RemoteStreamService.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -315,7 +315,7 @@
 block discarded – undo
315 315
 	public function getCachedRemoteInstance(string $instance): RemoteInstance {
316 316
 		$remoteInstance = $this->remoteRequest->getFromInstance($instance);
317 317
 		if ($remoteInstance->getType() === RemoteInstance::TYPE_UNKNOWN) {
318
-			throw new UnknownRemoteException($instance . ' is set as \'unknown\' in database');
318
+			throw new UnknownRemoteException($instance.' is set as \'unknown\' in database');
319 319
 		}
320 320
 
321 321
 		return $remoteInstance;
Please login to merge, or discard this patch.
lib/Command/CirclesRemote.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -176,19 +176,19 @@  discard block
 block discarded – undo
176 176
 
177 177
 		$webfinger = $this->getWebfinger($host, Application::APP_SUBJECT);
178 178
 		if ($this->input->getOption('all')) {
179
-			$this->output->writeln('- Webfinger on <info>' . $host . '</info>');
179
+			$this->output->writeln('- Webfinger on <info>'.$host.'</info>');
180 180
 			$this->output->writeln(json_encode($webfinger, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
181 181
 			$this->output->writeln('');
182 182
 		}
183 183
 
184 184
 		if ($this->input->getOption('all')) {
185 185
 			$circleLink = $this->extractLink(Application::APP_REL, $webfinger);
186
-			$this->output->writeln('- Information about Circles app on <info>' . $host . '</info>');
186
+			$this->output->writeln('- Information about Circles app on <info>'.$host.'</info>');
187 187
 			$this->output->writeln(json_encode($circleLink, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
188 188
 			$this->output->writeln('');
189 189
 		}
190 190
 
191
-		$this->output->writeln('- Available services on <info>' . $host . '</info>');
191
+		$this->output->writeln('- Available services on <info>'.$host.'</info>');
192 192
 		foreach ($webfinger->getLinks() as $link) {
193 193
 			$app = $link->getProperty('name');
194 194
 			$ver = $link->getProperty('version');
@@ -196,14 +196,14 @@  discard block
 block discarded – undo
196 196
 				$app .= ' ';
197 197
 			}
198 198
 			if ($ver !== '') {
199
-				$ver = 'v' . $ver;
199
+				$ver = 'v'.$ver;
200 200
 			}
201 201
 
202
-			$this->output->writeln(' * ' . $link->getRel() . ' ' . $app . $ver);
202
+			$this->output->writeln(' * '.$link->getRel().' '.$app.$ver);
203 203
 		}
204 204
 		$this->output->writeln('');
205 205
 
206
-		$this->output->writeln('- Resources related to Circles on <info>' . $host . '</info>');
206
+		$this->output->writeln('- Resources related to Circles on <info>'.$host.'</info>');
207 207
 		$resource = $this->getResourceData($host, Application::APP_SUBJECT, Application::APP_REL);
208 208
 		$this->output->writeln(json_encode($resource, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));
209 209
 		$this->output->writeln('');
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
 
212 212
 		$tempUid = $resource->g('uid');
213 213
 		$this->output->writeln(
214
-			'- Confirming UID=' . $tempUid . ' from parsed Signatory at <info>' . $host . '</info>'
214
+			'- Confirming UID='.$tempUid.' from parsed Signatory at <info>'.$host.'</info>'
215 215
 		);
216 216
 
217 217
 		try {
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 			$this->output->writeln(' * No SignatureException: <info>Identity authed</info>');
220 220
 		} catch (SignatureException $e) {
221 221
 			$this->output->writeln(
222
-				'<error>' . $host . ' cannot auth its identity: ' . $e->getMessage() . '</error>'
222
+				'<error>'.$host.' cannot auth its identity: '.$e->getMessage().'</error>'
223 223
 			);
224 224
 
225 225
 			return;
226 226
 		}
227 227
 
228
-		$this->output->writeln(' * Found <info>' . $remoteSignatory->getUid() . '</info>');
228
+		$this->output->writeln(' * Found <info>'.$remoteSignatory->getUid().'</info>');
229 229
 		if ($remoteSignatory->getUid(true) !== $tempUid) {
230
-			$this->output->writeln('<error>looks like ' . $host . ' is faking its identity');
230
+			$this->output->writeln('<error>looks like '.$host.' is faking its identity');
231 231
 
232 232
 			return;
233 233
 		}
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 		$this->output->writeln('');
236 236
 
237 237
 		$testUrl = $resource->g('test');
238
-		$this->output->writeln('- Testing signed payload on <info>' . $testUrl . '</info>');
238
+		$this->output->writeln('- Testing signed payload on <info>'.$testUrl.'</info>');
239 239
 
240 240
 		try {
241 241
 			$localSignatory = $this->remoteStreamService->getAppSignatory();
@@ -257,18 +257,18 @@  discard block
 block discarded – undo
257 257
 		$this->output->writeln('');
258 258
 
259 259
 		$this->output->writeln(' * Clear Signature: ');
260
-		$this->output->writeln('<comment>' . $signedRequest->getClearSignature() . '</comment>');
260
+		$this->output->writeln('<comment>'.$signedRequest->getClearSignature().'</comment>');
261 261
 		$this->output->writeln('');
262 262
 
263 263
 		$this->output->writeln(' * Signed Signature (base64 encoded): ');
264 264
 		$this->output->writeln(
265
-			'<comment>' . base64_encode($signedRequest->getSignedSignature()) . '</comment>'
265
+			'<comment>'.base64_encode($signedRequest->getSignedSignature()).'</comment>'
266 266
 		);
267 267
 		$this->output->writeln('');
268 268
 
269 269
 		$result = $signedRequest->getOutgoingRequest()->getResult();
270 270
 		$code = $result->getStatusCode();
271
-		$this->output->writeln(' * Result: ' . (($code === 200) ? '<info>' . $code . '</info>' : $code));
271
+		$this->output->writeln(' * Result: '.(($code === 200) ? '<info>'.$code.'</info>' : $code));
272 272
 		$this->output->writeln(
273 273
 			json_encode(json_decode($result->getContent(), true), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES)
274 274
 		);
@@ -290,13 +290,13 @@  discard block
 block discarded – undo
290 290
 				$stored = new RemoteInstance();
291 291
 				$this->remoteStreamService->confirmValidRemote($remoteSignatory, $stored);
292 292
 				$this->output->writeln(
293
-					'<info>The remote instance ' . $host
293
+					'<info>The remote instance '.$host
294 294
 					. ' is already known with this current identity</info>'
295 295
 				);
296 296
 
297 297
 				if ($remoteSignatory->getType() !== $stored->getType()) {
298 298
 					$this->output->writeln(
299
-						'- updating type from ' . $stored->getType() . ' to '
299
+						'- updating type from '.$stored->getType().' to '
300 300
 						. $remoteSignatory->getType()
301 301
 					);
302 302
 					$this->remoteStreamService->update(
@@ -306,7 +306,7 @@  discard block
 block discarded – undo
306 306
 
307 307
 				if ($remoteSignatory->getInstance() !== $stored->getInstance()) {
308 308
 					$this->output->writeln(
309
-						'- updating host from ' . $stored->getInstance() . ' to '
309
+						'- updating host from '.$stored->getInstance().' to '
310 310
 						. $remoteSignatory->getInstance()
311 311
 					);
312 312
 					$this->remoteStreamService->update(
@@ -315,7 +315,7 @@  discard block
 block discarded – undo
315 315
 				}
316 316
 				if ($remoteSignatory->getId() !== $stored->getId()) {
317 317
 					$this->output->writeln(
318
-						'- updating href/Id from ' . $stored->getId() . ' to '
318
+						'- updating href/Id from '.$stored->getId().' to '
319 319
 						. $remoteSignatory->getId()
320 320
 					);
321 321
 					$this->remoteStreamService->update($remoteSignatory, RemoteStreamService::UPDATE_HREF);
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
 		$helper = $this->getHelper('question');
342 342
 
343 343
 		$this->output->writeln(
344
-			'The remote instance <info>' . $remoteSignatory->getInstance() . '</info> looks good.'
344
+			'The remote instance <info>'.$remoteSignatory->getInstance().'</info> looks good.'
345 345
 		);
346 346
 		$question = new ConfirmationQuestion(
347
-			'Would you like to identify this remote instance as \'<comment>' . $remoteSignatory->getType()
347
+			'Would you like to identify this remote instance as \'<comment>'.$remoteSignatory->getType()
348 348
 			. '</comment>\' using interface \'<comment>'
349 349
 			. InterfaceService::$LIST_IFACE[$remoteSignatory->getInterface()]
350 350
 			. '</comment>\' ? (y/N) ',
@@ -369,7 +369,7 @@  discard block
 block discarded – undo
369 369
 		$helper = $this->getHelper('question');
370 370
 
371 371
 		$this->output->writeln(
372
-			'The remote instance <info>' . $remoteSignatory->getInstance()
372
+			'The remote instance <info>'.$remoteSignatory->getInstance()
373 373
 			. '</info> is known but <error>its identity has changed.</error>'
374 374
 		);
375 375
 		$this->output->writeln(
@@ -447,7 +447,7 @@  discard block
 block discarded – undo
447 447
 			return;
448 448
 		}
449 449
 
450
-		$this->output->write('Adding <comment>' . $instance . '</comment>: ');
450
+		$this->output->write('Adding <comment>'.$instance.'</comment>: ');
451 451
 		try {
452 452
 			$this->remoteStreamService->addRemoteInstance(
453 453
 				$instance,
@@ -457,8 +457,8 @@  discard block
 block discarded – undo
457 457
 			);
458 458
 			$this->output->writeln('<info>ok</info>');
459 459
 		} catch (Exception $e) {
460
-			$msg = ($e->getMessage() === '') ? '' : ' (' . $e->getMessage() . ')';
461
-			$this->output->writeln('<error>' . get_class($e) . $msg . '</error>');
460
+			$msg = ($e->getMessage() === '') ? '' : ' ('.$e->getMessage().')';
461
+			$this->output->writeln('<error>'.get_class($e).$msg.'</error>');
462 462
 		}
463 463
 	}
464 464
 
@@ -476,12 +476,12 @@  discard block
 block discarded – undo
476 476
 			try {
477 477
 				$current = $this->remoteStreamService->retrieveRemoteInstance($instance->getInstance());
478 478
 				if ($current->getUid(true) === $instance->getUid(true)) {
479
-					$currentUid = '<info>' . $current->getUid(true) . '</info>';
479
+					$currentUid = '<info>'.$current->getUid(true).'</info>';
480 480
 				} else {
481
-					$currentUid = '<error>' . $current->getUid(true) . '</error>';
481
+					$currentUid = '<error>'.$current->getUid(true).'</error>';
482 482
 				}
483 483
 			} catch (Exception $e) {
484
-				$currentUid = '<error>' . $e->getMessage() . '</error>';
484
+				$currentUid = '<error>'.$e->getMessage().'</error>';
485 485
 			}
486 486
 
487 487
 			$table->appendRow(
@@ -507,7 +507,7 @@  discard block
 block discarded – undo
507 507
 			}
508 508
 		}
509 509
 
510
-		throw new Exception('Unknown type: ' . implode(', ', RemoteInstance::$LIST_TYPE));
510
+		throw new Exception('Unknown type: '.implode(', ', RemoteInstance::$LIST_TYPE));
511 511
 	}
512 512
 
513 513
 	/**
@@ -520,7 +520,7 @@  discard block
 block discarded – undo
520 520
 			}
521 521
 		}
522 522
 
523
-		throw new Exception('Unknown interface: ' . implode(', ', InterfaceService::$LIST_IFACE));
523
+		throw new Exception('Unknown interface: '.implode(', ', InterfaceService::$LIST_IFACE));
524 524
 	}
525 525
 
526 526
 }
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
@@ -50,11 +50,11 @@  discard block
 block discarded – undo
50 50
 
51 51
 	use TArrayTools;
52 52
 
53
-	const TYPE_UNKNOWN = 'Unknown';    // not trusted
54
-	const TYPE_PASSIVE = 'Passive';    // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
55
-	const TYPE_EXTERNAL = 'External';  // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
56
-	const TYPE_TRUSTED = 'Trusted';    // everything about Federated Circles are broadcasted.
57
-	const TYPE_GLOBALSCALE = 'GlobalScale';  // every Circle is broadcasted,
53
+	const TYPE_UNKNOWN = 'Unknown'; // not trusted
54
+	const TYPE_PASSIVE = 'Passive'; // Minimum information about Federated Circles are broadcasted if a member belongs to the circle.
55
+	const TYPE_EXTERNAL = 'External'; // info about Federated Circles and their members are broadcasted  if a member belongs to the circle.
56
+	const TYPE_TRUSTED = 'Trusted'; // everything about Federated Circles are broadcasted.
57
+	const TYPE_GLOBALSCALE = 'GlobalScale'; // every Circle is broadcasted,
58 58
 
59 59
 	public static $LIST_TYPE = [
60 60
 		self::TYPE_UNKNOWN,
@@ -454,7 +454,7 @@  discard block
 block discarded – undo
454 454
 		];
455 455
 
456 456
 		if ($this->getAuthSigned() !== '') {
457
-			$data['auth-signed'] = $this->getAlgorithm() . ':' . $this->getAuthSigned();
457
+			$data['auth-signed'] = $this->getAlgorithm().':'.$this->getAuthSigned();
458 458
 		}
459 459
 
460 460
 		return array_filter(array_merge($data, parent::jsonSerialize()));
@@ -469,17 +469,17 @@  discard block
 block discarded – undo
469 469
 	 * @throws RemoteNotFoundException
470 470
 	 */
471 471
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
472
-		if ($this->getInt($prefix . 'id', $data) === 0) {
472
+		if ($this->getInt($prefix.'id', $data) === 0) {
473 473
 			throw new RemoteNotFoundException();
474 474
 		}
475 475
 
476
-		$this->setDbId($this->getInt($prefix . 'id', $data));
477
-		$this->import($this->getArray($prefix . 'item', $data));
478
-		$this->setOrigData($this->getArray($prefix . 'item', $data));
479
-		$this->setType($this->get($prefix . 'type', $data));
480
-		$this->setInterface($this->getInt($prefix . 'interface', $data));
481
-		$this->setInstance($this->get($prefix . 'instance', $data));
482
-		$this->setId($this->get($prefix . 'href', $data));
476
+		$this->setDbId($this->getInt($prefix.'id', $data));
477
+		$this->import($this->getArray($prefix.'item', $data));
478
+		$this->setOrigData($this->getArray($prefix.'item', $data));
479
+		$this->setType($this->get($prefix.'type', $data));
480
+		$this->setInterface($this->getInt($prefix.'interface', $data));
481
+		$this->setInstance($this->get($prefix.'instance', $data));
482
+		$this->setId($this->get($prefix.'href', $data));
483 483
 
484 484
 		return $this;
485 485
 	}
Please login to merge, or discard this patch.
lib/Model/Circle.php 1 patch
Spacing   +31 added lines, -31 removed lines patch added patch discarded remove patch
@@ -84,26 +84,26 @@  discard block
 block discarded – undo
84 84
 
85 85
 
86 86
 	// specific value
87
-	const CFG_CIRCLE = 0;        // only for code readability. Circle is locked by default.
88
-	const CFG_SINGLE = 1;        // Circle with only one single member.
89
-	const CFG_PERSONAL = 2;      // Personal circle, only the owner can see it.
87
+	const CFG_CIRCLE = 0; // only for code readability. Circle is locked by default.
88
+	const CFG_SINGLE = 1; // Circle with only one single member.
89
+	const CFG_PERSONAL = 2; // Personal circle, only the owner can see it.
90 90
 
91 91
 	// bitwise
92
-	const CFG_SYSTEM = 4;            // System Circle (not managed by the official front-end). Meaning some config are limited
93
-	const CFG_VISIBLE = 8;           // Visible to everyone, if not visible, people have to know its name to be able to find it
94
-	const CFG_OPEN = 16;             // Circle is open, people can join
95
-	const CFG_INVITE = 32;           // Adding a member generate an invitation that needs to be accepted
96
-	const CFG_REQUEST = 64;          // Request to join Circles needs to be confirmed by a moderator
97
-	const CFG_FRIEND = 128;          // Members of the circle can invite their friends
98
-	const CFG_PROTECTED = 256;       // Password protected to join/request
99
-	const CFG_NO_OWNER = 512;        // no owner, only members
100
-	const CFG_HIDDEN = 1024;         // hidden from listing, but available as a share entity
101
-	const CFG_BACKEND = 2048;            // Fully hidden, only backend Circles
102
-	const CFG_LOCAL = 4096;              // Local even on GlobalScale
103
-	const CFG_ROOT = 8192;               // Circle cannot be inside another Circle
104
-	const CFG_CIRCLE_INVITE = 16384;     // Circle must confirm when invited in another circle
105
-	const CFG_FEDERATED = 32768;         // Federated
106
-	const CFG_MOUNTPOINT = 65536;        // Generate a Files folder for this Circle
92
+	const CFG_SYSTEM = 4; // System Circle (not managed by the official front-end). Meaning some config are limited
93
+	const CFG_VISIBLE = 8; // Visible to everyone, if not visible, people have to know its name to be able to find it
94
+	const CFG_OPEN = 16; // Circle is open, people can join
95
+	const CFG_INVITE = 32; // Adding a member generate an invitation that needs to be accepted
96
+	const CFG_REQUEST = 64; // Request to join Circles needs to be confirmed by a moderator
97
+	const CFG_FRIEND = 128; // Members of the circle can invite their friends
98
+	const CFG_PROTECTED = 256; // Password protected to join/request
99
+	const CFG_NO_OWNER = 512; // no owner, only members
100
+	const CFG_HIDDEN = 1024; // hidden from listing, but available as a share entity
101
+	const CFG_BACKEND = 2048; // Fully hidden, only backend Circles
102
+	const CFG_LOCAL = 4096; // Local even on GlobalScale
103
+	const CFG_ROOT = 8192; // Circle cannot be inside another Circle
104
+	const CFG_CIRCLE_INVITE = 16384; // Circle must confirm when invited in another circle
105
+	const CFG_FEDERATED = 32768; // Federated
106
+	const CFG_MOUNTPOINT = 65536; // Generate a Files folder for this Circle
107 107
 
108 108
 	public static $DEF_CFG_MAX = 131071;
109 109
 
@@ -702,22 +702,22 @@  discard block
 block discarded – undo
702 702
 	 * @throws CircleNotFoundException
703 703
 	 */
704 704
 	public function importFromDatabase(array $data, string $prefix = ''): INC22QueryRow {
705
-		if ($this->get($prefix . 'unique_id', $data) === '') {
705
+		if ($this->get($prefix.'unique_id', $data) === '') {
706 706
 			throw new CircleNotFoundException();
707 707
 		}
708 708
 
709
-		$this->setSingleId($this->get($prefix . 'unique_id', $data))
710
-			 ->setName($this->get($prefix . 'name', $data))
711
-			 ->setDisplayName($this->get($prefix . 'display_name', $data))
712
-			 ->setConfig($this->getInt($prefix . 'config', $data))
713
-			 ->setSource($this->getInt($prefix . 'source', $data))
714
-			 ->setInstance($this->get($prefix . 'instance', $data))
715
-			 ->setSettings($this->getArray($prefix . 'settings', $data))
716
-			 ->setContactAddressBook($this->getInt($prefix . 'contact_addressbook', $data))
717
-			 ->setContactGroupName($this->get($prefix . 'contact_groupname', $data))
718
-			 ->setDescription($this->get($prefix . 'description', $data));
719
-
720
-		$creation = $this->get($prefix . 'creation', $data);
709
+		$this->setSingleId($this->get($prefix.'unique_id', $data))
710
+			 ->setName($this->get($prefix.'name', $data))
711
+			 ->setDisplayName($this->get($prefix.'display_name', $data))
712
+			 ->setConfig($this->getInt($prefix.'config', $data))
713
+			 ->setSource($this->getInt($prefix.'source', $data))
714
+			 ->setInstance($this->get($prefix.'instance', $data))
715
+			 ->setSettings($this->getArray($prefix.'settings', $data))
716
+			 ->setContactAddressBook($this->getInt($prefix.'contact_addressbook', $data))
717
+			 ->setContactGroupName($this->get($prefix.'contact_groupname', $data))
718
+			 ->setDescription($this->get($prefix.'description', $data));
719
+
720
+		$creation = $this->get($prefix.'creation', $data);
721 721
 		$this->setCreation(DateTime::createFromFormat('Y-m-d H:i:s', $creation)->getTimestamp());
722 722
 
723 723
 		$this->getManager()->manageImportFromDatabase($this, $data, $prefix);
Please login to merge, or discard this patch.