From 331fb7f689679279e06b2ac5ec913935e9f69153 Mon Sep 17 00:00:00 2001 From: ArnabChatterjee20k Date: Thu, 19 Mar 2026 17:10:45 +0530 Subject: [PATCH] fixed php stan issue --- phpstan-baseline.neon | 6 ------ src/Appwrite/Platform/Workers/Migrations.php | 2 +- tests/unit/Functions/Validator/HeadersTest.php | 1 - tests/unit/Messaging/MessagingChannelsTest.php | 2 +- 4 files changed, 2 insertions(+), 9 deletions(-) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index b4bc760bd7..ee9e50ef62 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -210,12 +210,6 @@ parameters: count: 1 path: src/Appwrite/Auth/Validator/PersonalData.php - - - message: '#^PHPDoc tag @var above a method has no effect\.$#' - identifier: varTag.misplaced - count: 1 - path: src/Appwrite/Databases/TransactionState.php - - message: '#^PHPDoc tag @param has invalid value \(DeviceDetector\)\: Unexpected token "\\n ", expected variable at offset 32 on line 2$#' identifier: phpDoc.parseError diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 81dbd0ed2e..75e1341d0a 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -56,7 +56,7 @@ class Migrations extends Action protected Document $sourceProject; /** - * @var callable(Document $database, ?Document $projectDocument = null): Database + * @var callable */ protected mixed $getDatabasesDB; diff --git a/tests/unit/Functions/Validator/HeadersTest.php b/tests/unit/Functions/Validator/HeadersTest.php index dd6d6d51e7..4a45f57427 100644 --- a/tests/unit/Functions/Validator/HeadersTest.php +++ b/tests/unit/Functions/Validator/HeadersTest.php @@ -76,7 +76,6 @@ class HeadersTest extends TestCase ]; $this->assertFalse($this->object->isValid($headers)); - // @phpstan-ignore-next-line $headers = [ null => 'value', ]; diff --git a/tests/unit/Messaging/MessagingChannelsTest.php b/tests/unit/Messaging/MessagingChannelsTest.php index 61a501b576..fc2d839ca6 100644 --- a/tests/unit/Messaging/MessagingChannelsTest.php +++ b/tests/unit/Messaging/MessagingChannelsTest.php @@ -16,7 +16,7 @@ class MessagingChannelsTest extends TestCase */ public $connectionsPerChannel = 10; - public Realtime $realtime; + public ?Realtime $realtime = null; public $connectionsCount = 0; public $connectionsAuthenticated = 0; public $connectionsGuest = 0;