-
-
Notifications
You must be signed in to change notification settings - Fork 452
phpcs-fixer: phpdoc_var_annotation_correct_order
#5056
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
phpcs-fixer: phpdoc_var_annotation_correct_order
#5056
Conversation
sreichel
commented
Nov 1, 2025
- see https://cs.symfony.com/doc/rules/phpdoc/phpdoc_var_annotation_correct_order.html
There was a problem hiding this 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 standardizes PHPDoc annotations to follow the correct format where the type comes before the variable name, enforced by enabling the phpdoc_var_annotation_correct_order rule in PHP-CS-Fixer. This addresses inconsistent PHPDoc formatting across the codebase.
Key changes:
- Enabled
phpdoc_var_annotation_correct_orderrule in PHP-CS-Fixer configuration - Updated
@varannotations to place type before variable/expression in three Observer files - Added
@throws Throwabledocumentation to a method signature
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| .php-cs-fixer.dist.php | Enabled phpdoc_var_annotation_correct_order rule for consistent PHPDoc formatting |
| app/code/core/Mage/SalesRule/Model/Observer.php | Fixed @var annotation order and added @throws documentation |
| app/code/core/Mage/CatalogRule/Model/Observer.php | Fixed @var annotation order for inline type hints |
| app/code/core/Mage/Rule/Model/Condition/Combine.php | Updated @return types from array to Mage_Rule_Model_Condition_Combine |
b248fe0 to
af0747d
Compare
|


