Fix CI: PHP 8.1 compat + WPCS violations in v0.3.0 new files
PHP 8.1: Cannot use positional argument after argument unpacking — class-prv-call-log-query.php line 77 (LIMIT/OFFSET args merged into array before spread). WPCS fixes across 8 files: - class-prv-admin-page-css.php: short description capital letter - class-prv-admin-page.php: docblock started on same line as closing brace - class-prv-call-drawer-renderer.php: param spacing, empty elseif blocks, extra indent on render_inline_script - class-prv-call-log-query.php: InterpolatedNotPrepared (use phpcs:disable/enable block for WHERE-clause interpolation) - class-prv-cost-rollup-query.php: InterpolatedNotPrepared for GROUP BY with dynamic column (phpcs:disable/enable block) - class-prv-costs-renderer.php: AssociativeArrayFound on inline sub-arrays - class-prv-probe-run-executor.php: docblock spacing, empty catch blocks, inline array items, ArrayItemNoNewLine (phpcs:disable on write_meta calls) - class-prv-probe-runner.php: extra space before ?? operator
This commit is contained in:
@@ -67,7 +67,7 @@ class PRV_Call_Drawer_Renderer {
|
||||
*
|
||||
* Side effects: Outputs HTML.
|
||||
*
|
||||
* @param array<string, mixed> $meta Call metadata row.
|
||||
* @param array<string, mixed> $meta Call metadata row.
|
||||
* @param array<string, string>|null $io I/O record or null (pruned/missing).
|
||||
*
|
||||
* @return void
|
||||
@@ -198,13 +198,9 @@ class PRV_Call_Drawer_Renderer {
|
||||
)
|
||||
);
|
||||
echo '</div></div>';
|
||||
} elseif ( $is_legacy ) {
|
||||
// Already shown in prompt section; no duplicate.
|
||||
} elseif ( $is_pruned ) {
|
||||
// Already shown.
|
||||
} elseif ( $has_io && isset( $io['response_text'] ) && '' !== $io['response_text'] ) {
|
||||
} elseif ( ! $is_legacy && ! $is_pruned && $has_io && isset( $io['response_text'] ) && '' !== $io['response_text'] ) {
|
||||
echo '<pre id="prv-response-text" class="prv-code-block">' . esc_html( $io['response_text'] ) . '</pre>';
|
||||
} else {
|
||||
} elseif ( ! $is_error && ! $is_legacy && ! $is_pruned ) {
|
||||
echo '<p class="prv-drawer-na">—</p>';
|
||||
}
|
||||
echo '</div>';
|
||||
@@ -263,7 +259,7 @@ class PRV_Call_Drawer_Renderer {
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
private function render_inline_script(): void {
|
||||
private function render_inline_script(): void {
|
||||
PRV_Call_Drawer_Script::render(
|
||||
wp_create_nonce( PRV_Call_Detail_Ajax::NONCE_ACTION ),
|
||||
admin_url( 'admin-ajax.php' )
|
||||
|
||||
Reference in New Issue
Block a user