Plugin: Fix unused parameter phpcs sniffs #8654
Labels
focus: architecture
Product architecture and engineering best practices
priority: low
The issue/PR is low priority—not many people are affected or there’s a workaround, etc.
type: technical debt
This issue/PR represents/solves the technical debt of the project.
Part of #8436.
Description
Remove the
VariableAnalysis.CodeAnalysis.VariableAnalysis
exclude fromphpcs.xml.dist
and fix the issues reported when runningnpm run lint:php
in the following files:includes/admin/class-wc-rest-payments-terminal-locations-controller.php
includes/admin/class-wc-rest-payments-tos-controller.php
includes/admin/class-wc-payments-admin-sections-overwrite.php
includes/admin/class-wc-rest-payments-onboarding-controller.php
includes/admin/class-wc-rest-payments-reader-controller.php
src/Internal/Payment/State/AbstractPaymentState.php
includes/core/server/request/class-generic.php
includes/core/server/class-response.php
includes/class-logger.php
includes/constants/class-base-constant.php
includes/wc-payment-api/class-wc-payments-api-client.php
includes/class-wc-payments-incentives-service.php
includes/class-wc-payment-gateway-wcpay.php
includes/class-wc-payment-token-wcpay-link.php
includes/class-wc-payment-token-wcpay-sepa.php
includes/class-wc-payments-utils.php
includes/class-wc-payments-webhook-processing-service.php
includes/class-wc-payments-apple-pay-registration.php
includes/class-wc-payments.php
Suggested fixes:
$_unused_
to the variable name. For example$order
→$_unused_order
.$_unused_
var name prefixes in child classes with Psalm static analysis #8956 is fixed.// phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
.The text was updated successfully, but these errors were encountered: