From ff6571dca102306dc2589e7d134d4fe186439bb4 Mon Sep 17 00:00:00 2001 From: warcooft Date: Tue, 10 Sep 2024 12:20:10 +0700 Subject: [PATCH] fix: add phpstan-ignore for setting func --- src/Controllers/OAuthController.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Controllers/OAuthController.php b/src/Controllers/OAuthController.php index da3aa49..6fa4c55 100644 --- a/src/Controllers/OAuthController.php +++ b/src/Controllers/OAuthController.php @@ -32,6 +32,7 @@ public function redirectOAuth(string $oauthName): RedirectResponse return redirect()->to(config('Auth')->loginRedirect()); } + /** @phpstan-ignore-next-line */ if (setting('ShieldOAuthConfig.oauthConfigs')[$oauthName]['allow_login'] === false) { $errorText = 'ShieldOAuthLang.' . ucfirst($oauthName) . '.not_allow'; @@ -93,6 +94,7 @@ public function callBack(): RedirectResponse $userid = $this->syncingUserInfo($find, $updateFields); } else { // Check config setting first to see if it can register automatically or not + /** @phpstan-ignore-next-line */ if (setting('ShieldOAuthConfig.oauthConfigs')[$oauthName]['allow_register'] === false) { return redirect()->to(config('Auth')->logoutRedirect())->with('error', lang('ShieldOAuthLang.Callback.account_not_found', [$userInfo->email])); } @@ -164,6 +166,7 @@ private function syncingUserInfo(array $find = [], array $updateFields = []): in $users = model('ShieldOAuthModel'); $user = $users->findByCredentials($find); + /** @phpstan-ignore-next-line */ if (setting('ShieldOAuthConfig.syncingUserInfo') === true) { $user->fill($updateFields); }