From 4382b2f8e1a29d79da82ed5c3bbcc72ee488a618 Mon Sep 17 00:00:00 2001 From: Umherirrender Date: Tue, 24 Sep 2024 19:57:22 +0200 Subject: [PATCH] Rename Scribunto_LuaTitleBlacklistLibrary to remove underscore * Class names should not have underscores * No class alias is created, as there is no usage expected outside of the extension. Change-Id: I50f1271a773d1045262135c707496a289f6ddf28 --- .phpcs.xml | 3 --- ...aTitleBlacklistLibrary.php => LuaTitleBlacklistLibrary.php} | 2 +- includes/ScribuntoHooks.php | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) rename includes/{Scribunto_LuaTitleBlacklistLibrary.php => LuaTitleBlacklistLibrary.php} (95%) diff --git a/.phpcs.xml b/.phpcs.xml index b0afaa0f..e1ad36c6 100644 --- a/.phpcs.xml +++ b/.phpcs.xml @@ -3,9 +3,6 @@ - - Scribunto_LuaTitleBlacklistLibrary\.php - . diff --git a/includes/Scribunto_LuaTitleBlacklistLibrary.php b/includes/LuaTitleBlacklistLibrary.php similarity index 95% rename from includes/Scribunto_LuaTitleBlacklistLibrary.php rename to includes/LuaTitleBlacklistLibrary.php index d388ec69..2bcbd327 100644 --- a/includes/Scribunto_LuaTitleBlacklistLibrary.php +++ b/includes/LuaTitleBlacklistLibrary.php @@ -5,7 +5,7 @@ namespace MediaWiki\Extension\TitleBlacklist; use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase; use MediaWiki\MediaWikiServices; -class Scribunto_LuaTitleBlacklistLibrary extends LibraryBase { +class LuaTitleBlacklistLibrary extends LibraryBase { public function register() { $lib = [ 'test' => [ $this, 'test' ], diff --git a/includes/ScribuntoHooks.php b/includes/ScribuntoHooks.php index 5c733450..d07b03ac 100644 --- a/includes/ScribuntoHooks.php +++ b/includes/ScribuntoHooks.php @@ -20,7 +20,7 @@ class ScribuntoHooks implements ScribuntoExternalLibrariesHook { */ public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) { if ( $engine === 'lua' ) { - $extraLibraries['mw.ext.TitleBlacklist'] = Scribunto_LuaTitleBlacklistLibrary::class; + $extraLibraries['mw.ext.TitleBlacklist'] = LuaTitleBlacklistLibrary::class; } } }