Fix token trait PHPStan static access

This commit is contained in:
Chirag Aggarwal 2026-03-31 22:23:37 +05:30
parent 18ed6a9c59
commit b4085d1083
2 changed files with 4 additions and 10 deletions

View file

@ -1168,12 +1168,6 @@ parameters:
identifier: method.notFound
count: 1
path: tests/e2e/Services/TablesDB/Permissions/TablesDBPermissionsTeamTest.php
-
message: '#^Unsafe access to private property Tests\\E2E\\Services\\Tokens\\TokensCustomClientTest\:\:\$bucketAndFileData through static\:\:\.$#'
identifier: staticClassAccess.privateProperty
count: 4
path: tests/e2e/Services/Tokens/TokensCustomClientTest.php
-
message: '#^Unsafe access to private property Tests\\E2E\\Services\\Users\\UsersCustomServerTest\:\:\$cachedHashedPasswordUsers through static\:\:\.$#'
identifier: staticClassAccess.privateProperty

View file

@ -14,8 +14,8 @@ trait TokensBase
protected function setupBucketAndFile(): array
{
if (!empty(static::$bucketAndFileData)) {
return static::$bucketAndFileData;
if (!empty(self::$bucketAndFileData)) {
return self::$bucketAndFileData;
}
$bucket = $this->client->call(
@ -61,7 +61,7 @@ trait TokensBase
]
);
static::$bucketAndFileData = [
self::$bucketAndFileData = [
'fileId' => $fileId,
'bucketId' => $bucketId,
'token' => $token['body'],
@ -72,7 +72,7 @@ trait TokensBase
],
];
return static::$bucketAndFileData;
return self::$bucketAndFileData;
}
public function testCreateBucketAndFile(): void