build: Enable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName

Change-Id: Ib1e607addcb13c8fced2058ef5a80a96c95ff31e
This commit is contained in:
James D. Forrester 2017-05-04 15:17:29 -07:00
parent 9a27f80b3e
commit 945719f43e
3 changed files with 5 additions and 8 deletions

View file

@ -38,7 +38,7 @@ class VisualEditorHooks {
}
}
public static function VisualEditorApiFactory( $main, $name ) {
public static function getVisualEditorApiFactory( $main, $name ) {
$config = ConfigFactory::getDefaultInstance()->makeConfig( 'visualeditor' );
$class = $name === 'visualeditor' ? 'ApiVisualEditor' : 'ApiVisualEditorEdit';
return new $class( $main, $name, $config );
@ -447,7 +447,7 @@ class VisualEditorHooks {
* @param RecentChange $rc
* @return boolean true
*/
public static function onRecentChange_save( RecentChange $rc ) {
public static function onRecentChangeSave( RecentChange $rc ) {
$request = RequestContext::getMain()->getRequest();
if ( $request->getBool( 'veswitched' ) && $rc->mAttribs['rc_this_oldid'] ) {
$rc->addTags( 'visualeditor-switched' );

View file

@ -113,11 +113,11 @@
"APIModules": {
"visualeditor": {
"class": "ApiVisualEditor",
"factory": "VisualEditorHooks::VisualEditorApiFactory"
"factory": "VisualEditorHooks::getVisualEditorApiFactory"
},
"visualeditoredit": {
"class": "ApiVisualEditorEdit",
"factory": "VisualEditorHooks::VisualEditorApiFactory"
"factory": "VisualEditorHooks::getVisualEditorApiFactory"
}
},
"MessagesDirs": {
@ -174,7 +174,7 @@
"VisualEditorHooks::onEditPageShowEditFormFields"
],
"RecentChange_save": [
"VisualEditorHooks::onRecentChange_save"
"VisualEditorHooks::onRecentChangeSave"
],
"BeforeInitialize": [
"VisualEditorHooks::onBeforeInitialize"

View file

@ -23,7 +23,4 @@
<rule ref="MediaWiki.WhiteSpace.SpaceBeforeSingleLineComment.NewLineComment">
<severity>0</severity>
</rule>
<rule ref="MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName">
<severity>0</severity>
</rule>
</ruleset>