Skip to content

Commit 95ca89e

Browse files
Add override attribute
1 parent b86ea3d commit 95ca89e

File tree

5 files changed

+17
-0
lines changed

5 files changed

+17
-0
lines changed

src/Http/Responses/LoginResponseHandler.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99

1010
class LoginResponseHandler implements LoginResponseHandlerInterface
1111
{
12+
#[\Override]
1213
public function handleLoginResponse(object $userInfo): Response
1314
{
1415
return new JsonResponse([

src/OpenIDConnectClient.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ public function __construct(
4040
$this->openIDConfiguration = $openIDConfiguration;
4141
}
4242

43+
#[\Override]
4344
protected function startSession(): void
4445
{
4546
// Laravel magic in the background :)
4647
}
4748

49+
#[\Override]
4850
protected function commitSession(): void
4951
{
5052
Session::save();
@@ -53,6 +55,7 @@ protected function commitSession(): void
5355
/**
5456
* @param string $key
5557
*/
58+
#[\Override]
5659
protected function getSessionKey($key): mixed
5760
{
5861
if (!Session::has($key)) {
@@ -66,6 +69,7 @@ protected function getSessionKey($key): mixed
6669
* @param string $key
6770
* @param mixed $value mixed
6871
*/
72+
#[\Override]
6973
protected function setSessionKey($key, $value): void
7074
{
7175
Session::put($key, $value);
@@ -74,6 +78,7 @@ protected function setSessionKey($key, $value): void
7478
/**
7579
* @param string $key
7680
*/
81+
#[\Override]
7782
protected function unsetSessionKey($key): void
7883
{
7984
Session::remove($key);
@@ -84,6 +89,7 @@ protected function unsetSessionKey($key): void
8489
* @return string the JWT payload
8590
* @throws OpenIDConnectClientException
8691
*/
92+
#[\Override]
8793
protected function handleJweResponse($jwe): string
8894
{
8995
if ($this->jweDecrypter === null) {
@@ -102,6 +108,7 @@ protected function handleJweResponse($jwe): string
102108
* @throws OpenIDConnectClientException
103109
* @return string|string[]|bool
104110
*/
111+
#[\Override]
105112
protected function getWellKnownConfigValue($param, $default = null): string|array|bool
106113
{
107114
if ($this->openIDConfiguration === null) {
@@ -137,6 +144,7 @@ public function setLoginHint(?string $loginHint = null): void
137144
* @return void
138145
* @throws OpenIDConnectClientException
139146
*/
147+
#[\Override]
140148
public function redirect($url): void
141149
{
142150
throw new HttpResponseException(new RedirectResponse($url));
@@ -173,6 +181,7 @@ protected function getAuthorizationEndpoint(): string
173181
* @throws OpenIDConnectClientException
174182
*/
175183
protected function fetchURL(string $url, string $post_body = null, array $headers = []): string
184+
#[\Override]
176185
{
177186
$pendingRequest = Http::withUserAgent($this->getUserAgent())
178187
->timeout($this->timeOut)
@@ -211,6 +220,7 @@ protected function fetchURL(string $url, string $post_body = null, array $header
211220
*
212221
* @return int
213222
*/
223+
#[\Override]
214224
public function getResponseCode(): int
215225
{
216226
return $this->responseCode ?? 0;
@@ -221,6 +231,7 @@ public function getResponseCode(): int
221231
*
222232
* @return string|null
223233
*/
234+
#[\Override]
224235
public function getResponseContentType(): ?string
225236
{
226237
return $this->internalResponseContentType;

src/OpenIDConnectServiceProvider.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525

2626
class OpenIDConnectServiceProvider extends ServiceProvider
2727
{
28+
#[\Override]
2829
public function register(): void
2930
{
3031
$this->mergeConfigFrom(__DIR__ . '/../config/oidc.php', 'oidc');

src/Services/ExceptionHandler.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ public function __construct(
1717
) {
1818
}
1919

20+
#[\Override]
2021
public function handleExceptionWhileAuthenticate(OpenIDConnectClientException $exception): Response
2122
{
2223
if (str_starts_with($exception->getMessage(), 'Error: ')) {
@@ -38,6 +39,7 @@ public function handleExceptionWhileAuthenticate(OpenIDConnectClientException $e
3839
* @param OpenIDConnectClientException $exception
3940
* @return Response
4041
*/
42+
#[\Override]
4143
public function handleExceptionWhileRequestUserInfo(OpenIDConnectClientException $exception): Response
4244
{
4345
$this->logger?->error('OIDC Exception occurred while requesting user info', [
@@ -47,6 +49,7 @@ public function handleExceptionWhileRequestUserInfo(OpenIDConnectClientException
4749
return $this->defaultResponse($exception);
4850
}
4951

52+
#[\Override]
5053
public function handleException(Exception $exception): Response
5154
{
5255
$this->logger?->error('OIDC Generic exception occurred', [

src/Services/JWE/JweDecryptService.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public function __construct(
3535
/**
3636
* @throws JweDecryptException
3737
*/
38+
#[\Override]
3839
public function decrypt(string $jweString): string
3940
{
4041
$jwe = $this->serializerManager->unserialize($jweString);

0 commit comments

Comments
 (0)