From 047c86f26e29069979d80cb1f3a65d68c5a9df7f Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 15 Mar 2014 20:57:00 +0100 Subject: [PATCH] Fix spacing between two functions Added and removed some new lines to have one new line between two functions Change-Id: I1ccfbd575dd26b160396ef3d3e2e079f5cdbe196 --- includes/Html.php | 1 + includes/Pager.php | 1 + includes/Sanitizer.php | 1 + includes/Skin.php | 1 + includes/parser/Parser.php | 2 ++ includes/parser/Preprocessor_Hash.php | 1 + includes/resourceloader/ResourceLoaderStartUpModule.php | 1 - includes/revisiondelete/RevisionDelete.php | 1 + includes/search/SearchEngine.php | 7 +++++++ includes/search/SearchOracle.php | 1 + includes/search/SearchPostgres.php | 1 + includes/specialpage/SpecialPage.php | 2 ++ includes/specials/SpecialStatistics.php | 1 + includes/specials/SpecialUpload.php | 1 + maintenance/benchmarks/bench_strtr_str_replace.php | 1 - 15 files changed, 21 insertions(+), 2 deletions(-) diff --git a/includes/Html.php b/includes/Html.php index 0eb6474be6..c4fc29ade6 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -689,6 +689,7 @@ class Html { } return self::element( 'textarea', $attribs, $spacedValue ); } + /** * Build a drop-down box for selecting a namespace * diff --git a/includes/Pager.php b/includes/Pager.php index 6a10e887fe..747d2c1beb 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -249,6 +249,7 @@ abstract class IndexPager extends ContextSource implements Pager { function setOffset( $offset ) { $this->mOffset = $offset; } + /** * Set the limit from an other source than the request * diff --git a/includes/Sanitizer.php b/includes/Sanitizer.php index 53bb8fbd97..dd87b06c3b 100644 --- a/includes/Sanitizer.php +++ b/includes/Sanitizer.php @@ -1302,6 +1302,7 @@ class Sanitizer { array( 'Sanitizer', 'normalizeCharReferencesCallback' ), $text ); } + /** * @param string $matches * @return string diff --git a/includes/Skin.php b/includes/Skin.php index 5fa01ae954..9312a0ddff 100644 --- a/includes/Skin.php +++ b/includes/Skin.php @@ -1249,6 +1249,7 @@ abstract class Skin extends ContextSource { wfProfileOut( __METHOD__ ); return $bar; } + /** * Add content from a sidebar system message * Currently only used for MediaWiki:Sidebar (but may be used by Extensions) diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php index e3d7fdf890..915bebaf52 100644 --- a/includes/parser/Parser.php +++ b/includes/parser/Parser.php @@ -1684,6 +1684,7 @@ class Parser { wfProfileOut( __METHOD__ ); return $s; } + /** * Get the rel attribute for a particular external link. * @@ -1703,6 +1704,7 @@ class Parser { } return null; } + /** * Get an associative array of additional HTML attributes appropriate for a * particular external link. This currently may include rel => nofollow diff --git a/includes/parser/Preprocessor_Hash.php b/includes/parser/Preprocessor_Hash.php index 53e79d41db..deaf2882bd 100644 --- a/includes/parser/Preprocessor_Hash.php +++ b/includes/parser/Preprocessor_Hash.php @@ -1385,6 +1385,7 @@ class PPTemplateFrame_Hash extends PPFrame_Hash { $s .= '}'; return $s; } + /** * Returns true if there are no arguments in this frame * diff --git a/includes/resourceloader/ResourceLoaderStartUpModule.php b/includes/resourceloader/ResourceLoaderStartUpModule.php index 9ae7795560..64fafd70be 100644 --- a/includes/resourceloader/ResourceLoaderStartUpModule.php +++ b/includes/resourceloader/ResourceLoaderStartUpModule.php @@ -221,7 +221,6 @@ class ResourceLoaderStartUpModule extends ResourceLoaderModule { return wfAppendQuery( wfScript( 'load' ), $query ); } - /** * @param $context ResourceLoaderContext * @return string diff --git a/includes/revisiondelete/RevisionDelete.php b/includes/revisiondelete/RevisionDelete.php index 0509008034..7992882e94 100644 --- a/includes/revisiondelete/RevisionDelete.php +++ b/includes/revisiondelete/RevisionDelete.php @@ -687,6 +687,7 @@ class RevDel_FileItem extends RevDel_Item { } return '' . $link . ''; } + /** * Generate a user tool link cluster if the current user is allowed to view it * @return string HTML diff --git a/includes/search/SearchEngine.php b/includes/search/SearchEngine.php index eea723beab..45d0044d7e 100644 --- a/includes/search/SearchEngine.php +++ b/includes/search/SearchEngine.php @@ -439,6 +439,7 @@ class SearchEngine { $lc = $this->legalSearchChars(); return trim( preg_replace( "/[^{$lc}]/", " ", $text ) ); } + /** * Load up the appropriate search engine class for the currently * active database backend, and return a configured instance. @@ -775,6 +776,7 @@ class SearchResult { $result->initFromTitle( $title ); return $result; } + /** * Return a new SearchResult and initializes it with a row. * @@ -986,23 +988,28 @@ class SearchResult { return false; } } + /** * A SearchResultSet wrapper for SearchEngine::getNearMatch */ class SearchNearMatchResultSet extends SearchResultSet { private $fetched = false; + /** * @param $match mixed Title if matched, else null */ public function __construct( $match ) { $this->result = $match; } + public function hasResult() { return (bool)$this->result; } + public function numRows() { return $this->hasResults() ? 1 : 0; } + public function next() { if ( $this->fetched || !$this->result ) { return false; diff --git a/includes/search/SearchOracle.php b/includes/search/SearchOracle.php index 45321785da..2603161170 100644 --- a/includes/search/SearchOracle.php +++ b/includes/search/SearchOracle.php @@ -230,6 +230,7 @@ class SearchOracle extends SearchDatabase { $t = preg_replace( '/([-&|])/', '\\\\$1', $t ); return $t; } + /** * Create or update the search index record for the given page. * Title and text should be pre-processed. diff --git a/includes/search/SearchPostgres.php b/includes/search/SearchPostgres.php index 9dc1e771cf..dff6a72ff2 100644 --- a/includes/search/SearchPostgres.php +++ b/includes/search/SearchPostgres.php @@ -217,6 +217,7 @@ class PostgresSearchResult extends SearchResult { parent::__construct( $row ); $this->score = $row->score; } + function getScore() { return $this->score; } diff --git a/includes/specialpage/SpecialPage.php b/includes/specialpage/SpecialPage.php index e5ce48f0b4..91a2de2dd4 100644 --- a/includes/specialpage/SpecialPage.php +++ b/includes/specialpage/SpecialPage.php @@ -169,6 +169,7 @@ class SpecialPage { function isListed() { return $this->mListed; } + /** * Set whether this page is listed in Special:Specialpages, at run-time * @since 1.3 @@ -178,6 +179,7 @@ class SpecialPage { function setListed( $listed ) { return wfSetVar( $this->mListed, $listed ); } + /** * Get or set whether this special page is listed in Special:SpecialPages * @since 1.6 diff --git a/includes/specials/SpecialStatistics.php b/includes/specials/SpecialStatistics.php index f26d1a60f3..56f3f415cd 100644 --- a/includes/specials/SpecialStatistics.php +++ b/includes/specials/SpecialStatistics.php @@ -151,6 +151,7 @@ class SpecialStatistics extends SpecialPage { $this->getLanguage()->formatNum( $this->images ), array( 'class' => 'mw-statistics-files' ) ); } + private function getEditStats() { return Xml::openElement( 'tr' ) . Xml::tags( 'th', array( 'colspan' => '2' ), $this->msg( 'statistics-header-edits' )->parse() ) . diff --git a/includes/specials/SpecialUpload.php b/includes/specials/SpecialUpload.php index 27ba78e101..35bbf0b58c 100644 --- a/includes/specials/SpecialUpload.php +++ b/includes/specials/SpecialUpload.php @@ -315,6 +315,7 @@ class SpecialUpload extends SpecialPage { $form->setSubmitText( $this->msg( 'upload-tryagain' )->escaped() ); $this->showUploadForm( $form ); } + /** * Stashes the upload, shows the main form, but adds a "continue anyway button". * Also checks whether there are actually warnings to display. diff --git a/maintenance/benchmarks/bench_strtr_str_replace.php b/maintenance/benchmarks/bench_strtr_str_replace.php index bd21b186a3..76b5e3ca9c 100644 --- a/maintenance/benchmarks/bench_strtr_str_replace.php +++ b/maintenance/benchmarks/bench_strtr_str_replace.php @@ -63,7 +63,6 @@ class bench_strtr_str_replace extends Benchmarker { str_replace( "_", " ", "[[MediaWiki:Some_random_test_page]]"); } - function benchstrtr_indirect() { bfNormalizeTitleStrTr( "[[MediaWiki:Some_random_test_page]]" ); } -- 2.20.1