Skip to content

Commit

Permalink
fix issues reported by PHPStan
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jan 1, 2025
1 parent f77a9bc commit 353e87c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ name: CI

on:
push:
branches:
- master
paths-ignore:
- '**.md'
pull_request:
paths:
- '.github/workflows/**'
Expand Down
1 change: 1 addition & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@ parameters:
- '#Parameter \$event of method HWI\\Bundle\\OAuthBundle\\Controller\\Connect\\AbstractController::dispatch\(\) has invalid type Symfony\\Component\\EventDispatcher\\Event.#'
- '#Parameter \#2 \$array of function implode expects array<string>, array<int, array\|string\|null> given.#'
- '#PHPDoc type DOMNode of property HWI\\Bundle\\OAuthBundle\\OAuth\\Response\\SensioConnectUserResponse::\$data is not covariant with PHPDoc type array of overridden property HWI\\Bundle\\OAuthBundle\\OAuth\\Response\\AbstractUserResponse::\$data#'
- '#Call to function method_exists\(\) with Symfony\\Component\\Security\\Http\\Authenticator\\Debug\\TraceableAuthenticator#'
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ private function registerResourceOwnerTypeClassParameters(ContainerBuilder $cont
return;
}

if (!($match['type'] ?? null)) {
if (!$match['type']) {
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion src/Security/Http/Firewall/RefreshAccessTokenListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ protected function refreshToken(OAuthToken $token): OAuthToken
return $this->authenticator->refreshToken($token);
}

if ($this->authenticator instanceof TraceableAuthenticator) {
if ($this->authenticator instanceof TraceableAuthenticator && method_exists($this->authenticator, 'getAuthenticator')) {
$authenticator = $this->authenticator->getAuthenticator();

if ($authenticator instanceof OAuthAuthenticator) {
Expand Down

0 comments on commit 353e87c

Please sign in to comment.