Skip to content

Commit 9823750

Browse files
committed
Upgrade to PHPStan 2
1 parent e94c384 commit 9823750

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

composer.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,18 +24,18 @@
2424
"league/oauth2-client": "^2.4.1"
2525
},
2626
"require-dev": {
27-
"friendsofphp/php-cs-fixer": "^3.37.1",
28-
"guzzlehttp/psr7": "^2.6.1",
27+
"friendsofphp/php-cs-fixer": "^3.65.0",
28+
"guzzlehttp/psr7": "^2.7.0",
2929
"http-interop/http-factory-guzzle": "^1.2",
30-
"infection/infection": "^0.27.7",
31-
"m4tthumphrey/php-gitlab-api": "^11.12",
32-
"mockery/mockery": "^1.6.6",
33-
"php-http/guzzle7-adapter": "^1.0.0",
34-
"phpstan/extension-installer": "^1.3.1",
35-
"phpstan/phpstan": "^1.10.41",
36-
"phpstan/phpstan-mockery": "^1.1.1",
37-
"phpstan/phpstan-phpunit": "^1.3.15",
38-
"phpunit/phpunit": "^10.4.2"
30+
"infection/infection": "^0.27.11",
31+
"m4tthumphrey/php-gitlab-api": "^11.14",
32+
"mockery/mockery": "^1.6.12",
33+
"php-http/guzzle7-adapter": "^1.1.0",
34+
"phpstan/extension-installer": "^1.4.3",
35+
"phpstan/phpstan": "^2.0.4",
36+
"phpstan/phpstan-mockery": "^2.0.0",
37+
"phpstan/phpstan-phpunit": "^2.0.3",
38+
"phpunit/phpunit": "^10.5.39"
3939
},
4040
"suggest": {
4141
"m4tthumphrey/php-gitlab-api": "For further API usage using the acquired OAuth2 token"

src/Provider/Gitlab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ protected function getScopeSeparator(): string
9090
* Check a provider response for errors.
9191
*
9292
* @param ResponseInterface $response Parsed response data
93-
* @param array{error?: string, message?: string}|mixed $data
93+
* @param array{error?: string, message?: string}|scalar $data
9494
* @throws IdentityProviderException
9595
*/
9696
protected function checkResponse(ResponseInterface $response, mixed $data): void

test/src/Provider/GitlabTest.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ public function testAuthorizationUrl(): void
6666
$this->assertArrayHasKey('scope', $query);
6767
$this->assertArrayHasKey('response_type', $query);
6868
$this->assertArrayHasKey('approval_prompt', $query);
69-
$this->assertNotNull($this->provider->getState());
69+
$this->assertNotEmpty($this->provider->getState());
7070
}
7171

7272
public function testScopes(): void
@@ -224,7 +224,8 @@ public function testDefaultValuesForResourceOwner(): void
224224
public function testApiClient(GitlabResourceOwner $owner): void
225225
{
226226
$client = $owner->getApiClient();
227-
$this->assertInstanceOf(\Gitlab\Client::class, $client);
227+
228+
$this->assertSame(\Gitlab\Client::class, get_class($client));
228229
}
229230

230231
/**

0 commit comments

Comments
 (0)