r110662 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r110661‎ | r110662 | r110663 >
Date:16:43, 3 February 2012
Author:reedy
Status:ok
Tags:
Comment:
Remove unused $parser = new Parser();

Couple of bits of code documentation
Modified paths:
  • /trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/FeaturedFeeds/FeaturedFeeds.body.php
@@ -133,6 +133,7 @@
134134 * Purges cache on message edit
135135 *
136136 * @param Article $article
 137+ * @return bool
137138 */
138139 public static function articleSaveComplete( $article ) {
139140 global $wgFeaturedFeeds, $wgMemc, $wgLanguageCode;
@@ -172,7 +173,6 @@
173174
174175 $feeds = array();
175176 $requestedLang = Language::factory( $langCode );
176 - $parser = new Parser();
177177 foreach ( $feedDefs as $name => $opts ) {
178178 $feed = new FeaturedFeedChannel( $name, $opts, $requestedLang );
179179 if ( !$feed->isOK() ) {
@@ -271,10 +271,17 @@
272272 }
273273 }
274274
 275+ /**
 276+ * @param $key string
 277+ * @return Message
 278+ */
275279 private function msg( $key ) {
276280 return wfMessage( $key )->inLanguage( $this->language );
277281 }
278282
 283+ /**
 284+ * @return bool
 285+ */
279286 public function isOK() {
280287 $this->init();
281288 return $this->page !== false;
@@ -312,6 +319,9 @@
313320 $this->entryName = $this->msg( $this->options['entryName'] )->plain();
314321 }
315322
 323+ /**
 324+ * @return array
 325+ */
316326 public function getFeedItems() {
317327 $this->init();
318328 if ( $this->items === false ) {
@@ -365,7 +375,7 @@
366376 /**
367377 * Returns a URL to the feed
368378 *
369 - * @param type $format: Feed format, 'rss' or 'atom'
 379+ * @param $format string Feed format, 'rss' or 'atom'
370380 * @return String
371381 */
372382 public function getURL( $format ) {

Status & tagging log