From 728d24423c83399844908aeb190a4aa881bce6bc Mon Sep 17 00:00:00 2001 From: "James D. Forrester" Date: Thu, 30 May 2013 12:00:36 +0100 Subject: [PATCH] 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 --- VisualEditor.hooks.php | 10 ++++++++-- VisualEditorMessagesModule.php | 18 ++++++++++++------ 2 files changed, 20 insertions(+), 8 deletions(-) diff --git a/VisualEditor.hooks.php b/VisualEditor.hooks.php index 982dada08d..e06491c1b2 100644 --- a/VisualEditor.hooks.php +++ b/VisualEditor.hooks.php @@ -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 diff --git a/VisualEditorMessagesModule.php b/VisualEditorMessagesModule.php index 6821be6ca7..13eb44855d 100644 --- a/VisualEditorMessagesModule.php +++ b/VisualEditorMessagesModule.php @@ -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 ); } }