BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
MediaWiki\Sniffs\Usage Namespace Reference

Classes

class  DbrQueryUsageSniff
 
class  DeprecatedConstantUsageSniff
 
class  DirUsageSniff
 
class  ExtendClassUsageSniff
 
class  GotoUsageSniff
 
class  ReferenceThisSniff
 
class  ScalarTypeHintUsageSniff
 
class  SuperGlobalsUsageSniff
 

Detailed Description

Report warnings when $dbr->query() is used instead of $dbr->select()

Report error when dirname(FILE) is used instead of DIR

Fail: dirname( FILE ) Pass: dirname( FILE . "/.." ) Pass: dirname( FILE, 2 ) Pass: dirname( joinpaths( FILE, ".." ) ) Pass: $abc->dirname( FILE ) Pass: parent::dirname( FILE )

Report warnings when unexpected function or variable used like. Should use $this->msg() rather than wfMessage() on ContextSource extend. Should use $this->getUser() rather than $wgUser() on ContextSource extend. Should use $this->getRequest() rather than $wgRequest on ContextSource extend.

Report error when goto is used

Do not access php superglobals like $__GET,$__POST,$__SERVER. Fail: $_GET['id'] Fail: $_POST['user'] Fail: $_SERVER['ip']