From ecd506bc798ca0e8823668ca17a30c7ef08f65fa Mon Sep 17 00:00:00 2001 From: Robyn <16455953+robiiinos@users.noreply.github.com> Date: Wed, 21 Oct 2020 00:15:02 +0200 Subject: [PATCH] fix: symfony insight (#176) --- src/OAuth1/AbstractProvider.php | 5 ++++- src/SocialiteWasCalled.php | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/OAuth1/AbstractProvider.php b/src/OAuth1/AbstractProvider.php index 9ba50df..1099952 100644 --- a/src/OAuth1/AbstractProvider.php +++ b/src/OAuth1/AbstractProvider.php @@ -5,6 +5,7 @@ use Illuminate\Http\RedirectResponse; use InvalidArgumentException; use Laravel\Socialite\One\AbstractProvider as BaseProvider; +use League\OAuth1\Client\Credentials\CredentialsException; use League\OAuth1\Client\Credentials\TokenCredentials; use SocialiteProviders\Manager\ConfigTrait; use SocialiteProviders\Manager\Contracts\ConfigInterface as Config; @@ -39,6 +40,8 @@ public static function serviceContainerKey($providerName) /** * {@inheritdoc} + * + * @throws \League\OAuth1\Client\Credentials\CredentialsException */ public function user() { @@ -86,7 +89,7 @@ public function userFromTokenAndSecret($token, $secret) /** * Redirect the user to the authentication page for the provider. * - * @return RedirectResponse + * @return \Illuminate\Http\RedirectResponse */ public function redirect() { diff --git a/src/SocialiteWasCalled.php b/src/SocialiteWasCalled.php index ff299f0..ab33efd 100644 --- a/src/SocialiteWasCalled.php +++ b/src/SocialiteWasCalled.php @@ -150,7 +150,7 @@ protected function buildOAuth2Provider(SocialiteManager $socialite, $providerCla * * @throws \SocialiteProviders\Manager\Exception\MissingConfigException */ - protected function getConfig($providerClass, $providerName) + protected function getConfig(string $providerClass, string $providerName) { return $this->configRetriever->fromServices( $providerName, $providerClass::additionalConfigKeys()