Skip to content

Conversation

@swissspidy
Copy link
Member

No description provided.

@codecov
Copy link

codecov bot commented Jul 3, 2025

Codecov Report

❌ Patch coverage is 95.45455% with 2 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/WP_Export_WXR_Formatter.php 90.00% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy requested a review from Copilot November 3, 2025 08:50
Copy link

Copilot AI left a comment

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 adds PHPStan static analysis support at level 9 to the codebase. The changes focus on adding comprehensive type hints via PHPDoc annotations to enable strict type checking.

  • Adds PHPDoc type annotations for class properties and method parameters across multiple classes
  • Introduces #[\ReturnTypeWillChange] attributes to Iterator interface methods for PHP 8.x compatibility
  • Fixes a bug where an undefined property was being assigned in WP_Export_Returner

Reviewed Changes

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

Show a summary per file
File Description
phpstan.neon.dist Adds PHPStan configuration file with level 9 analysis and selected error suppressions
src/WP_Post_IDs_Iterator.php Adds type annotations for all properties and an @implements tag for the Iterator interface
src/WP_Map_Iterator.php Adds type annotations for the callback property and constructor parameters
src/WP_Export_XML_Over_HTTP.php Adds type annotations for private properties and constructor parameters
src/WP_Export_WXR_Formatter.php Adds type annotations for properties and the before_posts method parameter
src/WP_Export_Returner.php Removes assignment to undefined property $this->private
src/Export_Command.php Adds PHPDoc blocks with type annotations and @phpstan-ignore directives for validation methods, plus adds type cast for getcwd()
functions.php Adds type annotations for the wp_export() function's parameter and restructures formatting

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

swissspidy and others added 2 commits November 3, 2025 10:10
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
@swissspidy

This comment was marked as resolved.

Copilot AI mentioned this pull request Nov 4, 2025
16 tasks

This comment was marked as resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants