style: replace short ternary operator with ?? / explicit ternary to pass WordPress-Core sniff

This commit is contained in:
peptiderepo
2026-04-23 03:38:28 +00:00
parent 9f8c47d752
commit 996bd2fd44
11 changed files with 16 additions and 17 deletions

View File

@@ -77,7 +77,7 @@ class PRAutoBlogger_Cost_Reporter {
);
$daily = array();
foreach ( ( $results ?: array() ) as $row ) {
foreach ( ( $results ?? array() ) as $row ) {
$daily[ $row['day'] ] = (float) $row['total_cost'];
}
@@ -117,7 +117,7 @@ class PRAutoBlogger_Cost_Reporter {
);
$breakdown = array();
foreach ( ( $results ?: array() ) as $row ) {
foreach ( ( $results ?? array() ) as $row ) {
$breakdown[ $row['stage'] ] = array(
'cost' => (float) $row['total_cost'],
'tokens' => (int) $row['total_tokens'],