Skip to content

Commit 90d22d7

Browse files
committed
Fix static analysis
1 parent cc5f9e4 commit 90d22d7

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

src/Command/CreateClientCommand.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ private function buildClientFromInput(InputInterface $input): Client
111111
/** @var string $identifier */
112112
$identifier = $input->getArgument('identifier') ?? hash('md5', random_bytes(16));
113113

114-
/** @var bool $isPublic */
115114
$isPublic = $input->getOption('public');
116115

117116
if ($isPublic && null !== $input->getArgument('secret')) {

src/Controller/AuthorizationController.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
use League\OAuth2\Server\AuthorizationServer;
1414
use League\OAuth2\Server\Exception\OAuthServerException;
1515
use Psr\Http\Message\ResponseFactoryInterface;
16+
use Psr\Http\Message\ResponseInterface;
1617
use Symfony\Bridge\PsrHttpMessage\HttpFoundationFactoryInterface;
1718
use Symfony\Bridge\PsrHttpMessage\HttpMessageFactoryInterface;
1819
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
@@ -106,7 +107,10 @@ public function indexAction(Request $request): Response
106107
$authRequest->setUser($this->userConverter->toLeague($event->getUser()));
107108

108109
if ($event->hasResponse()) {
109-
return $this->httpFoundationFactory->createResponse($event->getResponse());
110+
/** @var ResponseInterface $response */
111+
$response = $event->getResponse();
112+
113+
return $this->httpFoundationFactory->createResponse($response);
110114
}
111115

112116
$authRequest->setAuthorizationApproved($event->getAuthorizationResolution());

src/Event/ScopeResolveEvent.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ public function getScopes(): array
5252

5353
public function setScopes(Scope ...$scopes): self
5454
{
55+
/** @var list<Scope> $scopes */
5556
$this->scopes = $scopes;
5657

5758
return $this;

src/Manager/InMemory/ClientManager.php

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,13 +69,10 @@ private static function passesFilter(array $clientValues, array $filterValues):
6969
return true;
7070
}
7171

72-
/** @var list<string> $clientValues */
73-
$clientValues = array_map('strval', $clientValues);
74-
/** @var list<string> $filterValues */
75-
$filterValues = array_map('strval', $filterValues);
76-
77-
/** @var list<string> $valuesPassed */
78-
$valuesPassed = array_intersect($filterValues, $clientValues);
72+
$valuesPassed = array_intersect(
73+
array_map('strval', $filterValues),
74+
array_map('strval', $clientValues)
75+
);
7976

8077
return \count($valuesPassed) > 0;
8178
}

src/Model/Client.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ public function getRedirectUris(): array
8686

8787
public function setRedirectUris(RedirectUri ...$redirectUris): self
8888
{
89+
/** @var list<RedirectUri> $redirectUris */
8990
$this->redirectUris = $redirectUris;
9091

9192
return $this;
@@ -103,6 +104,7 @@ public function getGrants(): array
103104

104105
public function setGrants(Grant ...$grants): self
105106
{
107+
/** @var list<Grant> $grants */
106108
$this->grants = $grants;
107109

108110
return $this;
@@ -120,6 +122,7 @@ public function getScopes(): array
120122

121123
public function setScopes(Scope ...$scopes): self
122124
{
125+
/** @var list<Scope> $scopes */
123126
$this->scopes = $scopes;
124127

125128
return $this;

0 commit comments

Comments
 (0)