Feature #9863
Reimplement PEAR.Commenting.ClassComment
| Status: | Accepted | Start date: | 2010-09-21 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | Stefano Kowalke | % Done: | 0% |
|
| Category: | Commenting | Spent time: | - | |
| Target version: | Initial release | |||
| Branch: | Tags: | |||
| Votes: | 0 |
Description
This sniff checks for proper class comments, but doesn't matches the TYPO3 CGL.
See http://forge.typo3.org:8080/job/typo3v4-core/821/
It expects whitespaces as separations for the single strings
/**
* @param[space]integer[space]$foo[space]Description
*/
function foo($foo){
}
but correct is the separation with tab:
/**
* @param[tab]integer[tab]$foo[tab]Description
*/
function foo($foo){
}
Related issues
| related to PHP_CodeSniffer - Bug #9633: Whitespace in DocBlockComment | Closed | 2010-09-07 |
History
Updated by Stefano Kowalke over 2 years ago
- Category set to Commenting
- Assignee set to Stefano Kowalke
The exist sniff:
- defines some tags as mandatory and complains if they are not exists.
http://forge.typo3.org:8080/job/typo3v4-core/821/violations/file/trunk/typo3/sysext/beuser/mod/index.php/?#line503
- expects a specific order of the tags
http://forge.typo3.org:8080/job/typo3v4-core/821/violations/file/trunk/typo3/sysext/beuser/mod/index.php/?#line500
- expects uppercase descriptions
http://forge.typo3.org:8080/job/typo3v4-core/821/violations/file/trunk/typo3/sysext/beuser/mod/index.php/?#line1088
The reimplemented sniff should:
- expects at the first an description of the class
- expects at least one @author tag, but are allowed mulitple @author tags
- CGL doesn't defines any order of the tags, but is very clear about that every class must have a doc comment.
TYPO3 requires that each class, function and method is documented with phpDoc. For information on phpDoc with use in classes see “Class information block” on page 9.
Updated by Stefano Kowalke over 2 years ago
- Target version set to Initial release
Updated by Andy Grunwald over 2 years ago
This ticket is for class doc comments only
function and methos doc block comments already done in r2295
Updated by Andy Grunwald over 2 years ago
- Tracker changed from Bug to Feature
Updated by Oliver Klee over 2 years ago
No, correct is the separation with a single space. Tabs are only allowed at the beginning of a line (because otherwise the text won't always line up for different tab widths).
Updated by Oliver Klee over 2 years ago
... at least I remember this from the CGL at some T3DD. I've filed #10263 to clarify this in the CGL.
Updated by Andy Grunwald over 2 years ago
Hey oli,
please have a look at #9633.
Updated by Stefano Kowalke over 2 years ago
- Status changed from New to Accepted
Updated by Wouter Wolters 9 months ago
The whole core is almost done now with spaces. So IMO this is needed again.