Skip to content

Commit

Permalink
Use fully qualified name
Browse files Browse the repository at this point in the history
  • Loading branch information
mattamon committed Mar 5, 2024
1 parent ae03170 commit 3bebd96
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ApiPlatform/OpenApiFactoryDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,11 @@
use ApiPlatform\OpenApi\Factory\OpenApiFactoryInterface;
use ApiPlatform\OpenApi\Model\SecurityScheme;
use ApiPlatform\OpenApi\OpenApi;
use ArrayObject;

final readonly class OpenApiFactoryDecorator implements OpenApiFactoryInterface
{
private const ACCESS_TOKEN = 'access_token';
public function __construct(private OpenApiFactoryInterface $decorated)
{
}
Expand All @@ -30,8 +32,8 @@ public function __invoke(array $context = []): OpenApi
{
$openApi = $this->decorated->__invoke($context);

$securitySchemes = $openApi->getComponents()->getSecuritySchemes() ?: new \ArrayObject();
$securitySchemes['access_token'] = new SecurityScheme(
$securitySchemes = $openApi->getComponents()->getSecuritySchemes() ?: new ArrayObject();
$securitySchemes[self::ACCESS_TOKEN] = new SecurityScheme(

Check notice on line 36 in src/ApiPlatform/OpenApiFactoryDecorator.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Parameter/variable is not used

\[EA\] Parameter/variable is overridden, but is never used or appears outside of the scope.

Check notice on line 36 in src/ApiPlatform/OpenApiFactoryDecorator.php

View workflow job for this annotation

GitHub Actions / Qodana for PHP

Parameter/variable is not used

\[EA\] Parameter/variable is overridden, but is never used or appears outside of the scope.
type: 'http',
scheme: 'bearer',
);
Expand Down

0 comments on commit 3bebd96

Please sign in to comment.