Skip to content

Commit 3780eb4

Browse files
committed
PHPCS fixes
1 parent 26e60b9 commit 3780eb4

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

includes/Services/Ai/ContentGeneration/ContentGenerationServiceRequest.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,15 @@ class ContentGenerationServiceRequest {
7070
*/
7171
public function __construct( string $endpoint, array $body, array $headers = array() ) {
7272
$this->endpoint = $endpoint;
73-
$this->body = $body;
74-
$this->url = $this->get_api_url();
75-
$this->headers = array_merge(
73+
$this->body = $body;
74+
$this->url = $this->get_api_url();
75+
$this->headers = array_merge(
7676
array(
7777
'Content-Type' => 'application/json',
7878
'Authorization' => 'Bearer ' . HiiveConnection::get_auth_token(),
7979
),
8080
$headers
8181
);
82-
8382
}
8483

8584
/**
@@ -89,7 +88,7 @@ public function __construct( string $endpoint, array $body, array $headers = arr
8988
*/
9089
private function get_api_url(): string {
9190
$base_url = '';
92-
91+
9392
if ( defined( 'NFD_WB_DEV_MODE' ) && NFD_WB_DEV_MODE ) {
9493
$base_url = defined( 'NFD_WB_LOCAL_BASE_URL' ) ? NFD_WB_LOCAL_BASE_URL : self::DEFAULT_LOCAL_BASE_URL;
9594
} else {
@@ -117,7 +116,7 @@ public function send(): ContentGenerationServiceRequest {
117116
$this->response = $response;
118117
return $this;
119118
}
120-
119+
121120
/**
122121
* Check if the request was successful
123122
*
@@ -127,7 +126,7 @@ public function is_successful(): bool {
127126
if ( ! $this->response || is_wp_error( $this->response ) ) {
128127
return false;
129128
}
130-
129+
131130
$code = wp_remote_retrieve_response_code( $this->response );
132131
return $code >= 200 && $code < 300;
133132
}

0 commit comments

Comments
 (0)