3
* Parses class member comments.
8
* @package PHP_CodeSniffer
9
* @author Greg Sherwood <gsherwood@squiz.net>
10
* @author Marc McIntyre <mmcintyre@squiz.net>
11
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
12
* @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
13
* @version CVS: $Id: MemberCommentParser.php,v 1.9 2008/02/01 03:19:53 squiz Exp $
14
* @link http://pear.php.net/package/PHP_CodeSniffer
17
if (class_exists('PHP_CodeSniffer_CommentParser_ClassCommentParser', true) === false) {
18
$error = 'Class PHP_CodeSniffer_CommentParser_ClassCommentParser not found';
19
throw new PHP_CodeSniffer_Exception($error);
23
* Parses class member comments.
26
* @package PHP_CodeSniffer
27
* @author Greg Sherwood <gsherwood@squiz.net>
28
* @author Marc McIntyre <mmcintyre@squiz.net>
29
* @copyright 2006 Squiz Pty Ltd (ABN 77 084 670 600)
30
* @license http://matrix.squiz.net/developer/tools/php_cs/licence BSD Licence
31
* @version Release: 1.0.1
32
* @link http://pear.php.net/package/PHP_CodeSniffer
34
class PHP_CodeSniffer_CommentParser_MemberCommentParser extends PHP_CodeSniffer_CommentParser_ClassCommentParser
38
* Represents a \@var tag in a member comment.
40
* @var PHP_CodeSniffer_CommentParser_SingleElement
48
* @param array $tokens The tokens that represent this tag.
50
* @return PHP_CodeSniffer_CommentParser_SingleElement
52
protected function parseVar($tokens)
54
$this->_var = new PHP_CodeSniffer_CommentParser_SingleElement($this->previousElement, $tokens, 'var', $this->phpcsFile);
61
* Returns the var tag found in the member comment.
63
* @return PHP_CodeSniffer_CommentParser_PairElement
65
public function getVar()
73
* Returns the allowed tags for this parser.
77
protected function getAllowedTags()
79
return array('var' => true);
81
}//end getAllowedTags()