Skip to content

Commit a1f75bf

Browse files
authored
Merge pull request #49 from j0k3r/dependabot/github_actions/ramsey/composer-install-3
Bump ramsey/composer-install from 2 to 3
2 parents 6da5dfa + 6025cff commit a1f75bf

File tree

8 files changed

+15
-15
lines changed

8 files changed

+15
-15
lines changed

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434

3535
- name: "Install dependencies with Composer"
36-
uses: "ramsey/composer-install@v2"
36+
uses: "ramsey/composer-install@v3"
3737

3838
- name: "Run PHP CS Fixer"
3939
run: "vendor/bin/php-cs-fixer fix --verbose --dry-run"

.github/workflows/continuous-integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4343

4444
- name: "Install dependencies with Composer"
45-
uses: "ramsey/composer-install@v2"
45+
uses: "ramsey/composer-install@v3"
4646

4747
- name: "Run PHPUnit"
4848
run: "php vendor/bin/simple-phpunit -v"
@@ -74,7 +74,7 @@ jobs:
7474
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
7575

7676
- name: "Install dependencies with Composer"
77-
uses: "ramsey/composer-install@v2"
77+
uses: "ramsey/composer-install@v3"
7878

7979
- name: "Setup logs"
8080
run: "mkdir -p build/logs"

lib/Imgur/Api/AbstractApi.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ abstract class AbstractApi
2323
*/
2424
protected $pager;
2525

26-
public function __construct(Client $client, PagerInterface $pager = null)
26+
public function __construct(Client $client, ?PagerInterface $pager = null)
2727
{
2828
$this->client = $client;
2929
$this->pager = $pager;

lib/Imgur/Auth/AuthInterface.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ interface AuthInterface
1515
* @param string $responseType (code, token, pin) Determines if Imgur should return an authorization_code, a PIN code, or an opaque access_token
1616
* @param string $state Any value which you want Imgur to pass back
1717
*/
18-
public function getAuthenticationUrl(string $responseType = 'code', string $state = null): string;
18+
public function getAuthenticationUrl(string $responseType = 'code', ?string $state = null): string;
1919

2020
public function getAccessToken(): ?array;
2121

22-
public function requestAccessToken(string $code, string $requestType = null): array;
22+
public function requestAccessToken(string $code, ?string $requestType = null): array;
2323

2424
public function setAccessToken(array $accessToken): void;
2525

lib/Imgur/Auth/OAuth2.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public function __construct(HttpClientInterface $httpClient, string $clientId, s
7272
/**
7373
* Generates the authentication URL to which a user should be pointed at in order to start the OAuth2 process.
7474
*/
75-
public function getAuthenticationURL(string $responseType = 'code', string $state = null): string
75+
public function getAuthenticationURL(string $responseType = 'code', ?string $state = null): string
7676
{
7777
$httpQueryParameters = [
7878
'client_id' => $this->clientId,
@@ -88,7 +88,7 @@ public function getAuthenticationURL(string $responseType = 'code', string $stat
8888
/**
8989
* Exchanges a code/pin for an access token.
9090
*/
91-
public function requestAccessToken(string $code, string $requestType = null): array
91+
public function requestAccessToken(string $code, ?string $requestType = null): array
9292
{
9393
switch ($requestType) {
9494
case 'pin':
@@ -166,7 +166,7 @@ public function refreshToken(): array
166166
*
167167
* @throws AuthException
168168
*/
169-
public function setAccessToken(array $token = null): void
169+
public function setAccessToken(?array $token = null): void
170170
{
171171
if (!\is_array($token)) {
172172
throw new AuthException('Token is not a valid json string.');

lib/Imgur/Client.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ class Client
4242
*
4343
* @param HttpClientInterface|null $httpClient Imgur http client
4444
*/
45-
public function __construct(AuthInterface $authenticationClient = null, HttpClientInterface $httpClient = null)
45+
public function __construct(?AuthInterface $authenticationClient = null, ?HttpClientInterface $httpClient = null)
4646
{
4747
$this->httpClient = $httpClient;
4848
$this->authenticationClient = $authenticationClient;
@@ -51,7 +51,7 @@ public function __construct(AuthInterface $authenticationClient = null, HttpClie
5151
/**
5252
* @throws InvalidArgumentException
5353
*/
54-
public function api(string $name, PagerInterface $pager = null): AbstractApi
54+
public function api(string $name, ?PagerInterface $pager = null): AbstractApi
5555
{
5656
if (!$this->getAccessToken()) {
5757
$this->sign();
@@ -97,7 +97,7 @@ public function getOption(string $name): ?string
9797
/**
9898
* @throws InvalidArgumentException
9999
*/
100-
public function setOption(string $name, string $value = null): void
100+
public function setOption(string $name, ?string $value = null): void
101101
{
102102
if (!\array_key_exists($name, $this->options)) {
103103
throw new InvalidArgumentException(sprintf('Undefined option called: "%s"', $name));
@@ -125,7 +125,7 @@ public function getAuthenticationClient(): AuthInterface
125125
/**
126126
* Proxy method for the authentication objects URL building method.
127127
*/
128-
public function getAuthenticationUrl(string $responseType = 'code', string $state = null): string
128+
public function getAuthenticationUrl(string $responseType = 'code', ?string $state = null): string
129129
{
130130
return $this->getAuthenticationClient()->getAuthenticationUrl($responseType, $state);
131131
}

lib/Imgur/HttpClient/HttpClient.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class HttpClient implements HttpClientInterface
3737
/** @var HandlerStack */
3838
protected $stack;
3939

40-
public function __construct(array $options = [], ClientInterface $client = null, HandlerStack $stack = null)
40+
public function __construct(array $options = [], ?ClientInterface $client = null, ?HandlerStack $stack = null)
4141
{
4242
$this->options = array_merge($options, $this->options);
4343

tests/HttpClient/HttpClientTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@ class TestHttpClient extends HttpClient
292292
/**
293293
* @return array|string|null
294294
*/
295-
public function getOption(string $name, string $default = null)
295+
public function getOption(string $name, ?string $default = null)
296296
{
297297
return $this->options[$name] ?? $default;
298298
}

0 commit comments

Comments
 (0)