Skip to content

Commit 2f48e1f

Browse files
authored
Add return types to fetchAccessToken() (#456)
1 parent 4e902cc commit 2f48e1f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

src/Security/Authenticator/OAuth2Authenticator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use KnpU\OAuth2ClientBundle\Security\Helper\PreviousUrlHelper;
2121
use KnpU\OAuth2ClientBundle\Security\Helper\SaveAuthFailureMessage;
2222
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
23+
use League\OAuth2\Client\Token\AccessToken;
2324
use Symfony\Component\Security\Http\Authenticator\AbstractAuthenticator;
2425

2526
abstract class OAuth2Authenticator extends AbstractAuthenticator
@@ -28,6 +29,9 @@ abstract class OAuth2Authenticator extends AbstractAuthenticator
2829
use PreviousUrlHelper;
2930
use SaveAuthFailureMessage;
3031

32+
/**
33+
* @return AccessToken
34+
*/
3135
protected function fetchAccessToken(OAuth2ClientInterface $client, array $options = [])
3236
{
3337
try {

src/Security/Authenticator/SocialAuthenticator.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
use KnpU\OAuth2ClientBundle\Security\Helper\PreviousUrlHelper;
2121
use KnpU\OAuth2ClientBundle\Security\Helper\SaveAuthFailureMessage;
2222
use League\OAuth2\Client\Provider\Exception\IdentityProviderException;
23+
use League\OAuth2\Client\Token\AccessToken;
2324
use Symfony\Component\Security\Core\User\UserInterface;
2425
use Symfony\Component\Security\Guard\AbstractGuardAuthenticator;
2526

@@ -29,6 +30,9 @@ abstract class SocialAuthenticator extends AbstractGuardAuthenticator
2930
use PreviousUrlHelper;
3031
use SaveAuthFailureMessage;
3132

33+
/**
34+
* @return AccessToken
35+
*/
3236
protected function fetchAccessToken(OAuth2ClientInterface $client, array $options = [])
3337
{
3438
try {

0 commit comments

Comments
 (0)