style: auto-fix 1340 phpcs PSR-12 violations via phpcbf; exclude MissingNamespace and SideEffects
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* SynapseHelper
|
||||
*
|
||||
@@ -11,8 +12,8 @@
|
||||
* SYNAPSE_ADMIN_URL e.g. http://10.10.10.29:8008 (internal client-API URL)
|
||||
* SYNAPSE_ADMIN_TOKEN a Synapse admin access token
|
||||
*/
|
||||
class SynapseHelper {
|
||||
|
||||
class SynapseHelper
|
||||
{
|
||||
/**
|
||||
* Resolve a local SSO username to its Matrix user ID.
|
||||
*
|
||||
@@ -26,7 +27,8 @@ class SynapseHelper {
|
||||
* @param string $username Local username (e.g. "jared")
|
||||
* @return string|null Matrix user ID (e.g. "@jared:matrix.lotusguild.org") or null
|
||||
*/
|
||||
public static function resolveUsername(string $username): ?string {
|
||||
public static function resolveUsername(string $username): ?string
|
||||
{
|
||||
$baseUrl = $GLOBALS['config']['SYNAPSE_ADMIN_URL'] ?? null;
|
||||
$token = $GLOBALS['config']['SYNAPSE_ADMIN_TOKEN'] ?? null;
|
||||
$domain = $GLOBALS['config']['MATRIX_DOMAIN'] ?? null;
|
||||
@@ -82,7 +84,8 @@ class SynapseHelper {
|
||||
* @param string[] $usernames
|
||||
* @return string[] Matrix user IDs
|
||||
*/
|
||||
public static function resolveUsernames(array $usernames): array {
|
||||
public static function resolveUsernames(array $usernames): array
|
||||
{
|
||||
$ids = [];
|
||||
foreach ($usernames as $username) {
|
||||
$id = self::resolveUsername($username);
|
||||
@@ -93,4 +96,3 @@ class SynapseHelper {
|
||||
return $ids;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user