MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
|
Use e.g. More...
Public Member Functions | |
register () | |
@inheritDoc | |
process (File $phpcsFile, $stackPtr) | |
Public Attributes | |
$forbiddenFunctions = [] | |
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>
MediaWiki\Sniffs\Usage\ForbiddenFunctionsSniff::process | ( | File | $phpcsFile, |
$stackPtr ) |
File | $phpcsFile | |
int | $stackPtr | The current token index. |