Skip to content

Fix PHPCS coding standard violations in provider files#851

Merged
georgestephanis merged 12 commits into
WordPress:masterfrom
masteradhoc:fix-php-lint-issues
Mar 27, 2026
Merged

Fix PHPCS coding standard violations in provider files#851
georgestephanis merged 12 commits into
WordPress:masterfrom
masteradhoc:fix-php-lint-issues

Conversation

@masteradhoc
Copy link
Copy Markdown
Collaborator

@masteradhoc masteradhoc commented Mar 26, 2026

What?

Fix a few PHPCS errors in provider-related files to comply with PSR-2 and WordPress coding standards.

Why?

CI linting was failing due to coding standard violations that needed to be resolved to keep the codebase consistent.

How?

  • Removed extra blank line before class closing brace (PSR2.Classes.ClassDeclaration.CloseBraceAfterBody)
  • Added missing @param tags to two function docblocks (Squiz.Commenting.FunctionComment.MissingParamTag)
  • Fixed long description starting with lowercase in a docblock (Generic.Commenting.DocComment.LongNotCapital)
  • Replaced short ternary (?:) with explicit ternary in time() (Universal.Operators.DisallowShortTernary)
  • Fixed double arrow alignment for totpUrl key in wp_localize_script array (WordPress.Arrays.MultipleStatementAlignment)
  • Renamed $string parameter to $input in base32_encode() to avoid reserved keyword (Universal.NamingConventions.NoReservedKeywordParameterNames)

Testing Instructions

Run PHPCS against the affected files and verify that the noted errors are fixed:

Screenshots or screencast

N/A

Changelog Entry

Fixed - PHPCS coding standard violations in provider and test files.

@masteradhoc masteradhoc added this to the 0.16.0 milestone Mar 26, 2026
@github-actions
Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

Core SVN

If you're a Core Committer, use this list when committing to wordpress-develop in SVN:

Props: masteradhoc.

GitHub Merge commits

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: masteradhoc <masteradhoc@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@masteradhoc masteradhoc requested a review from kasparsd March 26, 2026 21:58
@masteradhoc masteradhoc self-assigned this Mar 27, 2026
@georgestephanis georgestephanis merged commit a7da948 into WordPress:master Mar 27, 2026
28 checks passed
@masteradhoc masteradhoc deleted the fix-php-lint-issues branch March 27, 2026 15:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants