PHPCS: fix remaining violations (EscapeOutput, InterpolatedNotPrepared, missing @param)
- Collapse multi-line RuntimeException throws to single line so phpcs:ignore EscapeOutput.ExceptionNotEscaped applies correctly (gateway-client, perplexity-provider, openrouter-provider) - Move phpcs:ignore InterpolatedNotPrepared from SQL string line to the get_results/get_var line where the violation fires (collector) - Add descriptions to @param trendline and @param standings in panel - Remove duplicate phpcs:ignore comment in collector Agent-Session: pr-vision rename v0.1.1
This commit is contained in:
@@ -110,10 +110,8 @@ class PRV_Gateway_Client {
|
||||
}
|
||||
|
||||
if ( $status >= 400 ) {
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
|
||||
throw new \RuntimeException(
|
||||
sprintf( 'PR Vision gateway HTTP %d: %s', $status, substr( $raw_body, 0, 300 ) )
|
||||
);
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- exception message, not HTML output
|
||||
throw new \RuntimeException( sprintf( 'PR Vision gateway HTTP %d: %s', $status, substr( $raw_body, 0, 300 ) ) );
|
||||
}
|
||||
|
||||
$data = json_decode( $raw_body, true );
|
||||
@@ -127,10 +125,8 @@ class PRV_Gateway_Client {
|
||||
remove_action( 'http_api_curl', $curl_filter, 99 );
|
||||
}
|
||||
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped
|
||||
throw new \RuntimeException(
|
||||
sprintf( 'PR Vision: gateway failed after %d attempts. Last: %s', PRV_MAX_RETRIES, $last_error )
|
||||
);
|
||||
// phpcs:ignore WordPress.Security.EscapeOutput.ExceptionNotEscaped -- exception message, not HTML output
|
||||
throw new \RuntimeException( sprintf( 'PR Vision: gateway failed after %d attempts. Last: %s', PRV_MAX_RETRIES, $last_error ) );
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user