Docblock alignment standards
| From: | Greg Sherwood | Date: | Sat, 12 Jan 2008 13:02:14 +0000 |
| Subject: | Docblock alignment standards | ||
| Groups: | php.pear.qa | ||
| Request: | Send a blank email to pear-qa+get-4725@lists.php.net to get a copy of this message | ||
Hi QAers,
I'm just adding a new check to PHP_CodeSniffer that will throw an error if any asterisk in a docblock is followed by more than once space. I already have a test in another standard that will ensure all asterisks align under the first one, as they do in the PEAR coding standard Sample File: http://pear.php.net/manual/en/standards.sample.php
I was going to go ahead and add that in as well, but I noticed that there is a conflicting standard in the PEAR manual. The sample file shows all docblock asterisks aligning under the first asterisk, but the Header Comment Blocks page shows them aligned under the forward slash: http://pear.php.net/manual/en/standards.sample.php
Which is the standard that should be enforced?
Looking at sample PEAR code shows that the Sample File standard is used most often, but there is a nice mix of both standards, even in the same file (like PEAR.php).
Greg