Skip to content

Commit

Permalink
Fix styleci issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Sephster committed May 13, 2024
1 parent 7795ca2 commit 92c6519
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 0 additions & 2 deletions src/Exception/OAuthServerException.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@
use function htmlspecialchars;
use function http_build_query;
use function sprintf;
use function strpos;
use function strstr;

class OAuthServerException extends Exception
{
Expand Down
8 changes: 7 additions & 1 deletion src/Grant/AbstractGrant.php
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,7 @@ protected function getClientEntityOrFail(string $clientId, ServerRequestInterfac
* the Http Basic Authorization header
*
* @return array{0:non-empty-string,1:string}
*
* @throws OAuthServerException
*/
protected function getClientCredentials(ServerRequestInterface $request): array
Expand Down Expand Up @@ -281,14 +282,15 @@ private function convertScopesQueryStringToArray(string $scopes): array
* @param array<array-key, mixed> $request
*
* @return non-empty-string|null
*
* @throws OAuthServerException
*/
private static function parseParam(string $parameter, array $request, ?string $default = null): ?string
{
$value = $request[$parameter] ?? '';

if (is_scalar($value)) {
$value = trim((string)$value);
$value = trim((string) $value);
} else {
throw OAuthServerException::invalidRequest($parameter);
}
Expand All @@ -308,6 +310,7 @@ private static function parseParam(string $parameter, array $request, ?string $d
* Retrieve request parameter.
*
* @return non-empty-string|null
*
* @throws OAuthServerException
*/
protected function getRequestParameter(string $parameter, ServerRequestInterface $request, ?string $default = null): ?string
Expand Down Expand Up @@ -358,6 +361,7 @@ protected function getBasicAuthCredentials(ServerRequestInterface $request): arr
* Retrieve query string parameter.
*
* @return non-empty-string|null
*
* @throws OAuthServerException
*/
protected function getQueryStringParameter(string $parameter, ServerRequestInterface $request, ?string $default = null): ?string
Expand All @@ -369,6 +373,7 @@ protected function getQueryStringParameter(string $parameter, ServerRequestInter
* Retrieve cookie parameter.
*
* @return non-empty-string|null
*
* @throws OAuthServerException
*/
protected function getCookieParameter(string $parameter, ServerRequestInterface $request, ?string $default = null): ?string
Expand All @@ -380,6 +385,7 @@ protected function getCookieParameter(string $parameter, ServerRequestInterface
* Retrieve server parameter.
*
* @return non-empty-string|null
*
* @throws OAuthServerException
*/
protected function getServerParameter(string $parameter, ServerRequestInterface $request, ?string $default = null): ?string
Expand Down

0 comments on commit 92c6519

Please sign in to comment.