mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-23 22:13:34 +00:00
Now we've got PHPCS switched on, kill long lines
Lest PHPCS throws wobblies over unrelated changes in PHP files with underlying issues in their code style. Change-Id: Ifc4aec328d726e9ca62db34af55ea9592c08d9f3
This commit is contained in:
parent
68b29a8859
commit
728d24423c
|
@ -65,7 +65,10 @@ class VisualEditorHooks {
|
|||
'isPageWatched' => $out->getUser()->isWatched( $out->getTitle() ),
|
||||
'pageLanguageCode' => $out->getTitle()->getPageLanguage()->getHtmlCode(),
|
||||
'pageLanguageDir' => $out->getTitle()->getPageLanguage()->getDir(),
|
||||
'magnifyClipIconURL' => $wgStylePath . '/common/images/magnify-clip' . ( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png' // Same as in Linker.php
|
||||
// Same as in Linker.php
|
||||
'magnifyClipIconURL' => $wgStylePath .
|
||||
'/common/images/magnify-clip' .
|
||||
( $wgContLang->isRTL() ? '-rtl' : '' ) . '.png'
|
||||
);
|
||||
|
||||
return true;
|
||||
|
@ -88,7 +91,10 @@ class VisualEditorHooks {
|
|||
return true;
|
||||
}
|
||||
|
||||
public static function onResourceLoaderTestModules( array &$testModules, ResourceLoader &$resourceLoader ) {
|
||||
public static function onResourceLoaderTestModules(
|
||||
array &$testModules,
|
||||
ResourceLoader &$resourceLoader
|
||||
) {
|
||||
$testModules['qunit']['ext.visualEditor.test'] = array(
|
||||
'scripts' => array(
|
||||
// QUnit plugin
|
||||
|
|
|
@ -33,8 +33,7 @@ class VisualEditorMessagesModule extends ResourceLoaderModule {
|
|||
}
|
||||
return
|
||||
've.init.platform.addParsedMessages(' . FormatJson::encode( $parsedMesssages ) . ');'.
|
||||
've.init.platform.addMessages(' . FormatJson::encode( $messages ) . ');'
|
||||
;
|
||||
've.init.platform.addMessages(' . FormatJson::encode( $messages ) . ');';
|
||||
}
|
||||
|
||||
protected function getMessageInfo() {
|
||||
|
@ -50,7 +49,9 @@ class VisualEditorMessagesModule extends ResourceLoaderModule {
|
|||
|
||||
// Override message value
|
||||
$msgVals = array(
|
||||
'visualeditor-feedback-link' => wfMessage( 'visualeditor-feedback-link' )->inContentLanguage()->text(),
|
||||
'visualeditor-feedback-link' => wfMessage( 'visualeditor-feedback-link' )
|
||||
->inContentLanguage()
|
||||
->text(),
|
||||
);
|
||||
|
||||
// Copyright warning (based on EditPage::getCopyrightWarning)
|
||||
|
@ -74,7 +75,11 @@ class VisualEditorMessagesModule extends ResourceLoaderModule {
|
|||
// Normalise to 'copyrightwarning' so we have a consistent key in the front-end.
|
||||
$msgArgs[ 'copyrightwarning' ] = $copywarnMsg;
|
||||
|
||||
$msgKeys = array_values( array_unique( array_merge( $msgKeys, array_keys( $msgArgs ), array_keys( $msgVals ) ) ) );
|
||||
$msgKeys = array_values( array_unique( array_merge(
|
||||
$msgKeys,
|
||||
array_keys( $msgArgs ),
|
||||
array_keys( $msgVals )
|
||||
) ) );
|
||||
|
||||
return array(
|
||||
'keys' => $msgKeys,
|
||||
|
@ -100,8 +105,9 @@ class VisualEditorMessagesModule extends ResourceLoaderModule {
|
|||
return max(
|
||||
$this->getMsgBlobMtime( $context->getLanguage() ),
|
||||
// Also invalidate this module if this file changes (i.e. when messages were
|
||||
// added or removed, or when the javascript invocation in getScript is changes).
|
||||
file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1 // use 1 because 0 = now, would invalidate continously
|
||||
// added or removed, or when the Javascript invocation in getScript is changes).
|
||||
// Use 1 because 0 = now, would invalidate continously
|
||||
file_exists( __FILE__ ) ? filemtime( __FILE__ ) : 1
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue