From 725d9d125d8d6ab44615dbfcb884d3830dadbb52 Mon Sep 17 00:00:00 2001 From: umherirrender Date: Tue, 8 Apr 2014 17:29:17 +0200 Subject: [PATCH] Removed unneeded spaces and colons in @param and friends Also swapped some "$var type" to "type $var" or added missing types before the $var. Changed some other types to match the more common spelling. Makes beginning of some text in captial. Change-Id: Ic36c8c7820a6c2d603f1138130670c6bf6a1ca59 --- includes/CategoryViewer.php | 8 +- includes/EditPage.php | 20 +- includes/Export.php | 25 +- includes/FileDeleteForm.php | 14 +- includes/Html.php | 30 +-- includes/HtmlFormatter.php | 24 +- includes/Linker.php | 247 +++++++++--------- includes/MimeMagic.php | 24 +- includes/OutputPage.php | 164 ++++++------ includes/Status.php | 16 +- includes/diff/DifferenceEngine.php | 2 +- includes/logging/LogPager.php | 2 +- includes/parser/Parser.php | 140 +++++----- includes/parser/ParserCache.php | 12 +- includes/parser/ParserOptions.php | 6 +- includes/specials/SpecialUserrights.php | 22 +- includes/specials/SpecialVersion.php | 28 +- includes/upload/UploadStash.php | 55 ++-- languages/LanguageConverter.php | 146 +++++------ languages/classes/LanguageSr.php | 6 +- .../includes/GlobalFunctions/GlobalTest.php | 10 +- .../includes/api/RandomImageGenerator.php | 30 +-- 22 files changed, 513 insertions(+), 518 deletions(-) diff --git a/includes/CategoryViewer.php b/includes/CategoryViewer.php index 183c5f25a4..7f213c352c 100644 --- a/includes/CategoryViewer.php +++ b/includes/CategoryViewer.php @@ -449,7 +449,7 @@ class CategoryViewer extends ContextSource { * of the output. * * @param string $type 'page', 'subcat', or 'file' - * @return String: HTML output, possibly empty if there are no other pages + * @return string HTML output, possibly empty if there are no other pages */ private function getSectionPagingLinks( $type ) { if ( isset( $this->until[$type] ) && $this->until[$type] !== null ) { @@ -628,8 +628,8 @@ class CategoryViewer extends ContextSource { * Takes a title, and adds the fragment identifier that * corresponds to the correct segment of the category. * - * @param Title $title: The title (usually $this->title) - * @param string $section: Which section + * @param Title $title The title (usually $this->title) + * @param string $section Which section * @throws MWException * @return Title */ @@ -661,7 +661,7 @@ class CategoryViewer extends ContextSource { * @param int $rescnt The number of items returned by our database query. * @param int $dbcnt The number of items according to the category table. * @param string $type 'subcat', 'article', or 'file' - * @return string: A message giving the number of items, to output to HTML. + * @return string A message giving the number of items, to output to HTML. */ private function getCountMessage( $rescnt, $dbcnt, $type ) { // There are three cases: diff --git a/includes/EditPage.php b/includes/EditPage.php index 9b9e389676..61995f2aa1 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1344,8 +1344,8 @@ class EditPage { * Run hooks that can filter edits just before they get saved. * * @param Content $content the Content to filter. - * @param Status $status for reporting the outcome to the caller - * @param User $user the user performing the edit + * @param Status $status For reporting the outcome to the caller + * @param User $user The user performing the edit * * @return bool */ @@ -2606,11 +2606,11 @@ class EditPage { } /** - * @param $isSubjectPreview Boolean: true if this is the section subject/title - * up top, or false if this is the comment summary - * down below the textarea + * @param bool $isSubjectPreview true if this is the section subject/title + * up top, or false if this is the comment summary + * down below the textarea * @param string $summary The text of the summary to display - * @return String + * @return string */ protected function showSummaryInput( $isSubjectPreview, $summary = "" ) { global $wgOut, $wgContLang; @@ -2632,11 +2632,11 @@ class EditPage { } /** - * @param $isSubjectPreview Boolean: true if this is the section subject/title - * up top, or false if this is the comment summary - * down below the textarea + * @param bool $isSubjectPreview true if this is the section subject/title + * up top, or false if this is the comment summary + * down below the textarea * @param string $summary the text of the summary to display - * @return String + * @return string */ protected function getSummaryPreview( $isSubjectPreview, $summary = "" ) { // avoid spaces in preview, gets always trimmed on save diff --git a/includes/Export.php b/includes/Export.php index 4c0eb30d47..2844a06e5f 100644 --- a/includes/Export.php +++ b/includes/Export.php @@ -73,15 +73,14 @@ class WikiExporter { * make additional queries to pull source data while the * main query is still running. * - * @param $db DatabaseBase - * @param $history Mixed: one of WikiExporter::FULL, WikiExporter::CURRENT, - * WikiExporter::RANGE or WikiExporter::STABLE, - * or an associative array: - * offset: non-inclusive offset at which to start the query - * limit: maximum number of rows to return - * dir: "asc" or "desc" timestamp order - * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM - * @param int $text one of WikiExporter::TEXT or WikiExporter::STUB + * @param DatabaseBase $db + * @param int|array $history One of WikiExporter::FULL, WikiExporter::CURRENT, + * WikiExporter::RANGE or WikiExporter::STABLE, or an associative array: + * - offset: non-inclusive offset at which to start the query + * - limit: maximum number of rows to return + * - dir: "asc" or "desc" timestamp order + * @param int $buffer One of WikiExporter::BUFFER or WikiExporter::STREAM + * @param int $text One of WikiExporter::TEXT or WikiExporter::STUB */ function __construct( $db, $history = WikiExporter::CURRENT, $buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) { @@ -127,8 +126,8 @@ class WikiExporter { * Dumps a series of page and revision records for those pages * in the database falling within the page_id range given. * @param int $start inclusive lower limit (this id is included) - * @param $end Int: Exclusive upper limit (this id is not included) - * If 0, no upper limit. + * @param int $end Exclusive upper limit (this id is not included) + * If 0, no upper limit. */ public function pagesByRange( $start, $end ) { $condition = 'page_id >= ' . intval( $start ); @@ -142,8 +141,8 @@ class WikiExporter { * Dumps a series of page and revision records for those pages * in the database with revisions falling within the rev_id range given. * @param int $start inclusive lower limit (this id is included) - * @param $end Int: Exclusive upper limit (this id is not included) - * If 0, no upper limit. + * @param int $end Exclusive upper limit (this id is not included) + * If 0, no upper limit. */ public function revsByRange( $start, $end ) { $condition = 'rev_id >= ' . intval( $start ); diff --git a/includes/FileDeleteForm.php b/includes/FileDeleteForm.php index 65d82b8782..444d26f34a 100644 --- a/includes/FileDeleteForm.php +++ b/includes/FileDeleteForm.php @@ -48,7 +48,7 @@ class FileDeleteForm { /** * Constructor * - * @param $file File object we're deleting + * @param File $file File object we're deleting */ public function __construct( $file ) { $this->title = $file->getTitle(); @@ -132,12 +132,12 @@ class FileDeleteForm { /** * Really delete the file * - * @param $title Title object - * @param File $file: file object - * @param string $oldimage archive name - * @param string $reason reason of the deletion - * @param $suppress Boolean: whether to mark all deleted versions as restricted - * @param $user User object performing the request + * @param Title $title + * @param File $file + * @param string $oldimage Archive name + * @param string $reason Reason of the deletion + * @param bool $suppress Whether to mark all deleted versions as restricted + * @param User $user User object performing the request * @throws MWException * @return bool|Status */ diff --git a/includes/Html.php b/includes/Html.php index c4fc29ade6..b1d4f001af 100644 --- a/includes/Html.php +++ b/includes/Html.php @@ -635,10 +635,10 @@ class Html { * Convenience function to produce an "" element. This supports the * new HTML5 input types and attributes. * - * @param $name string name attribute - * @param $value mixed value attribute - * @param $type string type attribute - * @param array $attribs Associative array of miscellaneous extra + * @param string $name Name attribute + * @param array $value Value attribute + * @param string $type Type attribute + * @param array $attribs Associative array of miscellaneous extra * attributes, passed to Html::element() * @return string Raw HTML */ @@ -653,9 +653,9 @@ class Html { /** * Convenience function to produce an input element with type=hidden * - * @param $name string name attribute - * @param $value string value attribute - * @param array $attribs Associative array of miscellaneous extra + * @param string $name Name attribute + * @param string $value Value attribute + * @param array $attribs Associative array of miscellaneous extra * attributes, passed to Html::element() * @return string Raw HTML */ @@ -669,9 +669,9 @@ class Html { * This supports leaving out the cols= and rows= which Xml requires and are * required by HTML4/XHTML but not required by HTML5. * - * @param $name string name attribute - * @param $value string value attribute - * @param array $attribs Associative array of miscellaneous extra + * @param string $name Name attribute + * @param string $value Value attribute + * @param array $attribs Associative array of miscellaneous extra * attributes, passed to Html::element() * @return string Raw HTML */ @@ -693,7 +693,7 @@ class Html { /** * Build a drop-down box for selecting a namespace * - * @param $params array: + * @param array $params Params to set. * - selected: [optional] Id of namespace which should be pre-selected * - all: [optional] Value of item for "all namespaces". If null or unset, no "