From 29277888039fe6dc23a9c7b37c46c90444cb7374 Mon Sep 17 00:00:00 2001 From: "John Paul E. Balandan, CPA" Date: Wed, 11 Dec 2024 18:58:28 +0800 Subject: [PATCH] refactor: fix `phpdoc.parseError` errors --- phpstan-baseline.php | 6 ------ system/Database/MySQLi/Connection.php | 2 +- tests/system/Cache/FactoriesCacheFileHandlerTest.php | 3 ++- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/phpstan-baseline.php b/phpstan-baseline.php index b24ee06ed922..35e4143a4fcf 100644 --- a/phpstan-baseline.php +++ b/phpstan-baseline.php @@ -11725,12 +11725,6 @@ 'count' => 1, 'path' => __DIR__ . '/tests/system/CLI/ConsoleTest.php', ]; -$ignoreErrors[] = [ - // identifier: phpDoc.parseError - 'message' => '#^PHPDoc tag @var has invalid value \\(@var FileVarExportHandler\\|CacheInterface\\)\\: Unexpected token "@var", expected type at offset 16$#', - 'count' => 1, - 'path' => __DIR__ . '/tests/system/Cache/FactoriesCacheFileHandlerTest.php', -]; $ignoreErrors[] = [ // identifier: property.notFound 'message' => '#^Access to an undefined property CodeIgniter\\\\Config\\\\BaseConfig\\:\\:\\$baseURL\\.$#', diff --git a/system/Database/MySQLi/Connection.php b/system/Database/MySQLi/Connection.php index b1095003e286..f62a27a7d200 100644 --- a/system/Database/MySQLi/Connection.php +++ b/system/Database/MySQLi/Connection.php @@ -297,7 +297,7 @@ public function getVersion(): string /** * Executes the query against the database. * - * @return false|mysqli_result; + * @return false|mysqli_result */ protected function execute(string $sql) { diff --git a/tests/system/Cache/FactoriesCacheFileHandlerTest.php b/tests/system/Cache/FactoriesCacheFileHandlerTest.php index 892eb7260638..01e3276733e3 100644 --- a/tests/system/Cache/FactoriesCacheFileHandlerTest.php +++ b/tests/system/Cache/FactoriesCacheFileHandlerTest.php @@ -13,6 +13,7 @@ namespace CodeIgniter\Cache; +use CodeIgniter\Cache\FactoriesCache\FileVarExportHandler; use Config\Cache as CacheConfig; use PHPUnit\Framework\Attributes\Group; @@ -23,7 +24,7 @@ final class FactoriesCacheFileHandlerTest extends FactoriesCacheFileVarExportHandlerTest { /** - * @var @var FileVarExportHandler|CacheInterface + * @var CacheInterface|FileVarExportHandler */ protected $handler;