From 5d80f98b18ebf5eec0881f1ac23144d818b2aa51 Mon Sep 17 00:00:00 2001 From: Weston Ruter Date: Fri, 20 Feb 2026 11:56:55 -0800 Subject: [PATCH] Fix PHPStan rule level 0 errors in php-ai-client Co-authored-by: gemini-cli <218195315+gemini-cli@users.noreply.github.com> --- .../src/Providers/Http/Enums/RequestAuthenticationMethod.php | 2 -- .../php-ai-client/src/Providers/Http/HttpTransporter.php | 1 - tests/phpstan/base.neon | 1 + 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthenticationMethod.php b/src/wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthenticationMethod.php index e43eb027579c4..c28bd507d9fdc 100644 --- a/src/wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthenticationMethod.php +++ b/src/wp-includes/php-ai-client/src/Providers/Http/Enums/RequestAuthenticationMethod.php @@ -27,8 +27,6 @@ class RequestAuthenticationMethod extends AbstractEnum * @since 0.4.0 * * @return class-string The implementation class. - * - * @phpstan-ignore missingType.generics */ public function getImplementationClass(): string { diff --git a/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php b/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php index dd6cc3e9e4c4b..f856d67d0cb2d 100644 --- a/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php +++ b/src/wp-includes/php-ai-client/src/Providers/Http/HttpTransporter.php @@ -260,7 +260,6 @@ private function convertFromPsr7Response(ResponseInterface $psr7Response): Respo return new Response( $psr7Response->getStatusCode(), $psr7Response->getHeaders(), - // @phpstan-ignore-line $body === '' ? null : $body ); } diff --git a/tests/phpstan/base.neon b/tests/phpstan/base.neon index 99c16b7d2bb0d..e3cc0beec92f0 100644 --- a/tests/phpstan/base.neon +++ b/tests/phpstan/base.neon @@ -138,3 +138,4 @@ parameters: - ../../src/wp-includes/SimplePie - ../../src/wp-includes/sodium_compat - ../../src/wp-includes/Text + - ../../src/wp-includes/php-ai-client/third-party