Skip to content

Fix newly reported PHPStan errors - #539

Merged
swissspidy merged 1 commit into
mainfrom
fix/phpstan
Aug 6, 2026
Merged

Fix newly reported PHPStan errors#539
swissspidy merged 1 commit into
mainfrom
fix/phpstan

Conversation

@swissspidy

@swissspidy swissspidy commented Aug 6, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Documentation
    • Added inline type documentation for plugin and theme download data.
    • No changes to runtime behavior or user-visible functionality.

@swissspidy swissspidy added this to the 3.0.1 milestone Aug 6, 2026
@swissspidy
swissspidy requested a review from a team as a code owner August 6, 2026 09:09
Copilot AI lite review requested due to automatic review settings August 6, 2026 09:09
@swissspidy swissspidy added the scope:testing Related to testing label Aug 6, 2026
@coderabbitai

coderabbitai Bot commented Aug 6, 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: febe74e2-9269-4288-b404-18805b31d0ef

📥 Commits

Reviewing files that changed from the base of the PR and between 9f14270 and a72596f.

📒 Files selected for processing (2)
  • src/Plugin_Download_Command.php
  • src/Theme_Download_Command.php

📝 Walkthrough

Walkthrough

The change adds PHPDoc assertions for validated plugin and theme download data. Runtime behavior and public declarations remain unchanged.

Changes

Download data assertions

Layer / File(s) Summary
Validated download data shapes
src/Plugin_Download_Command.php, src/Theme_Download_Command.php
PHPDoc assertions document the expected array fields and string value types for plugin and theme download data.

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

Suggested reviewers: copilot

🚥 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 and concisely describes the PHPDoc changes made to fix newly reported PHPStan errors.
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 💡 1
🛠️ Fix failing CI checks 💡
  • Create stacked PR
  • Commit on current branch
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/phpstan

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses newly reported PHPStan type errors in the download commands by explicitly asserting the expected shape of the data returned from the WordPress.org API calls.

Changes:

  • Added array-shape @var annotations for $theme_data in Theme_Download_Command after runtime validation.
  • Added array-shape @var annotations for $plugin_data in Plugin_Download_Command after runtime validation.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/Theme_Download_Command.php Adds PHPDoc array-shape assertion for theme API response to satisfy PHPStan.
src/Plugin_Download_Command.php Adds PHPDoc array-shape assertion for plugin API response to satisfy PHPStan.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@swissspidy
swissspidy merged commit c54ca95 into main Aug 6, 2026
61 of 67 checks passed
@swissspidy
swissspidy deleted the fix/phpstan branch August 6, 2026 09:30
@codecov

codecov Bot commented Aug 6, 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 restored the fix/phpstan branch August 6, 2026 09:56
@swissspidy
swissspidy deleted the fix/phpstan branch August 6, 2026 10:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope:testing Related to testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants