Skip to content

Commit a22a2e7

Browse files
committed
fix(psalm): Remove entries from the baseline
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
1 parent 80f412e commit a22a2e7

3 files changed

Lines changed: 2 additions & 21 deletions

File tree

apps/oauth2/lib/Controller/OauthApiController.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ public function __construct(
7070
* Get a token
7171
*
7272
* @param 'authorization_code'|'refresh_token' $grant_type Token type that should be granted
73-
* @psalm-param string $grant_type
7473
* @param ?string $code Code of the flow
7574
* @param ?string $refresh_token Refresh token
7675
* @param ?string $client_id Client ID
@@ -90,6 +89,7 @@ public function getToken(
9089
): JSONResponse {
9190

9291
// We only handle two types
92+
/** @psalm-suppress DocblockTypeContradiction We don't trust user input */
9393
if ($grant_type !== 'authorization_code' && $grant_type !== 'refresh_token') {
9494
$response = new JSONResponse([
9595
'error' => 'invalid_grant',

apps/oauth2/tests/Controller/OauthApiControllerTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,7 @@ public function testGetTokenInvalidGrantType(): void {
124124
], Http::STATUS_BAD_REQUEST);
125125
$expected->throttle(['invalid_grant' => 'foo']);
126126

127+
/** @psalm-suppress InvalidArgument Test that we don't trust user input */
127128
$this->assertEquals($expected, $this->oauthApiController->getToken('foo', null, null, null, null));
128129
}
129130

build/psalm-baseline.xml

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2226,26 +2226,6 @@
22262226
<code><![CDATA[setUserValue]]></code>
22272227
</DeprecatedMethod>
22282228
</file>
2229-
<file src="apps/oauth2/lib/Controller/LoginRedirectorController.php">
2230-
<DeprecatedMethod>
2231-
<code><![CDATA[generate]]></code>
2232-
</DeprecatedMethod>
2233-
</file>
2234-
<file src="apps/oauth2/lib/Controller/OauthApiController.php">
2235-
<DeprecatedMethod>
2236-
<code><![CDATA[generate]]></code>
2237-
<code><![CDATA[generate]]></code>
2238-
</DeprecatedMethod>
2239-
<NoInterfaceProperties>
2240-
<code><![CDATA[$this->request->server]]></code>
2241-
</NoInterfaceProperties>
2242-
</file>
2243-
<file src="apps/oauth2/lib/Service/ClientService.php">
2244-
<DeprecatedMethod>
2245-
<code><![CDATA[generate]]></code>
2246-
<code><![CDATA[generate]]></code>
2247-
</DeprecatedMethod>
2248-
</file>
22492229
<file src="apps/provisioning_api/lib/Controller/AUserDataOCSController.php">
22502230
<DeprecatedClass>
22512231
<code><![CDATA[\OC_Util::setupFS($user->getUID())]]></code>

0 commit comments

Comments
 (0)