cvs: pear /PHP_CodeSniffer/CodeSniffer/CommentParser CommentElement.php
| From: | Greg Sherwood | Date: | Tue, 02 Jan 2007 03:49:53 +0000 |
| Subject: | cvs: pear /PHP_CodeSniffer/CodeSniffer/CommentParser CommentElement.php | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-43923@lists.php.net to get a copy of this message | ||
squiz Tue Jan 2 03:49:53 2007 UTC
Modified files:
/pear/PHP_CodeSniffer/CodeSniffer/CommentParser CommentElement.php
Log:
Better handling of '@' symbol in the comment description
http://cvs.php.net/viewvc.cgi/pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php?r1=1.4&r2=1.5&diff_format=u
Index: pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php
diff -u pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php:1.4
pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php:1.5
--- pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php:1.4 Tue Dec 19 04:38:30 2006
+++ pear/PHP_CodeSniffer/CodeSniffer/CommentParser/CommentElement.php Tue Jan 2 03:49:53 2007
@@ -10,7 +10,7 @@
* @author Marc McIntyre <mmcintyre@squiz.net>
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
* @license http://matrix.squiz.net/developer/tools/php_cs/licence
BSD Licence
- * @version CVS: $Id: CommentElement.php,v 1.4 2006/12/19 04:38:30 squiz Exp $
+ * @version CVS: $Id: CommentElement.php,v 1.5 2007/01/02 03:49:53 squiz Exp $
* @link http://pear.php.net/package/PHP_CodeSniffer
*/
@@ -144,7 +144,11 @@
$count = count($this->tokens);
for ($i = $pos; $i < $count; $i++) {
- if (trim($this->tokens[$i]) !== '') {
+ $content = trim($this->tokens[$i]);
+ if ($content !== '') {
+ if ($content{0} === '@') {
+ return -1;
+ }
return $i;
}
}