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

Class: IncludeSystemSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/MySource/Sniffs/Channels/IncludeSystemSniff.php

Class Overview

AbstractScopeSniff
   |
   --IncludeSystemSniff

Ensures that systems, asset types and libs are included before they are used.


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]
Ensures that systems, asset types and libs are included before they are used.


[ Top ]


Method Detail

__construct (Constructor)   [line 47]

IncludeSystemSniff __construct( )

Constructs a Squiz_Sniffs_Scope_MethodScopeSniff.
  • Access: public

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

getIncludedClassFromToken   [line 291]

string getIncludedClassFromToken( File $phpcsFile, array $tokens, int $stackPtr)

Determines the included class name from given token.
  • Access: protected

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file where this token was found.
array   $tokens   —  The array of file tokens.
int   $stackPtr   —  The position in the tokens array of the potentially included class.

[ Top ]

processTokenOutsideScope   [line 204]

void processTokenOutsideScope( File $phpcsFile, int $stackPtr)

Processes a token 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 the token was found.
int   $stackPtr   —  The position in the stack where this token was found.

[ Top ]

processTokenWithinScope   [line 63]

void processTokenWithinScope( File $phpcsFile, integer $stackPtr, integer $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.
integer   $stackPtr   —  The position where the token was found.
integer   $currScope   —  The current scope opener token.

[ Top ]


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