-
Notifications
You must be signed in to change notification settings - Fork 154
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
Class properties that have types should not require a DocBlock #406
base: develop
Are you sure you want to change the base?
Class properties that have types should not require a DocBlock #406
Conversation
Failing tests do not appear to be related to this change, but a missing Symfony class:
|
Co-authored-by: Ihor Sviziev <[email protected]>
Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.inc
Outdated
Show resolved
Hide resolved
Co-authored-by: Ihor Sviziev <[email protected]>
@sivaschenko Would it be possible to merge this please? |
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.
hi @aligent-lturner,
Could you please resolve conflicts?
…s_properties # Conflicts: # Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.inc
@ihor-sviziev conflict has been resolved |
@magento import PR to magento-commerce/magento-coding-standard repository |
@sinhaparul the Pull Request is successfully imported. |
See also #476 |
@sinhaparul @sidolov could you please merge it? |
@sidolov this has been approved for almost a year now. Any chance it can be merged soon? |
Fixes #404
If a class property has a type, then there should not be a requirement for a DocBlock.
A DocBlock can still be added if desired - this change simply removes the warning for a missing comment block when the property has a defined type.
Note - this does not validate that the type is valid, only that it is not specifically invalid in the same way as https://github.com/magento/magento-coding-standard/blob/develop/Magento2/Sniffs/Annotation/MethodArgumentsSniff.php
Additional: This issue was originally raised against the documentation page (AdobeDocs/commerce-php#23), and was suggested to be raised directly here. The documentation would need to be updated to reflect that DocBlocks are only required for properties without a type.