diff --git a/src/wp-includes/ai-client/class-wp-ai-client-builder.php b/src/wp-includes/ai-client/class-wp-ai-client-builder.php index db36442bb9f31..51dc1aee991d3 100644 --- a/src/wp-includes/ai-client/class-wp-ai-client-builder.php +++ b/src/wp-includes/ai-client/class-wp-ai-client-builder.php @@ -7,6 +7,8 @@ * @since 7.2.0 */ +use WordPress\AiClient\Builders\EmbeddingBuilder; +use WordPress\AiClient\Builders\PromptBuilder; use WordPress\AiClient\Common\Exception\InvalidArgumentException; use WordPress\AiClient\Common\Exception\TokenLimitReachedException; use WordPress\AiClient\Providers\Http\DTO\RequestOptions; @@ -43,7 +45,7 @@ abstract class WP_AI_Client_Builder { * * @since 7.0.0 * @since 7.2.0 Moved from `WP_AI_Client_Prompt_Builder` to the `WP_AI_Client_Builder` base class. - * @var object + * @var PromptBuilder|EmbeddingBuilder */ private object $builder; @@ -135,7 +137,7 @@ public function __clone() { * * @param ProviderRegistry $registry The provider registry for finding suitable models. * @param mixed $input Initial input content for the builder, or null. - * @return object The SDK builder instance. + * @return PromptBuilder|EmbeddingBuilder The SDK builder instance. */ abstract protected function create_sdk_builder( ProviderRegistry $registry, $input ): object; diff --git a/tests/phpstan/baselines-strict/method.notFound.neon b/tests/phpstan/baselines-strict/method.notFound.neon deleted file mode 100644 index 2af618ef0326c..0000000000000 --- a/tests/phpstan/baselines-strict/method.notFound.neon +++ /dev/null @@ -1,25 +0,0 @@ -# PHPStan baseline for the `method.notFound` errors in WordPress core. -# -# https://phpstan.org/error-identifiers/method.notFound -# -# Each entry is scoped to a single file and carries an exact occurrence count, -# so that a new instance is reported as a new error rather than being absorbed -# silently. Fixing an occurrence therefore means decrementing or removing its -# entry here as part of the same change. -# -# The goal is to empty this file and delete it. -# -# Generated by `composer phpstan:baselines`. Do not edit by hand. Regenerate with: -# -# composer phpstan:baselines -- --identifier=method.notFound --config=phpstan-strict.neon.dist -# -# This reruns the analysis with the baselines in this directory suppressed, so -# that their errors surface again, and rewrites only this file. - -parameters: - ignoreErrors: - - - message: '#^Call to an undefined method object\:\:usingRequestOptions\(\)\.$#' - identifier: method.notFound - count: 1 - path: ../../../src/wp-includes/ai-client/class-wp-ai-client-builder.php