MediaWiki-CodeSniffer
MediaWiki CodeSniffer Standards
Loading...
Searching...
No Matches
MediaWiki\Sniffs\NamingConventions Namespace Reference

Verify that global functions start with a valid prefix. More...

Classes

class  LowerCamelFunctionsNameSniff
 Make sure function names follow lower camel case. More...
 
class  PrefixedGlobalFunctionsSniff
 
class  ValidGlobalNameSniff
 

Detailed Description

Verify that global functions start with a valid prefix.

Verify MediaWiki global variable naming convention.

For MediaWiki code, the valid prefixes are wf (or ef in some legacy extension code, per https://www.mediawiki.org/wiki/Manual:Coding_conventions/PHP#Naming), by default the sniff only allows wf, but repositories can configure this via the allowedPrefixes property.

A global name must be prefixed with 'wg'.