MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
Loading...
Searching...
No Matches
MediaWiki\Sniffs\Usage\ForbiddenFunctionsSniff Class Reference

Use e.g. More...

+ Inheritance diagram for MediaWiki\Sniffs\Usage\ForbiddenFunctionsSniff:

Public Member Functions

 register ()
 @inheritDoc
 
 process (File $phpcsFile, $stackPtr)
 

Public Attributes

 $forbiddenFunctions = []
 

Detailed Description

Use e.g.

<exclude name="MediaWiki.Usage.ForbiddenFunctions.eval" > in your .phpcs.xml to remove a function from the predefined list of forbidden functions.

You can also add entries or modify existing ones. Note that an empty value="" won't work. Use "null" for forbidden functions and any other non-empty value for replacements.

<rule ref="MediaWiki.Usage.ForbiddenFunctions"> <properties> <property name="forbiddenFunctions" type="array"> <element key="eval" value="null" > <element key="sizeof" value="count" > </property> </properties> </rule>

Member Function Documentation

◆ process()

MediaWiki\Sniffs\Usage\ForbiddenFunctionsSniff::process ( File $phpcsFile,
$stackPtr )
Parameters
File$phpcsFile
int$stackPtrThe current token index.
Returns
void

The documentation for this class was generated from the following file: