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

Class: DeprecatedFunctionsSniff

Source Location: /PHP_CodeSniffer-3.1.1/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php

Class Overview

ForbiddenFunctionsSniff
   |
   --DeprecatedFunctionsSniff

Discourages the use of deprecated PHP functions.


Author(s):

Copyright:

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

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 13]
Discourages the use of deprecated PHP functions.


[ Top ]


Class Variables

$forbiddenFunctions = array()

[line 24]

A list of forbidden functions with their alternatives.

The value is NULL if no alternative exists. IE, the function should just not be used.

  • Var: => string|null)
  • Access: public

Type:   array(string


[ Top ]



Method Detail

__construct (Constructor)   [line 32]

DeprecatedFunctionsSniff __construct( )

Constructor.

Uses the Reflection API to get a list of deprecated functions.

  • Access: public

[ Top ]

addError   [line 61]

void addError( \PHP_CodeSniffer\Files\File $phpcsFile, int $stackPtr, string $function, [string $pattern = null])

Generates the error or warning for this sniff.
  • Access: protected

Parameters:

\PHP_CodeSniffer\Files\File   $phpcsFile   —  The file being scanned.
int   $stackPtr   —  The position of the forbidden function in the token array.
string   $function   —  The name of the forbidden function.
string   $pattern   —  The pattern used for the match.

[ Top ]


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