MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
|
Sniff to enforce the presence or absence of trailing commas in single- and multi-line arrays. More...
Public Member Functions | |
register () | |
process (File $phpcsFile, $stackPtr) | |
Public Attributes | |
bool | $singleLine = null |
bool | $multiLine = null |
Sniff to enforce the presence or absence of trailing commas in single- and multi-line arrays.
By default, this sniff does nothing. Configure it as follows to enforce trailing commas in multi-line arrays while removing them in single-line arrays: <rule ref="MediaWiki.Arrays.TrailingComma"> <properties> <property name="singleLine" value="false" > <property name="multiLine" value="true" > </properties> </rule>
MediaWiki\Sniffs\Arrays\TrailingCommaSniff::process | ( | File | $phpcsFile, |
$stackPtr ) |
File | $phpcsFile | |
int | $stackPtr | The current token index. |