Skip to content

Commit 6378ff1

Browse files
committed
Don't make classes final, despite the complaints of Psalm
1 parent 496b973 commit 6378ff1

10 files changed

+22
-10
lines changed

src/Exception/OAuthException.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
/**
1010
* Represents errors during OAuth protocol.
11+
* @psalm-api
1112
*/
12-
final class OAuthException extends RuntimeException implements OAuthExceptionInterface
13+
class OAuthException extends RuntimeException implements OAuthExceptionInterface
1314
{
1415
}

src/GrantType/AuthorizationCodeGrantType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Implementation of the OAuth authorization grant type.
1212
* @psalm-api
1313
*/
14-
final class AuthorizationCodeGrantType implements RefreshableGrantTypeInterface
14+
class AuthorizationCodeGrantType implements RefreshableGrantTypeInterface
1515
{
1616
use TokensExtractor;
1717

src/GrantType/ClientCredentialsGrantType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Implementation of the OAuth client credentials grant type.
1212
* @psalm-api
1313
*/
14-
final class ClientCredentialsGrantType implements GrantTypeInterface
14+
class ClientCredentialsGrantType implements GrantTypeInterface
1515
{
1616
use TokensExtractor;
1717

src/GrantType/PasswordGrantType.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Implementation of the OAuth password grant type.
1212
* @psalm-api
1313
*/
14-
final class PasswordGrantType implements GrantTypeInterface
14+
class PasswordGrantType implements GrantTypeInterface
1515
{
1616
use TokensExtractor;
1717

src/GrantType/RefreshTokenGrantType.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@
99

1010
/**
1111
* Implementation of the OAuth refresh token grant type.
12+
* @psalm-api
1213
*/
13-
final class RefreshTokenGrantType implements GrantTypeInterface
14+
class RefreshTokenGrantType implements GrantTypeInterface
1415
{
1516
use TokensExtractor;
1617

src/GrantType/Tokens.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,9 @@
66

77
/**
88
* Value object for an access token and a refresh token.
9+
* @psalm-api
910
*/
10-
final class Tokens
11+
class Tokens
1112
{
1213
private string $accessToken;
1314

src/RequestSigner/BearerHeaderRequestSigner.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,10 @@
44

55
namespace BenjaminFavre\OAuthHttpClient\RequestSigner;
66

7-
final class BearerHeaderRequestSigner extends HeaderRequestSigner
7+
/**
8+
* @psalm-api
9+
*/
10+
class BearerHeaderRequestSigner extends HeaderRequestSigner
811
{
912
public function __construct()
1013
{

src/ResponseChecker/StatusCode401ResponseChecker.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,10 @@
66

77
use Symfony\Contracts\HttpClient\ResponseInterface;
88

9-
final class StatusCode401ResponseChecker implements ResponseCheckerInterface
9+
/**
10+
* @psalm-api
11+
*/
12+
class StatusCode401ResponseChecker implements ResponseCheckerInterface
1013
{
1114
#[\Override]
1215
public function hasAuthenticationFailed(ResponseInterface $response): bool

src/TokensCache/MemoryTokensCache.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
use BenjaminFavre\OAuthHttpClient\GrantType\GrantTypeInterface;
88
use BenjaminFavre\OAuthHttpClient\GrantType\Tokens;
99

10-
final class MemoryTokensCache implements TokensCacheInterface
10+
/**
11+
* @psalm-api
12+
*/
13+
class MemoryTokensCache implements TokensCacheInterface
1114
{
1215
private ?Tokens $tokens = null;
1316

src/TokensCache/SymfonyTokensCacheAdapter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
/**
1313
* @psalm-api
1414
*/
15-
final class SymfonyTokensCacheAdapter implements TokensCacheInterface
15+
class SymfonyTokensCacheAdapter implements TokensCacheInterface
1616
{
1717
private CacheInterface $cache;
1818

0 commit comments

Comments
 (0)