Skip to content

Commit

Permalink
Fix styling
Browse files Browse the repository at this point in the history
  • Loading branch information
romalytvynenko authored and github-actions[bot] committed Sep 20, 2022
1 parent 10b0edd commit 338a0e6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/Support/Generator/SecuritySchemes/OAuthFlow.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,32 @@
class OAuthFlow
{
public string $authorizationUrl = '';

public string $tokenUrl = '';

public string $refreshUrl = '';

/** @var array<string, string> */
public array $scopes = [];

public function authorizationUrl(string $authorizationUrl): OAuthFlow
{
$this->authorizationUrl = $authorizationUrl;

return $this;
}

public function tokenUrl(string $tokenUrl): OAuthFlow
{
$this->tokenUrl = $tokenUrl;

return $this;
}

public function refreshUrl(string $refreshUrl): OAuthFlow
{
$this->refreshUrl = $refreshUrl;

return $this;
}

Expand Down
7 changes: 7 additions & 0 deletions src/Support/Generator/SecuritySchemes/OAuthFlows.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,38 @@
class OAuthFlows
{
public ?OAuthFlow $implicit = null;

public ?OAuthFlow $password = null;

public ?OAuthFlow $clientCredentials = null;

public ?OAuthFlow $authorizationCode = null;

public function implicit(?OAuthFlow $flow): OAuthFlows
{
$this->implicit = $flow;

return $this;
}

public function password(?OAuthFlow $flow): OAuthFlows
{
$this->password = $flow;

return $this;
}

public function clientCredentials(?OAuthFlow $flow): OAuthFlows
{
$this->clientCredentials = $flow;

return $this;
}

public function authorizationCode(?OAuthFlow $flow): OAuthFlows
{
$this->authorizationCode = $flow;

return $this;
}

Expand Down
2 changes: 1 addition & 1 deletion tests/OpenApiBuildersTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
'type' => 'apiKey',
'in' => 'query',
'name' => 'api_token',
]
],
]);
});

Expand Down

0 comments on commit 338a0e6

Please sign in to comment.