@@ -46,11 +46,11 @@ discard block |
||
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 |
||
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 |
||
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 | } |
@@ -230,7 +230,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
||
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 |
||
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; |