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

@@ -97,13 +97,13 @@ class PRAutoBlogger_Reddit_JSON_Client {
$response = wp_remote_get(
$url,
[
array(
'timeout' => self::TIMEOUT_SECONDS,
'headers' => [
'headers' => array(
'User-Agent' => self::USER_AGENT,
'Accept' => 'application/atom+xml, application/rss+xml',
],
]
),
)
);
if ( is_wp_error( $response ) ) {
@@ -111,7 +111,7 @@ class PRAutoBlogger_Reddit_JSON_Client {
'Reddit RSS GET failed: ' . $response->get_error_message(),
'reddit'
);
return [];
return array();
}
$status_code = wp_remote_retrieve_response_code( $response );
@@ -120,10 +120,10 @@ class PRAutoBlogger_Reddit_JSON_Client {
sprintf( 'Reddit RSS HTTP %d for r/%s', $status_code, $subreddit ),
'reddit'
);
return [];
return array();
}
$body = wp_remote_retrieve_body( $response );
$body = wp_remote_retrieve_body( $response );
$parser = new PRAutoBlogger_Reddit_RSS_Parser();
return $parser->parse( $body, $subreddit );
}
@@ -154,15 +154,15 @@ class PRAutoBlogger_Reddit_JSON_Client {
$response = $this->api_get( $url );
if ( null === $response || ! isset( $response['data']['children'] ) ) {
return [];
return array();
}
$posts = [];
$posts = array();
foreach ( $response['data']['children'] as $child ) {
if ( isset( $child['data'] ) ) {
$post = $child['data'];
$post = $child['data'];
$post['data_source'] = 'reddit_json';
$posts[] = $post;
$posts[] = $post;
}
}
@@ -197,10 +197,10 @@ class PRAutoBlogger_Reddit_JSON_Client {
// Comments endpoint returns [post_listing, comments_listing].
if ( ! is_array( $response ) || ! isset( $response[1]['data']['children'] ) ) {
return [];
return array();
}
$comments = [];
$comments = array();
foreach ( $response[1]['data']['children'] as $child ) {
// Filter out "more" type entries, keep only actual comments (kind=t1).
if ( isset( $child['data'] ) && 't1' === ( $child['kind'] ?? '' ) ) {