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
This commit is contained in:
Umherirrender 2024-09-24 19:57:22 +02:00
parent d3022c5836
commit 4382b2f8e1
3 changed files with 2 additions and 5 deletions

View file

@ -3,9 +3,6 @@
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
</rule>
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
<exclude-pattern>Scribunto_LuaTitleBlacklistLibrary\.php</exclude-pattern>
</rule>
<file>.</file>
<arg name="extensions" value="php"/>
<arg name="encoding" value="UTF-8"/>

View file

@ -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' ],

View file

@ -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;
}
}
}