Class properties that have types should not require a DocBlock#406
Open
aligent-lturner wants to merge 7 commits intomagento:developfrom
Open
Class properties that have types should not require a DocBlock#406aligent-lturner wants to merge 7 commits intomagento:developfrom
aligent-lturner wants to merge 7 commits intomagento:developfrom
Conversation
Author
|
Failing tests do not appear to be related to this change, but a missing Symfony class: |
ihor-sviziev
requested changes
Jul 14, 2022
Co-authored-by: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
Co-authored-by: Ihor Sviziev <ihor-sviziev@users.noreply.github.com>
ihor-sviziev
approved these changes
Jul 14, 2022
|
@sivaschenko Would it be possible to merge this please? |
ihor-sviziev
requested changes
Apr 11, 2023
Collaborator
ihor-sviziev
left a comment
There was a problem hiding this comment.
hi @aligent-lturner,
Could you please resolve conflicts?
…s_properties # Conflicts: # Magento2/Tests/Commenting/ClassPropertyPHPDocFormattingUnitTest.inc
Author
@ihor-sviziev conflict has been resolved |
ihor-sviziev
previously approved these changes
Apr 12, 2023
Contributor
|
@magento import PR to magento-commerce/magento-coding-standard repository |
Contributor
|
@sinhaparul the Pull Request is successfully imported. |
Member
|
See also #476 |
ihor-sviziev
approved these changes
Dec 18, 2023
Collaborator
|
@sinhaparul @sidolov could you please merge it? |
Author
|
@sidolov this has been approved for almost a year now. Any chance it can be merged soon? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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.