fix: remove union return types for PHP 7.4 compatibility
Union types (array|WP_Error, int|WP_Error, string|WP_Error) require PHP 8.0+. Removed return type declarations while keeping @return docblocks intact for IDE/static analysis support. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -153,7 +153,7 @@ class PRAutoBlogger_Image_Pipeline {
|
||||
* cost_usd: float,
|
||||
* }|\WP_Error
|
||||
*/
|
||||
private function generate_image_a( int $post_id, array $article_data ): array | \WP_Error {
|
||||
private function generate_image_a( int $post_id, array $article_data ) {
|
||||
try {
|
||||
// Build the article-driven prompt.
|
||||
$prompt = $this->prompt_builder->build_article_prompt( $article_data );
|
||||
@@ -219,7 +219,7 @@ class PRAutoBlogger_Image_Pipeline {
|
||||
* cost_usd: float,
|
||||
* }|\WP_Error
|
||||
*/
|
||||
private function generate_image_b( int $post_id, array $source_data ): array | \WP_Error {
|
||||
private function generate_image_b( int $post_id, array $source_data ) {
|
||||
try {
|
||||
// Build the source-driven prompt.
|
||||
$prompt = $this->prompt_builder->build_source_prompt( $source_data );
|
||||
|
||||
Reference in New Issue
Block a user