From 1e477cfd86983fcd9d0f52053873886fba081061 Mon Sep 17 00:00:00 2001 From: peptiderepo <273788462+peptiderepo@users.noreply.github.com> Date: Sat, 13 Jun 2026 09:59:45 +0000 Subject: [PATCH] PHPCS: fix gateway-client PHP syntax error + admin-page alignment ignore --- includes/core/class-prv-admin-page.php | 2 +- includes/providers/class-prv-gateway-client.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/includes/core/class-prv-admin-page.php b/includes/core/class-prv-admin-page.php index 29d73af..e4811d5 100644 --- a/includes/core/class-prv-admin-page.php +++ b/includes/core/class-prv-admin-page.php @@ -190,7 +190,7 @@ class PRV_Admin_Page { return; } // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash - $probed = isset( $_GET['prv_probed'] ) ? absint( wp_unslash( $_GET['prv_probed'] ) ) : 0; + $probed = isset( $_GET['prv_probed'] ) ? absint( wp_unslash( $_GET['prv_probed'] ) ) : 0; // phpcs:ignore Generic.Formatting.MultipleStatementAlignment.NotSameWarning // phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash $skipped = isset( $_GET['prv_skipped'] ) ? absint( wp_unslash( $_GET['prv_skipped'] ) ) : 0; diff --git a/includes/providers/class-prv-gateway-client.php b/includes/providers/class-prv-gateway-client.php index e71ddc9..4ba5042 100644 --- a/includes/providers/class-prv-gateway-client.php +++ b/includes/providers/class-prv-gateway-client.php @@ -61,9 +61,9 @@ class PRV_Gateway_Client { * @throws \RuntimeException On permanent HTTP failure or parse error. */ public function post_to_gateway( string $provider_slug, array $body, string $api_key, string $endpoint = '/chat/completions' ): array { - $base_url = \$this->build_base_url( \$provider_slug ); - $url = \$base_url . \$endpoint; - $base_host = (string) wp_parse_url( \$base_url, PHP_URL_HOST ); + $base_url = $this->build_base_url( $provider_slug ); + $url = $base_url . $endpoint; + $base_host = (string) wp_parse_url( $base_url, PHP_URL_HOST ); $headers = array( 'Authorization' => 'Bearer ' . $api_key,