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

Class: CamelCapsFunctionNameSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Generic/Sniffs/NamingConventions/CamelCapsFunctionNameSniff.php

Class Overview

AbstractScopeSniff
   |
   --CamelCapsFunctionNameSniff

Ensures method and functions are named correctly.


Author(s):

Copyright:

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

Variables

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 17]
Ensures method and functions are named correctly.


[ Top ]


Class Variables

$magicFunctions = array('autoload' => true)

[line 69]

A list of all PHP magic functions.
  • Access: protected

Type:   array


[ Top ]

$magicMethods = array(
                               'construct'  => true,
                               'destruct'   => true,
                               'call'       => true,
                               'callstatic' => true,
                               'get'        => true,
                               'set'        => true,
                               'isset'      => true,
                               'unset'      => true,
                               'sleep'      => true,
                               'wakeup'     => true,
                               'tostring'   => true,
                               'set_state'  => true,
                               'clone'      => true,
                               'invoke'     => true,
                               'debuginfo'  => true,
                              )

[line 25]

A list of all PHP magic methods.
  • Access: protected

Type:   array


[ Top ]

$methodsDoubleUnderscore = array(
                                          'soapcall'               => true,
                                          'getlastrequest'         => true,
                                          'getlastresponse'        => true,
                                          'getlastrequestheaders'  => true,
                                          'getlastresponseheaders' => true,
                                          'getfunctions'           => true,
                                          'gettypes'               => true,
                                          'dorequest'              => true,
                                          'setcookie'              => true,
                                          'setlocation'            => true,
                                          'setsoapheaders'         => true,
                                         )

[line 50]

A list of all PHP non-magic methods starting with a double underscore.

These come from PHP modules such as SOAPClient.

  • Access: protected

Type:   array


[ Top ]

$strict =  true

[line 76]

If TRUE, the string must not have two capital letters next to each other.
  • Access: public

Type:   boolean


[ Top ]



Method Detail

__construct (Constructor)   [line 82]

CamelCapsFunctionNameSniff __construct( )

Constructs a Generic_Sniffs_NamingConventions_CamelCapsFunctionNameSniff.
  • Access: public

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

processTokenOutsideScope   [line 168]

void processTokenOutsideScope( File $phpcsFile, int $stackPtr)

Processes the tokens outside the scope.
  • 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 being processed.
int   $stackPtr   —  The position where this token was found.

[ Top ]

processTokenWithinScope   [line 99]

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

Processes the tokens within the scope.
  • 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 being processed.
int   $stackPtr   —  The position where this token was found.
int   $currScope   —  The position of the current scope.

[ Top ]


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