Edit report at https://pear.php.net/bugs/bug.php?id=20386&edit=1
ID: 20386
Comment by: [email protected]
Reported By: bkfake-php at yahoo dot com
Summary: Squiz.Commenting.ClassComment.SpacingBefore thrown if
first block comment
Status: Open
Type: Bug
Package: PHP_CodeSniffer
Operating System: Irrelevant
Package Version: 1.5.4
PHP Version: Irrelevant
Roadmap Versions:
New Comment:
In my case, I've made file-comments optional by assigning
Squiz.Commenting.FileComment.Missing a low severity
FileCommentSniff looks for zero (0) blank lines between T_OPEN_TAG and
the file comment
For consistency, perhaps ClassCommentSniff should also look for zero
blank lines if the class comment is first ?
Previous Comments:
------------------------------------------------------------------------
[2014-09-04 18:26:23] bkdotcom
Description:
------------
Squiz.Commenting.ClassComment.SpacingBefore error is thrown if the file
does not contain a fileComment
Test script:
---------------
<?php
/**
* I'm a class comment
* There is exactly one blank line before this comment
*/
class ClassCommentTest
{
}
Expected result:
----------------
Squiz.Commenting.ClassComment.SpacingBefore should not be triggered
Actual result:
--------------
2 | ERROR | There must be exactly one blank line before the class
comment
| | (Squiz.Commenting.ClassComment.SpacingBefore)
------------------------------------------------------------------------
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=20386&edit=1
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.