Skip to content

[New Rule] Implement sniff for constants PHPDoc formatting #107

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

Closed
lenaorobei opened this issue May 31, 2019 · 2 comments
Closed

[New Rule] Implement sniff for constants PHPDoc formatting #107

lenaorobei opened this issue May 31, 2019 · 2 comments
Labels
accepted New rule is accepted new rule New feature implementation Progress: good first issue Issues is easy to get started with

Comments

@lenaorobei
Copy link
Contributor

Rule

PHPDoc formatting for constants.

Acceptance Criteria:

Constants must have short description if they add information beyond what the constant name supplies.

  • Rule covered by unit test.
<severity>5</severity>
<type>warning</type>
@lenaorobei lenaorobei added accepted New rule is accepted new rule New feature implementation Progress: good first issue Issues is easy to get started with labels May 31, 2019
udovicic added a commit to udovicic/magento-coding-standard that referenced this issue Jun 23, 2019
udovicic added a commit to udovicic/magento-coding-standard that referenced this issue Jul 2, 2019
udovicic added a commit to udovicic/magento-coding-standard that referenced this issue Jul 2, 2019
udovicic added a commit to udovicic/magento-coding-standard that referenced this issue Jul 2, 2019
lenaorobei added a commit to udovicic/magento-coding-standard that referenced this issue Jul 17, 2019
- added strict comparison
- changed sequence in the ruleset.xml
lenaorobei added a commit that referenced this issue Jul 17, 2019
@krisdante
Copy link

This rule is strange. How PHPCS detect if constant is actually self-explaining or not?
As a result, we end up adding a comment for each constant just to pass the build.

@lenaorobei
Copy link
Contributor Author

@krisdante constants may have a short description. If the short description adds no additional information beyond what the constant name already supplies, the short description must be omitted.

How PHPCS detect if constant is actually self-explaining or not?
https://github.com/magento/magento-coding-standard/blob/develop/Magento2/Helpers/Commenting/PHPDocFormattingValidator.php#L58

magento-devops-reposync-svc pushed a commit that referenced this issue Nov 1, 2021
…-in-constructor

Fixed undefined variable error in AutogeneratedClassNotInConstructorSniff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
accepted New rule is accepted new rule New feature implementation Progress: good first issue Issues is easy to get started with
Projects
None yet
Development

No branches or pull requests

3 participants