Umherirrender has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/358593 )

Change subject: Use __DIR__ instead of dirname(__FILE__)
......................................................................

Use __DIR__ instead of dirname(__FILE__)

Change-Id: Ie6bb2088adfead2a5416e4ce628461d2ceaf2584
---
M FlaggedRevs.php
M backend/schema/FlaggedRevsUpdater.hooks.php
M frontend/language/ConfiguredPages.i18n.php
M frontend/language/FlaggedRevs.i18n.php
M frontend/language/PendingChanges.i18n.php
M frontend/language/ProblemChanges.i18n.php
M frontend/language/QualityOversight.i18n.php
M frontend/language/ReviewedPages.i18n.php
M frontend/language/ReviewedVersions.i18n.php
M frontend/language/RevisionReview.i18n.php
M frontend/language/Stabilization.i18n.php
M frontend/language/StablePages.i18n.php
M frontend/language/UnreviewedPages.i18n.php
M frontend/language/ValidationStatistics.i18n.php
M frontend/specialpages/reports/ValidationStatistics_body.php
M maintenance/cachePendingRevs.php
M maintenance/clearCachedText.php
M maintenance/fixBug28348.php
M maintenance/flagToSemiProtect.php
M maintenance/populateRevTimestamp.php
M maintenance/pruneRevData.php
M maintenance/purgeReviewablePages.php
M maintenance/reviewAllPages.php
M maintenance/updateAutoPromote.php
M maintenance/updateQueryCache.php
M maintenance/updateStats.php
M maintenance/updateTracking.php
M phpcs.xml
M tests/FlaggedRevsTest.hooks.php
29 files changed, 40 insertions(+), 43 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/FlaggedRevs 
refs/changes/93/358593/1

diff --git a/FlaggedRevs.php b/FlaggedRevs.php
index 91a8e0b..e35dbcb 100644
--- a/FlaggedRevs.php
+++ b/FlaggedRevs.php
@@ -36,7 +36,7 @@
 ];
 
 # Load global constants
-require ( dirname( __FILE__ ) . '/FlaggedRevs.defines.php' );
+require ( __DIR__ . '/FlaggedRevs.defines.php' );
 
 # This will only distinguish "checked", "quality", and unreviewed
 # A small icon will show in the upper right hand corner
@@ -217,7 +217,7 @@
 # In such cases, we select the current (unreviewed) revision. Likewise for 
files.
 $wgFlaggedRevsHandleIncludes = FR_INCLUDES_STABLE;
 
-$dir = dirname( __FILE__ );
+$dir = __DIR__;
 
 # Basic directory layout
 $backendDir       = "$dir/backend";
@@ -367,7 +367,7 @@
 ### End ###
 
 # Define JS/CSS modules and file locations
-$localModulePath = dirname( __FILE__ ) . '/frontend/modules/';
+$localModulePath = __DIR__ . '/frontend/modules/';
 $remoteModulePath = 'FlaggedRevs/frontend/modules';
 $wgResourceModules['ext.flaggedRevs.basic'] = [
        'position'              => 'top',
diff --git a/backend/schema/FlaggedRevsUpdater.hooks.php 
b/backend/schema/FlaggedRevsUpdater.hooks.php
index 1fca49b..b27d261 100644
--- a/backend/schema/FlaggedRevsUpdater.hooks.php
+++ b/backend/schema/FlaggedRevsUpdater.hooks.php
@@ -6,7 +6,7 @@
        public static function addSchemaUpdates( DatabaseUpdater $du ) {
                global $wgDBtype;
                if ( $wgDBtype == 'mysql' ) {
-                       $base = dirname( __FILE__ ) . '/mysql';
+                       $base = __DIR__ . '/mysql';
                        // Initial install tables (current schema)
                        $du->addExtensionUpdate( [ 'addTable',
                                'flaggedrevs', "$base/FlaggedRevs.sql", true ] 
);
@@ -36,7 +36,7 @@
                        $du->addExtensionUpdate( [ 'addTable',
                                'flaggedrevs_statistics', 
"$base/patch-flaggedrevs_statistics.sql", true ] );
                } elseif ( $wgDBtype == 'postgres' ) {
-                       $base = dirname( __FILE__ ) . '/postgres';
+                       $base = __DIR__ . '/postgres';
                        // Initial install tables (current schema)
                        $du->addExtensionUpdate( [ 'addTable',
                                'flaggedrevs', "$base/FlaggedRevs.pg.sql", true 
] );
@@ -66,7 +66,7 @@
                        $du->addExtensionUpdate( [ 'addTable',
                                'flaggedrevs_statistics', 
"$base/patch-flaggedrevs_statistics.sql", true ] );
                } elseif ( $wgDBtype == 'sqlite' ) {
-                       $base = dirname( __FILE__ ) . '/mysql';
+                       $base = __DIR__ . '/mysql';
                        $du->addExtensionUpdate( [ 'addTable',
                                'flaggedrevs', "$base/FlaggedRevs.sql", true ] 
);
                }
@@ -90,7 +90,7 @@
                        $du->output( "...fr_rev_timestamp already exists.\n" );
                        return;
                }
-               $scriptDir = dirname( __FILE__ ) . 
"/../../maintenance/populateRevTimestamp.php";
+               $scriptDir = __DIR__ . 
"/../../maintenance/populateRevTimestamp.php";
                if ( !file_exists( $scriptDir ) ) {
                        $du->output( "...populateRevTimestamp.php missing! 
Aborting fr_rev_timestamp update.\n" );
                        return; // sanity; all or nothing
diff --git a/frontend/language/ConfiguredPages.i18n.php 
b/frontend/language/ConfiguredPages.i18n.php
index 00c52f8..df6351c 100644
--- a/frontend/language/ConfiguredPages.i18n.php
+++ b/frontend/language/ConfiguredPages.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim985f08975293eced( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/configuredpages/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/configuredpages/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/FlaggedRevs.i18n.php 
b/frontend/language/FlaggedRevs.i18n.php
index f2ace4c..a78ea77 100644
--- a/frontend/language/FlaggedRevs.i18n.php
+++ b/frontend/language/FlaggedRevs.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim04ec7309aca1a15f( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/flaggedrevs/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/flaggedrevs/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/PendingChanges.i18n.php 
b/frontend/language/PendingChanges.i18n.php
index 6cc063b..2278d32 100644
--- a/frontend/language/PendingChanges.i18n.php
+++ b/frontend/language/PendingChanges.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShimd3982adffa0c1b39( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/pendingchanges/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/pendingchanges/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/ProblemChanges.i18n.php 
b/frontend/language/ProblemChanges.i18n.php
index 714a47f..e78ef89 100644
--- a/frontend/language/ProblemChanges.i18n.php
+++ b/frontend/language/ProblemChanges.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim44fa42a896563614( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/problemchanges/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/problemchanges/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/QualityOversight.i18n.php 
b/frontend/language/QualityOversight.i18n.php
index b22c6af..020eae9 100644
--- a/frontend/language/QualityOversight.i18n.php
+++ b/frontend/language/QualityOversight.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShime47bd3b5f57b1455( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/qualityoversight/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/qualityoversight/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/ReviewedPages.i18n.php 
b/frontend/language/ReviewedPages.i18n.php
index ef2c36a..cbc53f2 100644
--- a/frontend/language/ReviewedPages.i18n.php
+++ b/frontend/language/ReviewedPages.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShima9f13543a317faf3( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/reviewedpages/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/reviewedpages/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/ReviewedVersions.i18n.php 
b/frontend/language/ReviewedVersions.i18n.php
index 855d0af..830830c 100644
--- a/frontend/language/ReviewedVersions.i18n.php
+++ b/frontend/language/ReviewedVersions.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim9f18378bf49e1044( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/reviewedversions/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/reviewedversions/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/RevisionReview.i18n.php 
b/frontend/language/RevisionReview.i18n.php
index 8c7c9ca..228c6b1 100644
--- a/frontend/language/RevisionReview.i18n.php
+++ b/frontend/language/RevisionReview.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShimbe34aedabe950fe8( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/revisionreview/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/revisionreview/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/Stabilization.i18n.php 
b/frontend/language/Stabilization.i18n.php
index aa6d994..ba4d405 100644
--- a/frontend/language/Stabilization.i18n.php
+++ b/frontend/language/Stabilization.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim016ddf4d774d2de7( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/stabilization/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/stabilization/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/StablePages.i18n.php 
b/frontend/language/StablePages.i18n.php
index 6308a5b..d48a897 100644
--- a/frontend/language/StablePages.i18n.php
+++ b/frontend/language/StablePages.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim5e260e56938f8973( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/stablepages/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/stablepages/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/UnreviewedPages.i18n.php 
b/frontend/language/UnreviewedPages.i18n.php
index c0406c9..e5ad4d0 100644
--- a/frontend/language/UnreviewedPages.i18n.php
+++ b/frontend/language/UnreviewedPages.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim690308b694dff380( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/unreviewedpages/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/unreviewedpages/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/language/ValidationStatistics.i18n.php 
b/frontend/language/ValidationStatistics.i18n.php
index b98b843..13d94f2 100644
--- a/frontend/language/ValidationStatistics.i18n.php
+++ b/frontend/language/ValidationStatistics.i18n.php
@@ -15,7 +15,7 @@
        function wfJsonI18nShim6138f8f2337f791c( $cache, $code, &$cachedData ) {
                $codeSequence = array_merge( [ $code ], 
$cachedData['fallbackSequence'] );
                foreach ( $codeSequence as $csCode ) {
-                       $fileName = dirname( __FILE__ ) . 
"/../../i18n/validationstatistics/$csCode.json";
+                       $fileName = __DIR__ . 
"/../../i18n/validationstatistics/$csCode.json";
                        if ( is_readable( $fileName ) ) {
                                $data = FormatJson::decode( file_get_contents( 
$fileName ), true );
                                foreach ( array_keys( $data ) as $key ) {
diff --git a/frontend/specialpages/reports/ValidationStatistics_body.php 
b/frontend/specialpages/reports/ValidationStatistics_body.php
index c8ba908..8f71023 100644
--- a/frontend/specialpages/reports/ValidationStatistics_body.php
+++ b/frontend/specialpages/reports/ValidationStatistics_body.php
@@ -211,7 +211,7 @@
                } else {
                        global $wgPhpCli;
                        $ext = !empty( $wgPhpCli ) ? $wgPhpCli : 'php';
-                       $path = wfEscapeShellArg( dirname( __FILE__ ) . 
'/../maintenance/updateStats.php' );
+                       $path = wfEscapeShellArg( __DIR__ . 
'/../maintenance/updateStats.php' );
                        $wiki = wfEscapeShellArg( wfWikiId() );
                        $devNull = wfIsWindows() ? "NUL:" : "/dev/null";
                        $commandLine = "$ext $path --wiki=$wiki > $devNull &";
diff --git a/maintenance/cachePendingRevs.php b/maintenance/cachePendingRevs.php
index 013bb0d..76b1998 100644
--- a/maintenance/cachePendingRevs.php
+++ b/maintenance/cachePendingRevs.php
@@ -8,7 +8,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/clearCachedText.php b/maintenance/clearCachedText.php
index b64f4d2..4d3862b 100644
--- a/maintenance/clearCachedText.php
+++ b/maintenance/clearCachedText.php
@@ -6,7 +6,7 @@
 
 $IP = getenv( 'MW_INSTALL_PATH' );
 if ( strval( $IP ) == '' ) {
-       $IP = dirname( __FILE__ ) . '/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 $optionsWithArgs = [ 'backup' ];
 require ( "$IP/maintenance/commandLine.inc" );
diff --git a/maintenance/fixBug28348.php b/maintenance/fixBug28348.php
index cab77f3..2de8a75 100644
--- a/maintenance/fixBug28348.php
+++ b/maintenance/fixBug28348.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/flagToSemiProtect.php 
b/maintenance/flagToSemiProtect.php
index 7c83a41..c8591d3 100644
--- a/maintenance/flagToSemiProtect.php
+++ b/maintenance/flagToSemiProtect.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/populateRevTimestamp.php 
b/maintenance/populateRevTimestamp.php
index b9e01d1..0930ad1 100644
--- a/maintenance/populateRevTimestamp.php
+++ b/maintenance/populateRevTimestamp.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
@@ -93,7 +93,7 @@
        }
 
        protected function last_pos_file() {
-               return dirname( __FILE__ ) . "/popRevTimestampLast-" . 
wfWikiID();
+               return __DIR__ . "/popRevTimestampLast-" . wfWikiID();
        }
 }
 
diff --git a/maintenance/pruneRevData.php b/maintenance/pruneRevData.php
index 0f87bf0..9f2b954 100644
--- a/maintenance/pruneRevData.php
+++ b/maintenance/pruneRevData.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/purgeReviewablePages.php 
b/maintenance/purgeReviewablePages.php
index 2d16345..81e0d47 100644
--- a/maintenance/purgeReviewablePages.php
+++ b/maintenance/purgeReviewablePages.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/reviewAllPages.php b/maintenance/reviewAllPages.php
index 87a3319..f613193 100644
--- a/maintenance/reviewAllPages.php
+++ b/maintenance/reviewAllPages.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/updateAutoPromote.php 
b/maintenance/updateAutoPromote.php
index e7f01ac..007c067 100644
--- a/maintenance/updateAutoPromote.php
+++ b/maintenance/updateAutoPromote.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/updateQueryCache.php b/maintenance/updateQueryCache.php
index a1f5bfd..62098d4 100644
--- a/maintenance/updateQueryCache.php
+++ b/maintenance/updateQueryCache.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/updateStats.php b/maintenance/updateStats.php
index d0268bc..983332f 100644
--- a/maintenance/updateStats.php
+++ b/maintenance/updateStats.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/maintenance/updateTracking.php b/maintenance/updateTracking.php
index d063e22..e76333b 100644
--- a/maintenance/updateTracking.php
+++ b/maintenance/updateTracking.php
@@ -5,7 +5,7 @@
 if ( getenv( 'MW_INSTALL_PATH' ) ) {
        $IP = getenv( 'MW_INSTALL_PATH' );
 } else {
-       $IP = dirname( __FILE__ ).'/../../..';
+       $IP = __DIR__ . '/../../..';
 }
 
 require_once ( "$IP/maintenance/Maintenance.php" );
diff --git a/phpcs.xml b/phpcs.xml
index 8393ff8..e370545 100644
--- a/phpcs.xml
+++ b/phpcs.xml
@@ -17,9 +17,6 @@
         <rule ref="MediaWiki.NamingConventions.ValidGlobalName.wgPrefix">
                 <severity>0</severity>
         </rule>
-        <rule ref="MediaWiki.Usage.DirUsage.FunctionFound">
-                <severity>0</severity>
-        </rule>
         <rule ref="MediaWiki.VariableAnalysis.UnusedGlobalVariables">
                 <severity>0</severity>
         </rule>
diff --git a/tests/FlaggedRevsTest.hooks.php b/tests/FlaggedRevsTest.hooks.php
index a6e2d78..44ee031 100644
--- a/tests/FlaggedRevsTest.hooks.php
+++ b/tests/FlaggedRevsTest.hooks.php
@@ -4,14 +4,14 @@
  */
 class FlaggedRevsTestHooks {
        public static function getUnitTests( &$files ) {
-               $files[] = dirname( __FILE__ ) . '/FRInclusionManagerTest.php';
-               $files[] = dirname( __FILE__ ) . '/FRUserCountersTest.php';
-               $files[] = dirname( __FILE__ ) . '/FRUserActivityTest.php';
-               $files[] = dirname( __FILE__ ) . '/FRParserCacheStableTest.php';
-               $files[] = dirname( __FILE__ ) . '/FlaggablePageTest.php';
-               $files[] = dirname( __FILE__ ) . '/FlaggedRevsSetupTest.php';
+               $files[] = __DIR__ . '/FRInclusionManagerTest.php';
+               $files[] = __DIR__ . '/FRUserCountersTest.php';
+               $files[] = __DIR__ . '/FRUserActivityTest.php';
+               $files[] = __DIR__ . '/FRParserCacheStableTest.php';
+               $files[] = __DIR__ . '/FlaggablePageTest.php';
+               $files[] = __DIR__ . '/FlaggedRevsSetupTest.php';
                if ( class_exists( 'Scribunto_LuaEngineTestBase' ) ) {
-                       $files[] = dirname( __FILE__ ) . 
'/FlaggedRevsLibraryTest.php';
+                       $files[] = __DIR__ . '/FlaggedRevsLibraryTest.php';
                }
                return true;
        }

-- 
To view, visit https://gerrit.wikimedia.org/r/358593
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ie6bb2088adfead2a5416e4ce628461d2ceaf2584
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/FlaggedRevs
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <umherirrender_de...@web.de>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to