r67053 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r67052‎ | r67053 | r67054 >
Date:19:54, 29 May 2010
Author:ialex
Status:ok
Tags:
Comment:
Fixed some doxygen warnings
Modified paths:
  • /trunk/phase3/maintenance/generateSitemap.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/generateSitemap.php
@@ -221,11 +221,9 @@
222222 /**
223223 * Get the priority of a given namespace
224224 *
225 - * @param int $namespace The namespace to get the priority for
226 - +
227 - * @return string
 225+ * @param $namespace Integer: the namespace to get the priority for
 226+ * @return String
228227 */
229 -
230228 function priority( $namespace ) {
231229 return isset( $this->priorities[$namespace] ) ? $this->priorities[$namespace] : $this->guessPriority( $namespace );
232230 }
@@ -235,9 +233,8 @@
236234 * default priority for the namespace, varies depending on whether it's
237235 * a talkpage or not.
238236 *
239 - * @param int $namespace The namespace to get the priority for
240 - *
241 - * @return string
 237+ * @param $namespace Integer: the namespace to get the priority for
 238+ * @return String
242239 */
243240 function guessPriority( $namespace ) {
244241 return MWNamespace::isMain( $namespace ) ? $this->priorities[GS_MAIN] : $this->priorities[GS_TALK];
@@ -246,9 +243,8 @@
247244 /**
248245 * Return a database resolution of all the pages in a given namespace
249246 *
250 - * @param int $namespace Limit the query to this namespace
251 - *
252 - * @return resource
 247+ * @param $namespace Integer: limit the query to this namespace
 248+ * @return Resource
253249 */
254250 function getPageRes( $namespace ) {
255251 return $this->dbr->select( 'page',
@@ -264,10 +260,8 @@
265261
266262 /**
267263 * Main loop
268 - *
269 - * @access public
270264 */
271 - function main() {
 265+ public function main() {
272266 global $wgContLang;
273267
274268 fwrite( $this->findex, $this->openIndex() );
@@ -323,7 +317,7 @@
324318 /**
325319 * gzopen() / fopen() wrapper
326320 *
327 - * @return resource
 321+ * @return Resource
328322 */
329323 function open( $file, $flags ) {
330324 return $this->compress ? gzopen( $file, $flags ) : fopen( $file, $flags );
@@ -352,12 +346,9 @@
353347 /**
354348 * Get a sitemap filename
355349 *
356 - * @static
357 - *
358 - * @param int $namespace The namespace
359 - * @param int $count The count
360 - *
361 - * @return string
 350+ * @param $namespace Integer: the namespace
 351+ * @param $count Integer: the count
 352+ * @return String
362353 */
363354 function sitemapFilename( $namespace, $count ) {
364355 $ext = $this->compress ? '.gz' : '';
@@ -367,8 +358,6 @@
368359 /**
369360 * Return the XML required to open an XML file
370361 *
371 - * @static
372 - *
373362 * @return string
374363 */
375364 function xmlHead() {
@@ -378,9 +367,7 @@
379368 /**
380369 * Return the XML schema being used
381370 *
382 - * @static
383 - *
384 - * @returns string
 371+ * @return String
385372 */
386373 function xmlSchema() {
387374 return 'http://www.sitemaps.org/schemas/sitemap/0.9';
@@ -389,7 +376,7 @@
390377 /**
391378 * Return the XML required to open a sitemap index file
392379 *
393 - * @return string
 380+ * @return String
394381 */
395382 function openIndex() {
396383 return $this->xmlHead() . '<sitemapindex xmlns="' . $this->xmlSchema() . '">' . "\n";
@@ -398,11 +385,8 @@
399386 /**
400387 * Return the XML for a single sitemap indexfile entry
401388 *
402 - * @static
403 - *
404 - * @param string $filename The filename of the sitemap file
405 - *
406 - * @return string
 389+ * @param $filename String: the filename of the sitemap file
 390+ * @return String
407391 */
408392 function indexEntry( $filename ) {
409393 return
@@ -415,9 +399,7 @@
416400 /**
417401 * Return the XML required to close a sitemap index file
418402 *
419 - * @static
420 - *
421 - * @return string
 403+ * @return String
422404 */
423405 function closeIndex() {
424406 return "</sitemapindex>\n";
@@ -426,7 +408,7 @@
427409 /**
428410 * Return the XML required to open a sitemap file
429411 *
430 - * @return string
 412+ * @return String
431413 */
432414 function openFile() {
433415 return $this->xmlHead() . '<urlset xmlns="' . $this->xmlSchema() . '">' . "\n";
@@ -435,13 +417,10 @@
436418 /**
437419 * Return the XML for a single sitemap entry
438420 *
439 - * @static
440 - *
441 - * @param string $url An RFC 2396 compliant URL
442 - * @param string $date A ISO 8601 date
443 - * @param string $priority A priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize
444 - *
445 - * @return string
 421+ * @param $url String: an RFC 2396 compliant URL
 422+ * @param $date String: a ISO 8601 date
 423+ * @param $priority String: a priority indicator, 0.0 - 1.0 inclusive with a 0.1 stepsize
 424+ * @return String
446425 */
447426 function fileEntry( $url, $date, $priority ) {
448427 return
@@ -455,8 +434,7 @@
456435 /**
457436 * Return the XML required to close sitemap file
458437 *
459 - * @static
460 - * @return string
 438+ * @return String
461439 */
462440 function closeFile() {
463441 return "</urlset>\n";

Status & tagging log