style(phpcs): autofix WordPress-Core violations via phpcbf

Run phpcbf --standard=WordPress-Core across includes/, prautoblogger.php,
and uninstall.php. Fixed 1,362 formatting violations in 75 files:
  - Short array syntax: [] → array()
  - Line breaking for long function calls
  - Consistent indentation
  - Function call parameter alignment

No logic changes; purely mechanical formatting.
This commit is contained in:
peptiderepo
2026-04-23 02:42:48 +00:00
parent 7cd65b145f
commit f3eacd0d8d
75 changed files with 2148 additions and 1412 deletions

View File

@@ -79,20 +79,24 @@ class PRAutoBlogger_OpenRouter_Validator {
return;
}
// phpcs:ignore WordPress.WP.AlternativeFunctions.curl_curl_setopt
curl_setopt( $handle, CURLOPT_HTTPHEADER, [
'Authorization: ' . $auth_header_value,
] );
curl_setopt(
$handle,
CURLOPT_HTTPHEADER,
array(
'Authorization: ' . $auth_header_value,
)
);
};
add_action( 'http_api_curl', $curl_auth_filter_cred, 99, 3 );
$response = wp_remote_get(
$base_url . '/auth/key',
[
array(
'timeout' => self::TIMEOUT_SECONDS,
'headers' => [
'headers' => array(
'Authorization' => 'Bearer ' . $api_key,
],
]
),
)
);
remove_action( 'http_api_curl', $curl_auth_filter_cred, 99 );
@@ -115,10 +119,10 @@ class PRAutoBlogger_OpenRouter_Validator {
$status_code = wp_remote_retrieve_response_code( $response );
if ( 200 === $status_code ) {
return [
return array(
'status' => 'ok',
'message' => __( 'OpenRouter connected.', 'prautoblogger' ),
];
);
}
$body_raw = wp_remote_retrieve_body( $response );
@@ -143,10 +147,10 @@ class PRAutoBlogger_OpenRouter_Validator {
* @return array{status: string, message: string, debug: string}
*/
private function err( string $debug, string $message ): array {
return [
return array(
'status' => 'error',
'message' => $message,
'debug' => $debug,
];
);
}
}