PHPCS: fix gateway-client PHP syntax error + admin-page alignment ignore
This commit is contained in:
@@ -190,7 +190,7 @@ class PRV_Admin_Page {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// phpcs:ignore WordPress.Security.NonceVerification.Recommended, WordPress.Security.ValidatedSanitizedInput.InputNotSanitized, WordPress.Security.ValidatedSanitizedInput.MissingUnslash
|
// 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
|
// 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;
|
$skipped = isset( $_GET['prv_skipped'] ) ? absint( wp_unslash( $_GET['prv_skipped'] ) ) : 0;
|
||||||
|
|
||||||
|
|||||||
@@ -61,9 +61,9 @@ class PRV_Gateway_Client {
|
|||||||
* @throws \RuntimeException On permanent HTTP failure or parse error.
|
* @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 {
|
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 );
|
$base_url = $this->build_base_url( $provider_slug );
|
||||||
$url = \$base_url . \$endpoint;
|
$url = $base_url . $endpoint;
|
||||||
$base_host = (string) wp_parse_url( \$base_url, PHP_URL_HOST );
|
$base_host = (string) wp_parse_url( $base_url, PHP_URL_HOST );
|
||||||
|
|
||||||
$headers = array(
|
$headers = array(
|
||||||
'Authorization' => 'Bearer ' . $api_key,
|
'Authorization' => 'Bearer ' . $api_key,
|
||||||
|
|||||||
Reference in New Issue
Block a user