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

Class: Generic_Sniffs_NamingConventions_ConstructorNameSniff

Source Location: /PHP_CodeSniffer-2.7.1/CodeSniffer/Standards/Generic/Sniffs/NamingConventions/ConstructorNameSniff.php

Class Overview

PHP_CodeSniffer_Standards_AbstractScopeSniff
   |
   --Generic_Sniffs_NamingConventions_ConstructorNameSniff

Generic_Sniffs_NamingConventions_ConstructorNameSniff.


Author(s):

Version:

  • Release: 2.7.1

Copyright:

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

Methods


Inherited Variables

Inherited Methods

Class: PHP_CodeSniffer_Standards_AbstractScopeSniff

PHP_CodeSniffer_Standards_AbstractScopeSniff::__construct()
Constructs a new AbstractScopeTest.
PHP_CodeSniffer_Standards_AbstractScopeSniff::process()
Processes the tokens that this test is listening for.
PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenOutsideScope()
Processes a token that is found within the scope that this test is listening to.
PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenWithinScope()
Processes a token that is found within the scope that this test is listening to.
PHP_CodeSniffer_Standards_AbstractScopeSniff::register()
The method that is called to register the tokens this test wishes to listen to.

Class Details

[line 34]
Generic_Sniffs_NamingConventions_ConstructorNameSniff.

Favor PHP 5 constructor syntax, which uses "function __construct()". Avoid PHP 4 constructor syntax, which uses "function ClassName()".



[ Top ]


Method Detail

__construct (Constructor)   [line 55]

Generic_Sniffs_NamingConventions_ConstructorNameSniff __construct( )

Constructs the test with the tokens it wishes to listen for.
  • Access: public

Overrides PHP_CodeSniffer_Standards_AbstractScopeSniff::__construct() (Constructs a new AbstractScopeTest.)
[ Top ]

loadFunctionNamesInScope   [line 131]

void loadFunctionNamesInScope( PHP_CodeSniffer_File $phpcsFile, int $currScope)

Extracts all the function names found in the given scope.
  • Access: protected

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The current file being scanned.
int   $currScope   —  A pointer to the start of the scope.

[ Top ]

processTokenWithinScope   [line 72]

void processTokenWithinScope( PHP_CodeSniffer_File $phpcsFile, int $stackPtr, int $currScope)

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

Overrides PHP_CodeSniffer_Standards_AbstractScopeSniff::processTokenWithinScope() (Processes a token that is found within the scope that this test is listening to.)

Parameters:

PHP_CodeSniffer_File   $phpcsFile   —  The current file being scanned.
int   $stackPtr   —  The position of the current token in the stack passed in $tokens.
int   $currScope   —  A pointer to the start of the scope.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:50:43 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.