MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
|
Custom sniff that disallows full qualified class names outside of the "use …" section. More...
Public Member Functions | |
register () | |
@inheritDoc | |
process (File $phpcsFile, $stackPtr) | |
@inheritDoc | |
Public Attributes | |
bool | $allowMainNamespace = true |
bool | $allowInheritance = true |
bool | $allowFunctions = true |
Custom sniff that disallows full qualified class names outside of the "use …" section.
Exceptions:
Note this sniff is disabled by default. You need to increase it's severity in your .phpcs.xml to enable it.
Example configuration: <rule ref="MediaWiki.Classes.FullQualifiedClassName"> <severity>5</severity> <properties> <property name="allowMainNamespace" value="false" > <property name="allowInheritance" value="false" > <property name="allowFunctions" value="false" > </properties> </rule>
Note this sniff currently does not check class names mentioned in PHPDoc comments.