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

Class: MethodScopeSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Squiz/Sniffs/Scope/MethodScopeSniff.php

Class Overview

AbstractScopeSniff
   |
   --MethodScopeSniff

Verifies that class methods have scope modifiers.


Author(s):

Copyright:

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

Methods


Inherited Variables

Inherited Methods

Class: AbstractScopeSniff

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

Class Details

[line 16]
Verifies that class methods have scope modifiers.


[ Top ]


Method Detail

__construct (Constructor)   [line 23]

MethodScopeSniff __construct( )

Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
  • Access: public

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

processTokenOutsideScope   [line 83]

void processTokenOutsideScope( File $phpcsFile, int $stackPtr)

Processes a token that is found within the scope that this test is listening to.
  • Access: protected

Overrides AbstractScopeSniff::processTokenOutsideScope() (Processes a token that is found outside the scope that this test is listening to.)

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file where this token was found.
int   $stackPtr   —  The position in the stack where this token was found.

[ Top ]

processTokenWithinScope   [line 39]

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

Processes the function tokens within the class.
  • Access: protected

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

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file where this token was found.
int   $stackPtr   —  The position where the token was found.
int   $currScope   —  The current scope opener token.

[ Top ]


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