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

Class: PEAR_Sniffs_Functions_FunctionDeclarationSniff

Source Location: /PHP_CodeSniffer-1.2.0/CodeSniffer/Standards/PEAR/Sniffs/Functions/FunctionDeclarationSniff.php

Class Overview


PEAR_Sniffs_Functions_FunctionDeclarationSniff.


Author(s):

Version:

  • Release: 1.2.0

Copyright:

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

Methods


Child classes:

Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff
Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff.

Inherited Variables

Inherited Methods


Class Details

[line 29]
PEAR_Sniffs_Functions_FunctionDeclarationSniff.

Ensure single and multi-line function declarations are defined correctly.



[ Top ]


Method Detail

process   [line 54]

void process( PHP_CodeSniffer_File $phpcsFile, int $stackPtr)

Processes this test, when one of its tokens is encountered.
  • Access: public

Parameters:

PHP_CodeSniffer_File   $phpcsFile     The file being scanned.
int   $stackPtr     The position of the current token in the stack passed in $tokens.

[ Top ]

processMultiLineDeclaration   [line 106]

void processMultiLineDeclaration( PHP_CodeSniffer_File $phpcsFile, int $stackPtr, array $tokens)

Processes mutli-line declarations.
  • Access: public

Overridden in child classes as:

Squiz_Sniffs_Functions_MultiLineFunctionDeclarationSniff::processMultiLineDeclaration()
Processes mutli-line declarations.

Parameters:

PHP_CodeSniffer_File   $phpcsFile     The file being scanned.
int   $stackPtr     The position of the current token in the stack passed in $tokens.
array   $tokens     The stack of tokens that make up the file.

[ Top ]

processSingleLineDeclaration   [line 83]

void processSingleLineDeclaration( PHP_CodeSniffer_File $phpcsFile, int $stackPtr, array $tokens)

Processes single-line declarations.

Just uses the Generic BSD-Allman brace sniff.

  • Access: public

Parameters:

PHP_CodeSniffer_File   $phpcsFile     The file being scanned.
int   $stackPtr     The position of the current token in the stack passed in $tokens.
array   $tokens     The stack of tokens that make up the file.

[ Top ]

register   [line 38]

array register( )

Returns an array of tokens this test wants to listen for.
  • Access: public

[ Top ]


Documentation generated on Mon, 17 Aug 2009 05:00:42 +0000 by phpDocumentor 1.4.2. PEAR Logo Copyright © PHP Group 2004.