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

Classes

class  AssignmentInControlStructuresSniff
 
class  IfElseStructureSniff
 

Detailed Description

Sniff to suppress the use of: Fail: if ( $a = 0 ) Fail: if ( $a *= foo() ) Fail: if ( $a += foo() ) Fail: while ( $a = foo() ) Pass: if ( $a == 0 ) Pass: if ( $a === 0 ) Pass: if ( $a === array( 1 => 0 ) ) Pass: while ( $a < 0 )

Sniff to warn when else and elseif are formatted incorrectly: Pass: } else { Fail: } else { Pass: } elseif ( $a == 1 ) { Fail: } ( $a == 1 ) {