From 54ac0f31beb98f2ffebe73d517dfa64ce3c75dd1 Mon Sep 17 00:00:00 2001 From: Zephyr Lykos Date: Sat, 22 Jul 2023 14:56:57 +0800 Subject: [PATCH] fix ci --- .../src/Listener/SynchronizeUser.php | 16 ++++++++-------- plugins/yggdrasil-api/src/Models/Profile.php | 8 ++++---- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/forum-integration/src/Listener/SynchronizeUser.php b/plugins/forum-integration/src/Listener/SynchronizeUser.php index fe8c7797..5e81eba7 100644 --- a/plugins/forum-integration/src/Listener/SynchronizeUser.php +++ b/plugins/forum-integration/src/Listener/SynchronizeUser.php @@ -66,9 +66,9 @@ public function synchronize(Events\Event $event) // 首先同步邮箱 if ( - $user->email != $remoteUser->email && - !empty($user->email) && - !empty($remoteUser->email) + $user->email != $remoteUser->email + && !empty($user->email) + && !empty($remoteUser->email) ) { if (option('forum_duplicated_prefer') == 'remote') { $user->email = $remoteUser->email; @@ -94,9 +94,9 @@ public function synchronize(Events\Event $event) $player_name = $player->name; // 同理,保证两边的用户名、绑定角色名一致。 if ( - $player_name != $remoteUser->username && - !empty($player_name) && - !empty($remoteUser->username) + $player_name != $remoteUser->username + && !empty($player_name) + && !empty($remoteUser->username) ) { if (option('forum_duplicated_prefer') == 'remote') { $player_name = $remoteUser->username; @@ -114,8 +114,8 @@ public function synchronize(Events\Event $event) } // 如果两边用户的密码或 salt 不同,就按照「重复处理」选项的定义来处理。 if ( - $user->password != $remoteUser->password || - (!empty($remoteUser->salt) && $user->salt != $remoteUser->salt) + $user->password != $remoteUser->password + || (!empty($remoteUser->salt) && $user->salt != $remoteUser->salt) ) { if (option('forum_duplicated_prefer') == 'remote') { $user->password = $remoteUser->password; diff --git a/plugins/yggdrasil-api/src/Models/Profile.php b/plugins/yggdrasil-api/src/Models/Profile.php index 5321b835..798167c8 100644 --- a/plugins/yggdrasil-api/src/Models/Profile.php +++ b/plugins/yggdrasil-api/src/Models/Profile.php @@ -67,8 +67,8 @@ public function serialize($unsigned = null) $textures['textures']['SKIN']['metadata'] = ['model' => 'slim']; } } elseif ( - Schema::hasTable('mojang_verifications') && - DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists() + Schema::hasTable('mojang_verifications') + && DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists() ) { // 如果该角色没有在皮肤站设置皮肤,就从 Mojang 获取。 $skin = $this->fetchProfileFromMojang('SKIN'); @@ -82,8 +82,8 @@ public function serialize($unsigned = null) 'url' => url("textures/{$this->cape}"), ]; } elseif ( - Schema::hasTable('mojang_verifications') && - DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists() + Schema::hasTable('mojang_verifications') + && DB::table('mojang_verifications')->where('uuid', $this->uuid)->exists() ) { // 如果该角色没有在皮肤站设置披风,就从 Mojang 获取。 $cape = $this->fetchProfileFromMojang('CAPE');