PHP_CodeSniffer
[ class tree: PHP_CodeSniffer ] [ index: PHP_CodeSniffer ] [ all elements ]

Class: PHP_CodeSniffer_CommentParser_CommentElement

Source Location: /PHP_CodeSniffer-0.7.0/CodeSniffer/CommentParser/CommentElement.php

Class Overview

PHP_CodeSniffer_CommentParser_AbstractDocElement
   |
   --PHP_CodeSniffer_CommentParser_SingleElement
      |
      --PHP_CodeSniffer_CommentParser_CommentElement

A class to represent Comments of a doc comment.


Author(s):

Version:

  • Release: 0.7.0

Copyright:

  • 2006 Squiz Pty Ltd (ABN 77 084 670 600)

Methods


Inherited Variables

Inherited Methods

Class: PHP_CodeSniffer_CommentParser_SingleElement

PHP_CodeSniffer_CommentParser_SingleElement::__construct()
Constructs a SingleElement doc tag.
PHP_CodeSniffer_CommentParser_SingleElement::getContent()
Returns the content of this tag.
PHP_CodeSniffer_CommentParser_SingleElement::getSubElements()
Returns the element names that this tag is comprised of, in the order that they appear in the tag.
PHP_CodeSniffer_CommentParser_SingleElement::getWhitespaceBeforeContent()
Returns the witespace before the content of this tag.
PHP_CodeSniffer_CommentParser_SingleElement::process()
Processes a content check for single doc element.
PHP_CodeSniffer_CommentParser_SingleElement::processSubElement()
Processes the sub element with the specified name.

Class: PHP_CodeSniffer_CommentParser_AbstractDocElement

PHP_CodeSniffer_CommentParser_AbstractDocElement::__construct()
Constructs a Doc Element.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getLine()
Returns the line in which this element first occured.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getNextElement()
Returns the element that exists after this.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getOrder()
Returns the order that this element appears in the comment.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getPreviousElement()
Returns the element that exists before this.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getRawContent()
Returns the raw content of this element, ommiting the tag.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getSubElements()
Returns the sub element names that make up this element in the order they appear in the element.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getTag()
Returns the tag that this element represents, ommiting the @ symbol.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getWhitespaceAfter()
Returns the whitespace that exists after this element.
PHP_CodeSniffer_CommentParser_AbstractDocElement::getWhitespaceBefore()
Returns the whitespace that exists before this element.
PHP_CodeSniffer_CommentParser_AbstractDocElement::processSubElement()
Called to process each sub element as sepcified in the return value of getSubElements().

Class Details

[line 45]
A class to represent Comments of a doc comment.

Comments are in the following format.

    Note that the sentence before two newlines is assumed the short comment description.



    [ Top ]


    Method Detail

    __construct (Constructor)   [line 59]

    PHP_CodeSniffer_CommentParser_CommentElement __construct( PHP_CodeSniffer_CommentParser_DocElemement $previousElement, array $tokens, PHP_CodeSniffer_File $phpcsFile)

    Constructs a PHP_CodeSniffer_CommentParser_CommentElement.
    • Access: public

    Overrides PHP_CodeSniffer_CommentParser_SingleElement::__construct() (Constructs a SingleElement doc tag.)

    Parameters:

    PHP_CodeSniffer_CommentParser_DocElemement   $previousElement   —  The element that appears before this element.
    array   $tokens   —  The tokens that make up this element.
    PHP_CodeSniffer_File   $phpcsFile   —  The file that this element is in.

    [ Top ]

    getLongComment   [line 129]

    string getLongComment( )

    Returns the long comment description.

    [ Top ]

    getNewlineAfter   [line 197]

    int getNewlineAfter( )

    Returns the newline(s) that exist before the tags.
    • Access: public

    [ Top ]

    getShortComment   [line 72]

    string getShortComment( )

    Returns the short comment description.

    [ Top ]

    getWhiteSpaceBetween   [line 179]

    string getWhiteSpaceBetween( )

    Returns the whitespace that exists between the short and the long comment description.
    • Access: public

    [ Top ]

    isEmpty   [line 216]

    boolean isEmpty( )

    Returns true if there is no comment.
    • Access: public

    [ Top ]


    Documentation generated on Mon, 11 Mar 2019 15:06:34 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.