Ejegg has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/312069

Change subject: Fix typos and PHPdoc hints
......................................................................

Fix typos and PHPdoc hints

One functional thing - misplaced parens with count. Rest is just
casing and type hints.

Change-Id: I6c1a0eaa8fd16c7dd2db11db8278de6738678869
---
M CentralNoticePager.php
M special/SpecialCentralNotice.php
2 files changed, 17 insertions(+), 13 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/CentralNotice 
refs/changes/69/312069/1

diff --git a/CentralNoticePager.php b/CentralNoticePager.php
index ec11acf..a05ef7e 100644
--- a/CentralNoticePager.php
+++ b/CentralNoticePager.php
@@ -19,7 +19,7 @@
                // When the filter comes in it is space delimited, so break 
that...
                $likeArray = preg_split( '/\s/', $this->filter );
 
-               // ...and then insert all the wildcards betwean search terms
+               // ...and then insert all the wildcards between search terms
                if ( empty( $likeArray ) ) {
                        $likeArray = $dbr->anyString();
                } else {
diff --git a/special/SpecialCentralNotice.php b/special/SpecialCentralNotice.php
index 3f3c89e..cb65d6f 100644
--- a/special/SpecialCentralNotice.php
+++ b/special/SpecialCentralNotice.php
@@ -11,6 +11,9 @@
 
        public $editable, $centralNoticeError;
 
+       /**
+        * @var Campaign
+        */
        protected $campaign;
        protected $campaignWarnings = array();
 
@@ -73,7 +76,7 @@
 
                                // If there were no errors, reload the page to 
prevent duplicate form submission
                                if ( !$this->centralNoticeError ) {
-                                       $out->redirect( 
$this->getPageTitle()->getLocalUrl() );
+                                       $out->redirect( 
$this->getPageTitle()->getLocalURL() );
                                        return;
                                }
                        } else {
@@ -281,7 +284,7 @@
 
                        $options = ''; // The HTML for the select list options
                        foreach ( $priorities as $key => $label ) {
-                               $options .= XML::option( $label, $key, 
$priorityValue == $key );
+                               $options .= Xml::option( $label, $key, 
$priorityValue == $key );
                        }
 
                        // Data attributes set below (data-campaign-name and
@@ -495,7 +498,7 @@
                        $htmlOut .= Xml::openElement( 'form',
                                array(
                                        'method' => 'post',
-                                       'action' => 
$this->getPageTitle()->getLocalUrl( array(
+                                       'action' => 
$this->getPageTitle()->getLocalURL( array(
                                                'subaction' => 'noticeDetail',
                                                'notice' => $notice
                                        ) )
@@ -505,7 +508,7 @@
 
                $output_detail = $this->noticeDetailForm( $notice );
                $output_assigned = $this->assignedTemplatesForm( $notice );
-               $output_templates = $this->addTemplatesForm( $notice );
+               $output_templates = $this->addTemplatesForm();
 
                $htmlOut .= $output_detail;
 
@@ -761,7 +764,7 @@
 
                                // If there were no errors, reload the page to 
prevent duplicate form submission
                                if ( !$this->centralNoticeError ) {
-                                       $this->getOutput()->redirect( 
$this->getPageTitle()->getLocalUrl( array(
+                                       $this->getOutput()->redirect( 
$this->getPageTitle()->getLocalURL( array(
                                                'subaction' => 'noticeDetail',
                                                'notice' => $notice
                                        ) ) );
@@ -954,7 +957,7 @@
                        $htmlOut .= Xml::closeElement( 'table' );
 
                        // Create controls for campaign-associated mixins (if 
there are any)
-                       if ( count( $wgCentralNoticeCampaignMixins > 0 ) ) {
+                       if ( count( $wgCentralNoticeCampaignMixins ) > 0 ) {
 
                                $mixinsThisNotice = 
Campaign::getCampaignMixins( $notice );
 
@@ -1151,7 +1154,7 @@
 
                        $htmlOut .= Xml::closeElement( 'tr' );
                }
-               $htmlOut .= XMl::closeElement( 'table' );
+               $htmlOut .= Xml::closeElement( 'table' );
                $htmlOut .= Xml::closeElement( 'fieldset' );
 
                // Sneak in some extra processing, to detect errors in bucket 
assignment.
@@ -1249,8 +1252,9 @@
 
        /**
         * Create form for adding banners to a campaign
+        * @return string
         */
-       function addTemplatesForm( $notice ) {
+       function addTemplatesForm() {
                // Sanitize input on search key and split out terms
                $searchTerms = $this->sanitizeSearchTerms( 
$this->getRequest()->getText( 'tplsearchkey' ) );
 
@@ -1302,7 +1306,7 @@
         * @param $selected array The language codes of the selected languages
         * @param $customisedOnly bool If true only languages which have some 
content are listed
         *
-        * @return multiple select list
+        * @return string multiple select list
         */
        function languageMultiSelector( $selected = array(), $customisedOnly = 
true ) {
                global $wgLanguageCode;
@@ -1344,7 +1348,7 @@
         *
         * @param $selected array The name of the selected project type
         *
-        * @return multiple select list
+        * @return string multiple select list
         */
        function projectMultiSelector( $selected = array() ) {
                global $wgNoticeProjects;
@@ -1405,7 +1409,7 @@
                        );
        }
 
-       protected function getSummaryFromRequest( $request ) {
+       protected function getSummaryFromRequest( WebRequest $request ) {
                return static::truncateSummaryField( $request->getVal( 
'changeSummary' ) );
        }
 
@@ -1428,7 +1432,7 @@
         *
         * @param $selected array The country codes of the selected countries
         *
-        * @return multiple select list
+        * @return string multiple select list
         */
        function geoMultiSelector( $selected = array() ) {
                $userLanguageCode = $this->getLanguage()->getCode();

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6c1a0eaa8fd16c7dd2db11db8278de6738678869
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/CentralNotice
Gerrit-Branch: master
Gerrit-Owner: Ejegg <eeggles...@wikimedia.org>

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

Reply via email to