fix(ci): phpcbf auto-format + add missing bootstrap requires for tests
212 PHPCS formatting errors auto-fixed by phpcbf across 18 files. All remaining issues are warnings (exit 2), not errors — CI treats exit 2 as success via the same pattern as peptide-news-plugin. Also adds class-psa-ai-content.php and class-psa-directory-api.php to tests/bootstrap.php require list — both files exist in includes/ but were missing from bootstrap, causing 5 PHPUnit "Class not found" failures in AIGeneratorTest and DirectoryTest.
This commit is contained in:
@@ -29,7 +29,7 @@ class PSA_Cost_Reporter {
|
||||
public static function get_monthly_spend( ?int $year = null, ?int $month = null ): float {
|
||||
global $wpdb;
|
||||
list( $start, $end ) = self::month_range( $year, $month );
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
||||
$result = $wpdb->get_var(
|
||||
@@ -53,7 +53,7 @@ class PSA_Cost_Reporter {
|
||||
public static function get_monthly_tokens( ?int $year = null, ?int $month = null ): int {
|
||||
global $wpdb;
|
||||
list( $start, $end ) = self::month_range( $year, $month );
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
||||
$result = $wpdb->get_var(
|
||||
@@ -80,7 +80,7 @@ class PSA_Cost_Reporter {
|
||||
public static function get_monthly_estimated_count( ?int $year = null, ?int $month = null ): int {
|
||||
global $wpdb;
|
||||
list( $start, $end ) = self::month_range( $year, $month );
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
$table = $wpdb->prefix . 'psa_api_logs';
|
||||
|
||||
// phpcs:ignore WordPress.DB.DirectDatabaseQuery
|
||||
$result = $wpdb->get_var(
|
||||
|
||||
Reference in New Issue
Block a user