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

Class: PHP_CodeSniffer_CommentParser_ParameterElement

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

Class Overview

PHP_CodeSniffer_CommentParser_AbstractDocElement
   |
   --PHP_CodeSniffer_CommentParser_ParameterElement

A class to represent param tags within a function 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_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 31]
A class to represent param tags within a function comment.


[ Top ]


Method Detail

__construct (Constructor)   [line 90]

PHP_CodeSniffer_CommentParser_ParameterElement __construct( PHP_CodeSniffer_CommentParser_DocElement $previousElement, array $tokens, PHP_CodeSniffer_File $phpcsFile)

Constructs a PHP_CodeSniffer_CommentParser_ParameterElement.
  • Access: public

Overrides PHP_CodeSniffer_CommentParser_AbstractDocElement::__construct() (Constructs a Doc Element.)

Parameters:

PHP_CodeSniffer_CommentParser_DocElement   $previousElement   —  The element previous to this one.
array   $tokens   —  The tokens that make up this element.
PHP_CodeSniffer_File   $phpcsFile   —  The file that this element is in.

[ Top ]

alignsWith   [line 257]

boolean alignsWith( PHP_CodeSniffer_CommentParser_ParameterElement $other)

Returns true if this parameter aligns with the other parameter.
  • Access: public

Parameters:

PHP_CodeSniffer_CommentParser_ParameterElement   $other   —  The other param to check alignment with.

[ Top ]

getComment   [line 180]

string getComment( )

Returns the comment of this comment for this parameter.
  • Access: public

[ Top ]

getPosition   [line 237]

int getPosition( )

Returns the postition of this parameter are it appears in the comment.

This method differs from getOrder as it is only relative to method parameters.

  • Access: public

[ Top ]

getSubElements   [line 119]

array(string) getSubElements( )

Returns the element names that this tag is comprised of, in the order that they appear in the tag.

Overrides PHP_CodeSniffer_CommentParser_AbstractDocElement::getSubElements() (Returns the sub element names that make up this element in the order they appear in the element.)
[ Top ]

getType   [line 168]

string getType( )

Returns the variable type that this string represents.
  • Access: public

[ Top ]

getVarName   [line 156]

string getVarName( )

Returns the variable name that this parameter tag represents.
  • Access: public

[ Top ]

getWhiteSpaceBeforeComment   [line 222]

string getWhiteSpaceBeforeComment( )

Returns the whitespace before the comment.

[ Top ]

getWhiteSpaceBeforeType   [line 194]

stirng getWhiteSpaceBeforeType( )

Returns the whitespace before the variable type.

[ Top ]

getWhiteSpaceBeforeVarName   [line 208]

string getWhiteSpaceBeforeVarName( )

Returns the whitespace before the variable name.

[ Top ]

processSubElement   [line 141]

void processSubElement( string $name, string $content, string $beforeWhitespace)

Processes the sub element with the specified name.

Overrides PHP_CodeSniffer_CommentParser_AbstractDocElement::processSubElement() (Called to process each sub element as sepcified in the return value of getSubElements().)

Parameters:

string   $name   —  The name of the sub element to process.
string   $content   —  The content of this sub element.
string   $beforeWhitespace   —  The whitespace that exists before the sub element.

[ Top ]


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