From b4085d1083a3f577a7f84eec7d5fcb8a271c7efd Mon Sep 17 00:00:00 2001 From: Chirag Aggarwal Date: Tue, 31 Mar 2026 22:23:37 +0530 Subject: [PATCH] Fix token trait PHPStan static access --- phpstan-baseline.neon | 6 ------ tests/e2e/Services/Tokens/TokensBase.php | 8 ++++---- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 0e59f6ef31..816ff0e5f5 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -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 diff --git a/tests/e2e/Services/Tokens/TokensBase.php b/tests/e2e/Services/Tokens/TokensBase.php index ced6bb5dde..1fcdeb347f 100644 --- a/tests/e2e/Services/Tokens/TokensBase.php +++ b/tests/e2e/Services/Tokens/TokensBase.php @@ -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