jenkins-bot has submitted this change and it was merged.

Change subject: Update/fix PHPDoc
......................................................................


Update/fix PHPDoc

Also initilise two possibly undefined veriables ($cl/$dl) and
add a type hint.

Change-Id: I24d4f13fa03caf7861646837f185df4f1e077c6e
---
M includes/specials/SpecialRecentchanges.php
1 file changed, 36 insertions(+), 32 deletions(-)

Approvals:
  IAlex: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/specials/SpecialRecentchanges.php 
b/includes/specials/SpecialRecentchanges.php
index 008678f..d9145b8 100644
--- a/includes/specials/SpecialRecentchanges.php
+++ b/includes/specials/SpecialRecentchanges.php
@@ -66,7 +66,7 @@
        /**
         * Create a FormOptions object with options as specified by the user
         *
-        * @param $parameters array
+        * @param array $parameters
         *
         * @return FormOptions
         */
@@ -91,7 +91,7 @@
        /**
         * Get custom show/hide filters
         *
-        * @return Array Map of filter URL param names to properties 
(msg/default)
+        * @return array Map of filter URL param names to properties 
(msg/default)
         */
        protected function getCustomFilters() {
                if ( $this->customFilters === null ) {
@@ -132,7 +132,7 @@
        /**
         * Main execution point
         *
-        * @param $subpage String
+        * @param string $subpage
         */
        public function execute( $subpage ) {
                $this->rcSubpage = $subpage;
@@ -172,6 +172,7 @@
                }
                if( $feedFormat ) {
                        list( $changesFeed, $formatter ) = 
$this->getFeedObject( $feedFormat );
+                       /** @var ChangesFeed $changesFeed */
                        $changesFeed->execute( $formatter, $rows, $lastmod, 
$opts );
                } else {
                        $this->webOutput( $rows, $opts );
@@ -183,7 +184,8 @@
        /**
         * Return an array with a ChangesFeed object and ChannelFeed object
         *
-        * @return Array
+        * @param string $feedFormat Feed's format (either 'rss' or 'atom')
+        * @return array
         */
        public function getFeedObject( $feedFormat ) {
                $changesFeed = new ChangesFeed( $feedFormat, 'rcfeed' );
@@ -199,8 +201,8 @@
         * Process $par and put options found if $opts
         * Mainly used when including the page
         *
-        * @param $par String
-        * @param $opts FormOptions
+        * @param string $par
+        * @param FormOptions $opts
         */
        public function parseParameters( $par, FormOptions $opts ) {
                $bits = preg_split( '/\s*,\s*/', trim( $par ) );
@@ -252,8 +254,8 @@
         * Don't use this if we are using the patrol feature, patrol changes 
don't
         * update the timestamp
         *
-        * @param $feedFormat String
-        * @return String or false
+        * @param string $feedFormat
+        * @return string|bool
         */
        public function checkLastModified( $feedFormat ) {
                $dbr = wfGetDB( DB_SLAVE );
@@ -270,7 +272,7 @@
        /**
         * Return an array of conditions depending of options set in $opts
         *
-        * @param $opts FormOptions
+        * @param FormOptions $opts
         * @return array
         */
        public function buildMainQueryConds( FormOptions $opts ) {
@@ -362,9 +364,9 @@
        /**
         * Process the query
         *
-        * @param $conds Array
-        * @param $opts FormOptions
-        * @return bool|ResultWrapper result or false (for Recentchangeslinked 
only)
+        * @param array $conds
+        * @param FormOptions $opts
+        * @return bool|ResultWrapper Result or false (for Recentchangeslinked 
only)
         */
        public function doMainQuery( $conds, $opts ) {
                $tables = array( 'recentchanges' );
@@ -468,8 +470,8 @@
        /**
         * Send output to the OutputPage object, only called if not used feeds
         *
-        * @param array $rows of database rows
-        * @param $opts FormOptions
+        * @param array $rows Database rows
+        * @param FormOptions $opts
         */
        public function webOutput( $rows, $opts ) {
                global $wgRCShowWatchingUsers, $wgShowUpdatedMarker, 
$wgAllowCategorizedRecentChanges;
@@ -567,8 +569,8 @@
        /**
         * Return the text to be displayed above the changes
         *
-        * @param $opts FormOptions
-        * @return String: XHTML
+        * @param FormOptions $opts
+        * @return string XHTML
         */
        public function doHeader( $opts ) {
                global $wgScript;
@@ -629,8 +631,8 @@
        /**
         * Get options to be displayed in a form
         *
-        * @param $opts FormOptions
-        * @return Array
+        * @param FormOptions $opts
+        * @return array
         */
        function getExtraOptions( $opts ) {
                $extraOpts = array();
@@ -653,7 +655,7 @@
        /**
         * Send the text to be displayed above the options
         *
-        * @param $opts FormOptions
+        * @param FormOptions $opts Unused
         */
        function setTopText( FormOptions $opts ) {
                global $wgContLang;
@@ -675,7 +677,7 @@
         * Send the text to be displayed after the options, for use in
         * Recentchangeslinked
         *
-        * @param $opts FormOptions
+        * @param FormOptions $opts
         */
        function setBottomText( FormOptions $opts ) {}
 
@@ -683,8 +685,8 @@
         * Creates the choose namespace selection
         *
         * @todo Uses radio buttons (HASHAR)
-        * @param $opts FormOptions
-        * @return String
+        * @param FormOptions $opts
+        * @return string
         */
        protected function namespaceFilterForm( FormOptions $opts ) {
                $nsSelect = Html::namespaceSelector(
@@ -708,8 +710,8 @@
        /**
         * Create a input to filter changes by categories
         *
-        * @param $opts FormOptions
-        * @return Array
+        * @param FormOptions $opts
+        * @return array
         */
        protected function categoryFilterForm( FormOptions $opts ) {
                list( $label, $input ) = Xml::inputLabelSep( $this->msg( 
'rc_categories' )->text(),
@@ -724,8 +726,8 @@
        /**
         * Filter $rows by categories set in $opts
         *
-        * @param array $rows of database rows
-        * @param $opts FormOptions
+        * @param array $rows Database rows
+        * @param FormOptions $opts
         */
        function filterByCategories( &$rows, FormOptions $opts ) {
                $categories = array_map( 'trim', explode( '|', 
$opts['categories'] ) );
@@ -788,10 +790,10 @@
        /**
         * Makes change an option link which carries all the other options
         *
-        * @param $title Title
-        * @param array $override options to override
-        * @param array $options current options
-        * @param $active Boolean: whether to show the link in bold
+        * @param string $title Title
+        * @param array $override Options to override
+        * @param array $options Current options
+        * @param bool $active Whether to show the link in bold
         * @return string
         */
        function makeOptionsLink( $title, $override, $options, $active = false 
) {
@@ -816,8 +818,8 @@
        /**
         * Creates the options panel.
         *
-        * @param $defaults Array
-        * @param $nondefaults Array
+        * @param array $defaults
+        * @param array $nondefaults
         * @return string
         */
        function optionsPanel( $defaults, $nondefaults ) {
@@ -849,6 +851,7 @@
                $wgRCLinkDays = array_unique( $wgRCLinkDays );
 
                // limit links
+               $cl = array();
                foreach( $wgRCLinkLimits as $value ) {
                        $cl[] = $this->makeOptionsLink( $lang->formatNum( 
$value ),
                                array( 'limit' => $value ), $nondefaults, 
$value == $options['limit'] );
@@ -856,6 +859,7 @@
                $cl = $lang->pipeList( $cl );
 
                // day links, reset 'from' to none
+               $dl = array();
                foreach( $wgRCLinkDays as $value ) {
                        $dl[] = $this->makeOptionsLink( $lang->formatNum( 
$value ),
                                array( 'days' => $value, 'from' => '' ), 
$nondefaults, $value == $options['days'] );

-- 
To view, visit https://gerrit.wikimedia.org/r/57001
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I24d4f13fa03caf7861646837f185df4f1e077c6e
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <siebr...@wikimedia.org>
Gerrit-Reviewer: Hoo man <h...@online.de>
Gerrit-Reviewer: IAlex <coderev...@emsenhuber.ch>
Gerrit-Reviewer: Reedy <re...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to