mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/TitleBlacklist
synced 2024-11-27 15:30:48 +00:00
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:
parent
d3022c5836
commit
4382b2f8e1
|
@ -3,9 +3,6 @@
|
||||||
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
<rule ref="./vendor/mediawiki/mediawiki-codesniffer/MediaWiki">
|
||||||
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
|
<exclude name="MediaWiki.Commenting.FunctionComment.MissingDocumentationPublic" />
|
||||||
</rule>
|
</rule>
|
||||||
<rule ref="Squiz.Classes.ValidClassName.NotCamelCaps">
|
|
||||||
<exclude-pattern>Scribunto_LuaTitleBlacklistLibrary\.php</exclude-pattern>
|
|
||||||
</rule>
|
|
||||||
<file>.</file>
|
<file>.</file>
|
||||||
<arg name="extensions" value="php"/>
|
<arg name="extensions" value="php"/>
|
||||||
<arg name="encoding" value="UTF-8"/>
|
<arg name="encoding" value="UTF-8"/>
|
||||||
|
|
|
@ -5,7 +5,7 @@ namespace MediaWiki\Extension\TitleBlacklist;
|
||||||
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase;
|
use MediaWiki\Extension\Scribunto\Engines\LuaCommon\LibraryBase;
|
||||||
use MediaWiki\MediaWikiServices;
|
use MediaWiki\MediaWikiServices;
|
||||||
|
|
||||||
class Scribunto_LuaTitleBlacklistLibrary extends LibraryBase {
|
class LuaTitleBlacklistLibrary extends LibraryBase {
|
||||||
public function register() {
|
public function register() {
|
||||||
$lib = [
|
$lib = [
|
||||||
'test' => [ $this, 'test' ],
|
'test' => [ $this, 'test' ],
|
|
@ -20,7 +20,7 @@ class ScribuntoHooks implements ScribuntoExternalLibrariesHook {
|
||||||
*/
|
*/
|
||||||
public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) {
|
public function onScribuntoExternalLibraries( string $engine, array &$extraLibraries ) {
|
||||||
if ( $engine === 'lua' ) {
|
if ( $engine === 'lua' ) {
|
||||||
$extraLibraries['mw.ext.TitleBlacklist'] = Scribunto_LuaTitleBlacklistLibrary::class;
|
$extraLibraries['mw.ext.TitleBlacklist'] = LuaTitleBlacklistLibrary::class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue