From 819e9a92a39807da1d94d083d66e57623f0805c4 Mon Sep 17 00:00:00 2001 From: Siebrand Mazeland Date: Mon, 20 May 2013 20:28:37 +0200 Subject: [PATCH] Update formatting Fixes for issues CodeSniffer complained about at https://integration.wikimedia.org/ci/job/mediawiki-core-phpcs-HEAD/9920/console for 4f98011fdd98328028d152baf27627fea0c28d3e. Change-Id: I2cc0cee6ff8260e74ad8b1721614ae16a360e68d --- includes/SpecialPage.php | 41 +++++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/includes/SpecialPage.php b/includes/SpecialPage.php index 665ca4a157..ac838a5f65 100644 --- a/includes/SpecialPage.php +++ b/includes/SpecialPage.php @@ -27,7 +27,6 @@ * @ingroup SpecialPage */ class SpecialPage { - // The canonical name of this special page // Also used for the default

heading, @see getDescription() protected $mName; @@ -305,12 +304,14 @@ class SpecialPage { * If you override execute(), you can recover the default behavior with userCanExecute() * and displayRestrictionError() * - * @param string $name name of the special page, as seen in links and URLs - * @param string $restriction user right required, e.g. "block" or "delete" - * @param bool $listed whether the page is listed in Special:Specialpages - * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name - * @param string $file file which is included by execute(). It is also constructed from $name by default - * @param bool $includable whether the page can be included in normal pages + * @param string $name Name of the special page, as seen in links and URLs + * @param string $restriction User right required, e.g. "block" or "delete" + * @param bool $listed Whether the page is listed in Special:Specialpages + * @param Callback|Bool $function Function called by execute(). By default + * it is constructed from $name + * @param string $file File which is included by execute(). It is also + * constructed from $name by default + * @param bool $includable Whether the page can be included in normal pages */ public function __construct( $name = '', $restriction = '', $listed = true, @@ -322,12 +323,14 @@ class SpecialPage { /** * Do the real work for the constructor, mainly so __call() can intercept * calls to SpecialPage() - * @param string $name name of the special page, as seen in links and URLs - * @param string $restriction user right required, e.g. "block" or "delete" - * @param bool $listed whether the page is listed in Special:Specialpages - * @param $function Callback|Bool: function called by execute(). By default it is constructed from $name - * @param string $file file which is included by execute(). It is also constructed from $name by default - * @param bool $includable whether the page can be included in normal pages + * @param string $name Name of the special page, as seen in links and URLs + * @param string $restriction User right required, e.g. "block" or "delete" + * @param bool $listed Whether the page is listed in Special:Specialpages + * @param Callback|Bool $function Function called by execute(). By default + * it is constructed from $name + * @param string $file File which is included by execute(). It is also + * constructed from $name by default + * @param bool $includable Whether the page can be included in normal pages */ private function init( $name, $restriction, $listed, $function, $file, $includable ) { $this->mName = $name; @@ -749,7 +752,8 @@ class SpecialPage { if ( $this->mContext instanceof IContextSource ) { return $this->mContext; } else { - wfDebug( __METHOD__ . " called and \$mContext is null. Return RequestContext::getMain(); for sanity\n" ); + wfDebug( __METHOD__ . " called and \$mContext is null. " . + "Return RequestContext::getMain(); for sanity\n" ); return RequestContext::getMain(); } } @@ -956,7 +960,8 @@ abstract class FormSpecialPage extends SpecialPage { * Play with the HTMLForm if you need to more substantially * @param $form HTMLForm */ - protected function alterForm( HTMLForm $form ) {} + protected function alterForm( HTMLForm $form ) { + } /** * Get message prefix for HTMLForm @@ -1011,7 +1016,8 @@ abstract class FormSpecialPage extends SpecialPage { * confirmation message * @since 1.22 Default is to do nothing */ - public function onSuccess() {} + public function onSuccess() { + } /** * Basic SpecialPage workflow: get a form, send it to the user; get some data back, @@ -1174,6 +1180,7 @@ abstract class RedirectSpecialPage extends UnlistedSpecialPage { } abstract class SpecialRedirectToSpecial extends RedirectSpecialPage { + // @todo FIXME: Visibility must be declared var $redirName, $redirSubpage; function __construct( @@ -1250,7 +1257,7 @@ class SpecialCreateAccount extends SpecialRedirectToSpecial { * - limit, offset: Useful for linking to history of one's own user page or * user talk page. For example, this would be a link to "the last edit to your * user talk page in the year 2010": - * http://en.wikipedia.org/w/index.php?title=Special:MyPage&offset=20110000000000&limit=1&action=history + * http://en.wikipedia.org/wiki/Special:MyPage?offset=20110000000000&limit=1&action=history * * - feed: would allow linking to the current user's RSS feed for their user * talk page: -- 2.20.1