Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fixes #7119
Nothing impacts users.
Type of change
Detailed scenario
n/a
Technical description
Documentation
This pull request introduces several changes to enhance PHPStan integration and adds a new custom rule for validating
@param
tags in docblocks. The most important changes include adding a new script to reset the PHPStan baseline, updating the PHPStan configuration files, and implementing a custom PHPStan rule.Enhancements to PHPStan integration:
composer.json
: Added a new scriptrun-stan-reset-baseline
to reset the PHPStan baseline.phpstan-baseline.neon
: Added baseline configurations to ignore specific errors in certain files.phpstan.neon.dist
: Updated theparameters
section to include a new directory and added the custom ruleWP_Rocket\Tests\phpstan\Rules\ApplyFiltersTypedDynamicFunctionReturnTypeExtension
. [1] [2]Implementation of a custom PHPStan rule:
tests/phpstan/Rules/ApplyFiltersTypedDynamicFunctionReturnTypeExtension.php
: Added a new custom rule to validate@param
tags in docblocks for thewpm_apply_filters_typed
function.Mandatory Checklist
Code validation
Code style