Skip to content

Fix PHP code style violations in feature files#627

Open
swissspidy wants to merge 1 commit into
mainfrom
try/phpcs-in-feature-files
Open

Fix PHP code style violations in feature files#627
swissspidy wants to merge 1 commit into
mainfrom
try/phpcs-in-feature-files

Conversation

@swissspidy

@swissspidy swissspidy commented Jul 23, 2026

Copy link
Copy Markdown
Member

Fixed with wp-cli/wp-cli-tests#340

Summary by CodeRabbit

  • Tests
    • Updated embedded WordPress test fixtures for consistent PHP formatting and quoting.
    • Improved reliability for recounting comments and terms, handling null post meta, option updates, and taxonomy/term/user-term scenarios.
    • Preserved existing test behavior, commands, assertions, and expected output.
  • Chores
    • No user-facing functionality or behavioral changes were introduced.

@swissspidy
swissspidy requested a review from a team as a code owner July 23, 2026 12:40
@swissspidy swissspidy added the scope:testing Related to testing label Jul 23, 2026
@github-actions github-actions Bot added the bug label Jul 23, 2026
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 55f575e9-bc06-4dd0-a425-4b251939ac78

📥 Commits

Reviewing files that changed from the base of the PR and between 47261f5 and 384eda9.

📒 Files selected for processing (8)
  • features/comment-recount.feature
  • features/option-pluck-patch.feature
  • features/post-block.feature
  • features/post-meta.feature
  • features/taxonomy.feature
  • features/term-migrate.feature
  • features/term-recount.feature
  • features/user-term.feature
🚧 Files skipped from review as they are similar to previous changes (7)
  • features/comment-recount.feature
  • features/option-pluck-patch.feature
  • features/term-recount.feature
  • features/term-migrate.feature
  • features/taxonomy.feature
  • features/post-meta.feature
  • features/post-block.feature

📝 Walkthrough

Walkthrough

The pull request reformats embedded PHP fixtures across feature scenarios, standardizing callback structure, spacing, string quoting, null syntax, and object construction without changing commands, registrations, or expected outputs.

Changes

Feature fixture formatting

Layer / File(s) Summary
PHP callback and hook structure
features/post-block.feature, features/taxonomy.feature, features/term-migrate.feature, features/user-term.feature
Embedded callbacks, closures, taxonomy registrations, and hook wiring use expanded multi-line formatting while preserving behavior.
PHP literal and statement style
features/comment-recount.feature, features/option-pluck-patch.feature, features/post-meta.feature, features/term-recount.feature
Fixture snippets standardize string quoting, lowercase null, explicit stdClass() construction, and statement formatting without changing test logic.

Estimated code review effort: 1 (Trivial) | ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the change set, which fixes PHP code style issues in feature files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch try/phpcs-in-feature-files

Comment @coderabbitai help to get the list of available commands.

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@swissspidy
swissspidy force-pushed the try/phpcs-in-feature-files branch from 47261f5 to 384eda9 Compare July 23, 2026 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant