Fix PHPDoc type for instance variables and methods
authorAlangi Derick <alangiderick@gmail.com>
Sun, 21 Oct 2018 11:38:39 +0000 (12:38 +0100)
committerAlangi Derick <alangiderick@gmail.com>
Sun, 21 Oct 2018 12:00:25 +0000 (13:00 +0100)
Should be "string" not "String" and "array" not "Array" in
@param, @return and @var use cases. Also, minor typo fixes.

Change-Id: I9d5ebc5b741c6560907b95f7c0c4039da2861f4a

12 files changed:
includes/MediaWiki.php
includes/OutputPage.php
includes/api/ApiParse.php
includes/cache/BacklinkCache.php
includes/htmlform/fields/HTMLFormFieldWithButton.php
includes/libs/JavaScriptMinifier.php
includes/media/MediaHandler.php
includes/resourceloader/ResourceLoader.php
includes/specialpage/ChangesListSpecialPage.php
includes/specials/SpecialGoToInterwiki.php
includes/specials/SpecialMediaStatistics.php
includes/specials/SpecialUserrights.php

index bc57637..12b6638 100644 (file)
@@ -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;
 
index 0cff578..4e46ff2 100644 (file)
@@ -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();
index a78cb7f..148ac67 100644 (file)
@@ -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 ) {
index 48809d0..1407271 100644 (file)
@@ -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(
index 716a092..03e479b 100644 (file)
@@ -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( '' );
index 73f3e70..f67387b 100644 (file)
@@ -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
index 71db975..66a4291 100644 (file)
@@ -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 ) {
index e2b60fc..3c2f15a 100644 (file)
@@ -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 );
index 8ae4649..ab3025b 100644 (file)
@@ -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();
index 809a14a..22a7612 100644 (file)
@@ -71,7 +71,7 @@ class SpecialGoToInterwiki extends UnlistedSpecialPage {
        }
 
        /**
-        * @return String
+        * @return string
         */
        protected function getGroupName() {
                return 'redirects';
index 6dbc09b..1c19015 100644 (file)
@@ -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' ];
index 4205188..14877c6 100644 (file)
@@ -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 ) {