From 852ddaf9030275a25307adcddf5f8939677959bc Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 29 Oct 2015 12:22:22 +0100 Subject: [PATCH] build: Enable phpcs rule 'MediaWiki.Usage.DirUsage.FunctionFound' and make pass Change-Id: I05c9299944a5a8e215ecb2996f1a3846e257e12c --- maintenance/processEchoEmailBatch.php | 2 +- maintenance/removeInvalidNotification.php | 2 +- maintenance/testDiscussionParser.php | 2 +- phpcs.xml | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/maintenance/processEchoEmailBatch.php b/maintenance/processEchoEmailBatch.php index 9cb3e9feb..ad943311a 100644 --- a/maintenance/processEchoEmailBatch.php +++ b/maintenance/processEchoEmailBatch.php @@ -2,7 +2,7 @@ $IP = getenv( 'MW_INSTALL_PATH' ); if ( $IP === false ) { - $IP = dirname( __FILE__ ) . '/../../..'; + $IP = __DIR__ . '/../../..'; } require_once ( "$IP/maintenance/Maintenance.php" ); diff --git a/maintenance/removeInvalidNotification.php b/maintenance/removeInvalidNotification.php index c7dd8ec94..c927157c5 100644 --- a/maintenance/removeInvalidNotification.php +++ b/maintenance/removeInvalidNotification.php @@ -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 diff --git a/maintenance/testDiscussionParser.php b/maintenance/testDiscussionParser.php index 917c6fbda..0f84dc7eb 100644 --- a/maintenance/testDiscussionParser.php +++ b/maintenance/testDiscussionParser.php @@ -2,7 +2,7 @@ $IP = getenv( 'MW_INSTALL_PATH' ); if ( $IP === false ) { - $IP = dirname( __FILE__ ) . '/../../..'; + $IP = __DIR__ . '/../../..'; } require_once ( "$IP/maintenance/Maintenance.php" ); diff --git a/phpcs.xml b/phpcs.xml index ee4093a58..f2a1c05e9 100644 --- a/phpcs.xml +++ b/phpcs.xml @@ -4,7 +4,6 @@ -