Extending classes should implement the getSubElements method to return a list of elements that the doc comment element contains, in the order that they appear in the element. For example a function parameter element has a type, a variable name and a comment. It should therefore implement the method as follows:
The processSubElement will be called for each of the sub elements to allow the extending class to process them. So for the parameter element we would have:
[line 87]
The whitespace the occurs after this element and its sub elements.[line 80]
The element proceeding this element.[line 101]
The file this element is in.[line 73]
The element previous to this element.[line 108]
The tag that this element represents (omiting the @ symbol).[line 94]
The tokens that comprise this element.PHP_CodeSniffer_CommentParser_AbstractDocElement __construct(
PHP_CodeSniffer_CommentParser_DocElement
$previousElement, array
$tokens, string
$tag, PHP_CodeSniffer_File
$phpcsFile)
Overridden in child classes as:
PHP_CodeSniffer_CommentParser_DocElement getNextElement(
)
PHP_CodeSniffer_CommentParser_DocElement getPreviousElement(
)
string getRawContent(
)
array(string) getSubElements(
)
Overridden in child classes as:
string getTag(
)
string getWhitespaceAfter(
)
string getWhitespaceBefore(
)
void processSubElement(
string
$name, string
$content, string
$whitespaceBefore)
Overridden in child classes as: