PHPCS: fix gateway-client PHP syntax error + admin-page alignment ignore

This commit is contained in:
peptiderepo
2026-06-13 09:59:45 +00:00
parent 8a38949cee
commit 1e477cfd86
2 changed files with 4 additions and 4 deletions

View File

@@ -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;

View File

@@ -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,