build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass

Change-Id: I05c9299944a5a8e215ecb2996f1a3846e257e12c
This commit is contained in:
James D. Forrester 2015-10-29 12:22:22 +01:00
parent 1ee78723d9
commit 852ddaf903
4 changed files with 3 additions and 4 deletions

View file

@ -2,7 +2,7 @@
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = dirname( __FILE__ ) . '/../../..';
$IP = __DIR__ . '/../../..';
}
require_once ( "$IP/maintenance/Maintenance.php" );

View file

@ -6,7 +6,7 @@
*/
require_once ( getenv( 'MW_INSTALL_PATH' ) !== false
? getenv( 'MW_INSTALL_PATH' ) . '/maintenance/Maintenance.php'
: dirname( __FILE__ ) . '/../../../maintenance/Maintenance.php' );
: __DIR__ . '/../../../maintenance/Maintenance.php' );
/**
* Maintenance script that removes invalid notifications

View file

@ -2,7 +2,7 @@
$IP = getenv( 'MW_INSTALL_PATH' );
if ( $IP === false ) {
$IP = dirname( __FILE__ ) . '/../../..';
$IP = __DIR__ . '/../../..';
}
require_once ( "$IP/maintenance/Maintenance.php" );

View file

@ -4,7 +4,6 @@
<rule ref="vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="Generic.Files.LineLength"/>
<exclude name="MediaWiki.NamingConventions.PrefixedGlobalFunctions.wfPrefix"/>
<exclude name="MediaWiki.Usage.DirUsage.FunctionFound"/>
<exclude name="MediaWiki.VariableAnalysis.UnusedGlobalVariables"/>
<exclude name="MediaWiki.WhiteSpace.SpaceAfterControlStructure.Incorrect"/>
<exclude name="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment"/>