Merge "build: Enable MediaWiki.NamingConventions.LowerCamelFunctionsName.FunctionName"

This commit is contained in:
jenkins-bot 2017-05-12 02:02:36 +00:00 committed by Gerrit Code Review
commit adbd05be82
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>