Skip to content

Commit

Permalink
Apply PHP-CS-Fixer coding style fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peter279k committed Sep 19, 2023
1 parent 0547039 commit a4c065b
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 42 deletions.
4 changes: 0 additions & 4 deletions lib/Imgur/Auth/OAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,6 @@ public function getAuthenticationURL(string $responseType = 'code', string $stat

/**
* Exchanges a code/pin for an access token.
*
* @param string $requestType
*/
public function requestAccessToken(string $code, string $requestType = null): array
{
Expand Down Expand Up @@ -166,8 +164,6 @@ public function refreshToken(): array
/**
* Stores the access token, refresh token and expiration date.
*
* @param array $token
*
* @throws AuthException
*/
public function setAccessToken(array $token = null): void
Expand Down
10 changes: 0 additions & 10 deletions lib/Imgur/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ public function __construct(AuthInterface $authenticationClient = null, HttpClie
}

/**
* @param PagerInterface $pager
*
* @throws InvalidArgumentException
*/
public function api(string $name, PagerInterface $pager = null): AbstractApi
Expand Down Expand Up @@ -86,8 +84,6 @@ public function setHttpClient(HttpClientInterface $httpClient): void

/**
* @throws InvalidArgumentException
*
* @return string
*/
public function getOption(string $name): ?string
{
Expand All @@ -99,8 +95,6 @@ public function getOption(string $name): ?string
}

/**
* @param mixed $value
*
* @throws InvalidArgumentException
*/
public function setOption(string $name, $value): void
Expand Down Expand Up @@ -130,8 +124,6 @@ public function getAuthenticationClient(): AuthInterface

/**
* Proxy method for the authentication objects URL building method.
*
* @param string $state
*/
public function getAuthenticationUrl(string $responseType = 'code', string $state = null): string
{
Expand All @@ -148,8 +140,6 @@ public function requestAccessToken(string $code, string $responseType = 'code'):

/**
* Proxy method for retrieving the access token.
*
* @return array
*/
public function getAccessToken(): ?array
{
Expand Down
21 changes: 0 additions & 21 deletions lib/Imgur/HttpClient/HttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,41 +56,26 @@ public function __construct(array $options = [], ClientInterface $client = null,
]);
}

/**
* {@inheritdoc}
*/
public function get($url, array $parameters = []): ResponseInterface
{
return $this->performRequest($url, $parameters, 'GET');
}

/**
* {@inheritdoc}
*/
public function delete($url, array $parameters = []): ResponseInterface
{
return $this->performRequest($url, $parameters, 'DELETE');
}

/**
* {@inheritdoc}
*/
public function post($url, array $parameters = []): ResponseInterface
{
return $this->performRequest($url, $parameters, 'POST');
}

/**
* {@inheritdoc}
*/
public function put($url, array $parameters = []): ResponseInterface
{
return $this->performRequest($url, $parameters, 'PUT');
}

/**
* {@inheritdoc}
*/
public function performRequest($url, $parameters, $httpMethod = 'GET'): ResponseInterface
{
$options = [
Expand All @@ -117,9 +102,6 @@ public function performRequest($url, $parameters, $httpMethod = 'GET'): Response
return $this->client->request($httpMethod, $url, $options);
}

/**
* {@inheritdoc}
*/
public function parseResponse(ResponseInterface $response): array
{
$responseBody = [
Expand All @@ -134,9 +116,6 @@ public function parseResponse(ResponseInterface $response): array
return $responseBody['data'];
}

/**
* {@inheritdoc}
*/
public function addAuthMiddleware($token, string $clientId): void
{
$this->stack->push(Middleware::mapRequest(function (RequestInterface $request) use ($token, $clientId) {
Expand Down
2 changes: 1 addition & 1 deletion lib/Imgur/Middleware/ErrorMiddleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public function checkError(ResponseInterface $response): ?ResponseInterface
return $response;
}

//check if any limit was hit
// check if any limit was hit
$this->checkUserRateLimit($response);
$this->checkClientRateLimit($response);
$this->checkPostRateLimit($response);
Expand Down
4 changes: 0 additions & 4 deletions lib/Imgur/Pager/BasicPager.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ public function getResultsPerPage(): int

/**
* Set the page number to be retrieved.
*
* @return BasicPager
*/
public function setPage(int $page): self
{
Expand All @@ -50,8 +48,6 @@ public function setPage(int $page): self

/**
* Set the number of results per page.
*
* @return BasicPager
*/
public function setResultsPerPage(int $resultsPerPage): self
{
Expand Down
2 changes: 0 additions & 2 deletions tests/Api/ApiTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,6 @@ protected function getApiTopicMock()

/**
* @param class-string $class
*
* @return mixed
*/
private function getApiMock($class)
{
Expand Down

0 comments on commit a4c065b

Please sign in to comment.