From b4ecf374fe5fe4939d08c91f7de922c3ee33373c Mon Sep 17 00:00:00 2001 From: Alangi Derick Date: Sun, 21 Oct 2018 12:38:39 +0100 Subject: [PATCH] Fix PHPDoc type for instance variables and methods Should be "string" not "String" and "array" not "Array" in @param, @return and @var use cases. Also, minor typo fixes. Change-Id: I9d5ebc5b741c6560907b95f7c0c4039da2861f4a --- includes/MediaWiki.php | 2 +- includes/OutputPage.php | 4 ++-- includes/api/ApiParse.php | 2 +- includes/cache/BacklinkCache.php | 2 +- includes/htmlform/fields/HTMLFormFieldWithButton.php | 4 ++-- includes/libs/JavaScriptMinifier.php | 2 +- includes/media/MediaHandler.php | 4 ++-- includes/resourceloader/ResourceLoader.php | 2 +- includes/specialpage/ChangesListSpecialPage.php | 2 +- includes/specials/SpecialGoToInterwiki.php | 2 +- includes/specials/SpecialMediaStatistics.php | 6 +++--- includes/specials/SpecialUserrights.php | 2 +- 12 files changed, 17 insertions(+), 17 deletions(-) diff --git a/includes/MediaWiki.php b/includes/MediaWiki.php index bc576374d6..12b6638070 100644 --- a/includes/MediaWiki.php +++ b/includes/MediaWiki.php @@ -43,7 +43,7 @@ class MediaWiki { private $config; /** - * @var String Cache what action this request is + * @var string Cache what action this request is */ private $action; diff --git a/includes/OutputPage.php b/includes/OutputPage.php index 0cff57818a..4e46ff2400 100644 --- a/includes/OutputPage.php +++ b/includes/OutputPage.php @@ -4110,8 +4110,8 @@ class OutputPage extends ContextSource { * Helper function to setup the PHP implementation of OOUI to use in this request. * * @since 1.26 - * @param String $skinName The Skin name to determine the correct OOUI theme - * @param String $dir Language direction + * @param string $skinName The Skin name to determine the correct OOUI theme + * @param string $dir Language direction */ public static function setupOOUI( $skinName = 'default', $dir = 'ltr' ) { $themes = ResourceLoaderOOUIModule::getSkinThemeMap(); diff --git a/includes/api/ApiParse.php b/includes/api/ApiParse.php index a78cb7f5ad..148ac67626 100644 --- a/includes/api/ApiParse.php +++ b/includes/api/ApiParse.php @@ -625,7 +625,7 @@ class ApiParse extends ApiBase { * This mimicks the behavior of EditPage in formatting a summary * * @param Title $title of the page being parsed - * @param Array $params the API parameters of the request + * @param array $params The API parameters of the request * @return Content|bool */ private function formatSummary( $title, $params ) { diff --git a/includes/cache/BacklinkCache.php b/includes/cache/BacklinkCache.php index 48809d07e0..14072717d7 100644 --- a/includes/cache/BacklinkCache.php +++ b/includes/cache/BacklinkCache.php @@ -567,7 +567,7 @@ class BacklinkCache { /** * Returns check key for the backlinks cache for a particular title * - * @return String + * @return string */ private function makeCheckKey() { return $this->wanCache->makeKey( diff --git a/includes/htmlform/fields/HTMLFormFieldWithButton.php b/includes/htmlform/fields/HTMLFormFieldWithButton.php index 716a0920f3..03e479bd92 100644 --- a/includes/htmlform/fields/HTMLFormFieldWithButton.php +++ b/includes/htmlform/fields/HTMLFormFieldWithButton.php @@ -66,8 +66,8 @@ class HTMLFormFieldWithButton extends HTMLFormField { /** * Combines the passed element with a button. - * @param String $element Element to combine the button with. - * @return String + * @param string $element Element to combine the button with. + * @return string */ public function getElement( $element ) { return $element . "\u{00A0}" . $this->getInputHTML( '' ); diff --git a/includes/libs/JavaScriptMinifier.php b/includes/libs/JavaScriptMinifier.php index 73f3e70739..f67387b323 100644 --- a/includes/libs/JavaScriptMinifier.php +++ b/includes/libs/JavaScriptMinifier.php @@ -92,7 +92,7 @@ class JavaScriptMinifier { * Returns minified JavaScript code. * * @param string $s JavaScript code to minify - * @return String Minified code + * @return string Minified code */ public static function minify( $s ) { // First we declare a few tables that contain our parsing rules diff --git a/includes/media/MediaHandler.php b/includes/media/MediaHandler.php index 71db975380..66a4291286 100644 --- a/includes/media/MediaHandler.php +++ b/includes/media/MediaHandler.php @@ -874,8 +874,8 @@ abstract class MediaHandler { /** * Converts a dimensions array about a potentially multipage document from an * exhaustive list of ordered page numbers to a list of page ranges - * @param Array $pagesByDimensions - * @return String + * @param array $pagesByDimensions + * @return string * @since 1.30 */ public static function getPageRangesByDimensions( $pagesByDimensions ) { diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index e2b60fc672..3c2f15a5a8 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -1364,7 +1364,7 @@ MESSAGE; * - new XmlJsCode( '{}' ) * - new stdClass() // (object) [] * - * @param Array $array + * @param array $array */ private static function trimArray( array &$array ) { $i = count( $array ); diff --git a/includes/specialpage/ChangesListSpecialPage.php b/includes/specialpage/ChangesListSpecialPage.php index 8ae4649e02..ab3025bb08 100644 --- a/includes/specialpage/ChangesListSpecialPage.php +++ b/includes/specialpage/ChangesListSpecialPage.php @@ -836,7 +836,7 @@ abstract class ChangesListSpecialPage extends SpecialPage { /** * Fetch the change tags list for the front end * - * @return Array Tag data + * @return array Tag data */ protected function getChangeTagList() { $cache = ObjectCache::getMainWANInstance(); diff --git a/includes/specials/SpecialGoToInterwiki.php b/includes/specials/SpecialGoToInterwiki.php index 809a14aac3..22a761262f 100644 --- a/includes/specials/SpecialGoToInterwiki.php +++ b/includes/specials/SpecialGoToInterwiki.php @@ -71,7 +71,7 @@ class SpecialGoToInterwiki extends UnlistedSpecialPage { } /** - * @return String + * @return string */ protected function getGroupName() { return 'redirects'; diff --git a/includes/specials/SpecialMediaStatistics.php b/includes/specials/SpecialMediaStatistics.php index 6dbc09bae0..1c19015b83 100644 --- a/includes/specials/SpecialMediaStatistics.php +++ b/includes/specials/SpecialMediaStatistics.php @@ -102,7 +102,7 @@ class MediaStatisticsPage extends QueryPage { * * It's important that img_media_type come first, otherwise the * tables will be fragmented. - * @return Array Fields to sort by + * @return array Fields to sort by */ function getOrderFields() { return [ 'img_media_type', 'count(*)', 'img_major_mime', 'img_minor_mime' ]; @@ -214,7 +214,7 @@ class MediaStatisticsPage extends QueryPage { /** * @param float $decimal A decimal percentage (ie for 12.3%, this would be 0.123) - * @return String The percentage formatted so that 3 significant digits are shown. + * @return string The percentage formatted so that 3 significant digits are shown. */ protected function makePercentPretty( $decimal ) { $decimal *= 100; @@ -275,7 +275,7 @@ class MediaStatisticsPage extends QueryPage { /** * Get (not output) the header row for the table * - * @return String the header row of the able + * @return string The header row of the table */ protected function getTableHeaderRow() { $headers = [ 'mimetype', 'extensions', 'count', 'totalbytes' ]; diff --git a/includes/specials/SpecialUserrights.php b/includes/specials/SpecialUserrights.php index 42051886f7..14877c6a77 100644 --- a/includes/specials/SpecialUserrights.php +++ b/includes/specials/SpecialUserrights.php @@ -767,7 +767,7 @@ class UserrightsPage extends SpecialPage { * @param UserGroupMembership[] $usergroups Associative array of (group name as string => * UserGroupMembership object) for groups the user belongs to * @param User $user - * @return Array with 2 elements: the XHTML table element with checkxboes, and + * @return array Array with 2 elements: the XHTML table element with checkxboes, and * whether any groups are changeable */ private function groupCheckboxes( $usergroups, $user ) { -- 2.20.1