r62873 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62872‎ | r62873 | r62874 >
Date:12:30, 23 February 2010
Author:ashley
Status:ok
Tags:
Comment:
API: coding style cleanup, fix copyright symbol, more braces
Modified paths:
  • /trunk/phase3/includes/api/ApiFeedWatchlist.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatBase.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatDbg.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatJson.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatPhp.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatRaw.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatTxt.php (modified) (history)
  • /trunk/phase3/includes/api/ApiFormatWddx.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiFormatWddx.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Oct 22, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
 9+ * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -34,7 +34,7 @@
3535 class ApiFormatWddx extends ApiFormatBase {
3636
3737 public function __construct( $main, $format ) {
38 - parent :: __construct( $main, $format );
 38+ parent::__construct( $main, $format );
3939 }
4040
4141 public function getMimeType() {
@@ -53,8 +53,8 @@
5454 } else {
5555 // Don't do newlines and indentation if we weren't asked
5656 // for pretty output
57 - $nl = ( $this->getIsHtml() ? "" : "\n" );
58 - $indstr = " ";
 57+ $nl = ( $this->getIsHtml() ? '' : "\n" );
 58+ $indstr = ' ';
5959 $this->printText( "<?xml version=\"1.0\"?>$nl" );
6060 $this->printText( "<wddxPacket version=\"1.0\">$nl" );
6161 $this->printText( "$indstr<header/>$nl" );
@@ -69,11 +69,11 @@
7070 * Recursively go through the object and output its data in WDDX format.
7171 */
7272 function slowWddxPrinter( $elemValue, $indent = 0 ) {
73 - $indstr = ( $this->getIsHtml() ? "" : str_repeat( ' ', $indent ) );
74 - $indstr2 = ( $this->getIsHtml() ? "" : str_repeat( ' ', $indent + 2 ) );
75 - $nl = ( $this->getIsHtml() ? "" : "\n" );
 73+ $indstr = ( $this->getIsHtml() ? '' : str_repeat( ' ', $indent ) );
 74+ $indstr2 = ( $this->getIsHtml() ? '' : str_repeat( ' ', $indent + 2 ) );
 75+ $nl = ( $this->getIsHtml() ? '' : "\n" );
7676 switch ( gettype( $elemValue ) ) {
77 - case 'array' :
 77+ case 'array':
7878 // Check whether we've got an associative array (<struct>)
7979 // or a regular array (<array>)
8080 $cnt = count( $elemValue );
@@ -81,8 +81,9 @@
8282 // Regular array
8383 $this->printText( $indstr . Xml::element( 'array', array(
8484 'length' => $cnt ), null ) . $nl );
85 - foreach ( $elemValue as $subElemValue )
 85+ foreach ( $elemValue as $subElemValue ) {
8686 $this->slowWddxPrinter( $subElemValue, $indent + 2 );
 87+ }
8788 $this->printText( "$indstr</array>$nl" );
8889 } else {
8990 // Associative array (<struct>)
@@ -97,20 +98,20 @@
9899 $this->printText( "$indstr</struct>$nl" );
99100 }
100101 break;
101 - case 'integer' :
102 - case 'double' :
 102+ case 'integer':
 103+ case 'double':
103104 $this->printText( $indstr . Xml::element( 'number', null, $elemValue ) . $nl );
104105 break;
105 - case 'string' :
 106+ case 'string':
106107 $this->printText( $indstr . Xml::element( 'string', null, $elemValue ) . $nl );
107108 break;
108 - default :
109 - ApiBase :: dieDebug( __METHOD__, 'Unknown type ' . gettype( $elemValue ) );
 109+ default:
 110+ ApiBase::dieDebug( __METHOD__, 'Unknown type ' . gettype( $elemValue ) );
110111 }
111112 }
112113
113114 public function getDescription() {
114 - return 'Output data in WDDX format' . parent :: getDescription();
 115+ return 'Output data in WDDX format' . parent::getDescription();
115116 }
116117
117118 public function getVersion() {
Index: trunk/phase3/includes/api/ApiFormatPhp.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Oct 22, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
 9+ * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -34,7 +34,7 @@
3535 class ApiFormatPhp extends ApiFormatBase {
3636
3737 public function __construct( $main, $format ) {
38 - parent :: __construct( $main, $format );
 38+ parent::__construct( $main, $format );
3939 }
4040
4141 public function getMimeType() {
@@ -46,7 +46,7 @@
4747 }
4848
4949 public function getDescription() {
50 - return 'Output data in serialized PHP format' . parent :: getDescription();
 50+ return 'Output data in serialized PHP format' . parent::getDescription();
5151 }
5252
5353 public function getVersion() {
Index: trunk/phase3/includes/api/ApiFormatBase.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Sep 19, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
 9+ * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiBase.php' );
 29+ require_once( 'ApiBase.php' );
3030 }
3131
3232 /**
@@ -45,13 +45,14 @@
4646 * @param $format string Format name
4747 */
4848 public function __construct( $main, $format ) {
49 - parent :: __construct( $main, $format );
 49+ parent::__construct( $main, $format );
5050
5151 $this->mIsHtml = ( substr( $format, - 2, 2 ) === 'fm' ); // ends with 'fm'
52 - if ( $this->mIsHtml )
 52+ if ( $this->mIsHtml ) {
5353 $this->mFormat = substr( $format, 0, - 2 ); // remove ending 'fm'
54 - else
 54+ } else {
5555 $this->mFormat = $format;
 56+ }
5657 $this->mFormat = strtoupper( $this->mFormat );
5758 $this->mCleared = false;
5859 }
@@ -125,8 +126,9 @@
126127
127128 // Some printers (ex. Feed) do their own header settings,
128129 // in which case $mime will be set to null
129 - if ( is_null( $mime ) )
 130+ if ( is_null( $mime ) ) {
130131 return; // skip any initialization
 132+ }
131133
132134 header( "Content-Type: $mime; charset=utf-8" );
133135
@@ -197,8 +199,7 @@
198200 // For non-HTML output, clear all errors that might have been
199201 // displayed if display_errors=On
200202 // Do this only once, of course
201 - if ( !$this->mCleared )
202 - {
 203+ if ( !$this->mCleared ) {
203204 ob_clean();
204205 $this->mCleared = true;
205206 }
@@ -228,11 +229,11 @@
229230 }
230231
231232 /**
232 - * Prety-print various elements in HTML format, such as xml tags and
233 - * URLs. This method also escapes characters like <
234 - * @param $text string
235 - * @return string
236 - */
 233+ * Pretty-print various elements in HTML format, such as xml tags and
 234+ * URLs. This method also escapes characters like <
 235+ * @param $text string
 236+ * @return string
 237+ */
237238 protected function formatHTML( $text ) {
238239 global $wgUrlProtocols;
239240
@@ -254,12 +255,15 @@
255256 $text = preg_replace( "#\\$[^<>\n]+\\$#", '<b><i>\\0</i></b>', $text );
256257 }
257258
258 - /* Temporary fix for bad links in help messages. As a special case,
 259+ /**
 260+ * Temporary fix for bad links in help messages. As a special case,
259261 * XML-escaped metachars are de-escaped one level in the help message
260 - * for legibility. Should be removed once we have completed a fully-html
261 - * version of the help message. */
262 - if ( $this->mUnescapeAmps )
 262+ * for legibility. Should be removed once we have completed a fully-HTML
 263+ * version of the help message.
 264+ */
 265+ if ( $this->mUnescapeAmps ) {
263266 $text = preg_replace( '/&amp;(amp|quot|lt|gt);/', '&\1;', $text );
 267+ }
264268
265269 return $text;
266270 }
@@ -284,7 +288,7 @@
285289 class ApiFormatFeedWrapper extends ApiFormatBase {
286290
287291 public function __construct( $main ) {
288 - parent :: __construct( $main, 'feed' );
 292+ parent::__construct( $main, 'feed' );
289293 }
290294
291295 /**
@@ -326,13 +330,14 @@
327331 */
328332 public function execute() {
329333 $data = $this->getResultData();
330 - if ( isset ( $data['_feed'] ) && isset ( $data['_feeditems'] ) ) {
 334+ if ( isset( $data['_feed'] ) && isset( $data['_feeditems'] ) ) {
331335 $feed = $data['_feed'];
332336 $items = $data['_feeditems'];
333337
334338 $feed->outHeader();
335 - foreach ( $items as & $item )
 339+ foreach ( $items as & $item ) {
336340 $feed->outItem( $item );
 341+ }
337342 $feed->outFooter();
338343 } else {
339344 // Error has occured, print something useful
Index: trunk/phase3/includes/api/ApiFormatTxt.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Oct 22, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2008 Roan Kattouw <Firstname>.<Lastname>@home.nl
 9+ * Copyright © 2008 Roan Kattouw <Firstname>.<Lastname>@home.nl
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -34,7 +34,7 @@
3535 class ApiFormatTxt extends ApiFormatBase {
3636
3737 public function __construct( $main, $format ) {
38 - parent :: __construct( $main, $format );
 38+ parent::__construct( $main, $format );
3939 }
4040
4141 public function getMimeType() {
@@ -49,7 +49,7 @@
5050 }
5151
5252 public function getDescription() {
53 - return 'Output data in PHP\'s print_r() format' . parent :: getDescription();
 53+ return 'Output data in PHP\'s print_r() format' . parent::getDescription();
5454 }
5555
5656 public function getVersion() {
Index: trunk/phase3/includes/api/ApiFormatRaw.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Feb 2, 2009
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2009 Roan Kattouw <Firstname>.<Lastname>@home.nl
 9+ * Copyright © 2009 Roan Kattouw <Firstname>.<Lastname>@home.nl
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -40,32 +40,34 @@
4141 * @param $errorFallback Formatter object to fall back on for errors
4242 */
4343 public function __construct( $main, $errorFallback ) {
44 - parent :: __construct( $main, 'raw' );
 44+ parent::__construct( $main, 'raw' );
4545 $this->mErrorFallback = $errorFallback;
4646 }
4747
4848 public function getMimeType() {
4949 $data = $this->getResultData();
5050
51 - if ( isset( $data['error'] ) )
 51+ if ( isset( $data['error'] ) ) {
5252 return $this->mErrorFallback->getMimeType();
 53+ }
5354
54 - if ( !isset( $data['mime'] ) )
55 - ApiBase::dieDebug( __METHOD__, "No MIME type set for raw formatter" );
56 -
 55+ if ( !isset( $data['mime'] ) ) {
 56+ ApiBase::dieDebug( __METHOD__, 'No MIME type set for raw formatter' );
 57+ }
 58+
5759 return $data['mime'];
5860 }
5961
6062 public function execute() {
6163 $data = $this->getResultData();
62 - if ( isset( $data['error'] ) )
63 - {
 64+ if ( isset( $data['error'] ) ) {
6465 $this->mErrorFallback->execute();
6566 return;
6667 }
67 -
68 - if ( !isset( $data['text'] ) )
69 - ApiBase::dieDebug( __METHOD__, "No text given for raw formatter" );
 68+
 69+ if ( !isset( $data['text'] ) ) {
 70+ ApiBase::dieDebug( __METHOD__, 'No text given for raw formatter' );
 71+ }
7072 $this->printText( $data['text'] );
7173 }
7274
Index: trunk/phase3/includes/api/ApiFormatDbg.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Oct 22, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2008 Roan Kattouw <Firstname>.<Lastname>@home.nl
 9+ * Copyright © 2008 Roan Kattouw <Firstname>.<Lastname>@home.nl
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -34,7 +34,7 @@
3535 class ApiFormatDbg extends ApiFormatBase {
3636
3737 public function __construct( $main, $format ) {
38 - parent :: __construct( $main, $format );
 38+ parent::__construct( $main, $format );
3939 }
4040
4141 public function getMimeType() {
@@ -49,7 +49,7 @@
5050 }
5151
5252 public function getDescription() {
53 - return 'Output data in PHP\'s var_export() format' . parent :: getDescription();
 53+ return 'Output data in PHP\'s var_export() format' . parent::getDescription();
5454 }
5555
5656 public function getVersion() {
Index: trunk/phase3/includes/api/ApiFormatJson.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Sep 19, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
 9+ * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( 'ApiFormatBase.php' );
 29+ require_once( 'ApiFormatBase.php' );
3030 }
3131
3232 /**
@@ -36,7 +36,7 @@
3737 private $mIsRaw;
3838
3939 public function __construct( $main, $format ) {
40 - parent :: __construct( $main, $format );
 40+ parent::__construct( $main, $format );
4141 $this->mIsRaw = ( $format === 'rawfm' );
4242 }
4343
@@ -59,37 +59,39 @@
6060 }
6161
6262 public function execute() {
63 - $prefix = $suffix = "";
 63+ $prefix = $suffix = '';
6464
6565 $params = $this->extractRequestParams();
6666 $callback = $params['callback'];
6767 if ( !is_null( $callback ) ) {
68 - $prefix = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", "", $callback ) . "(";
69 - $suffix = ")";
 68+ $prefix = preg_replace( "/[^][.\\'\\\"_A-Za-z0-9]/", '', $callback ) . '(';
 69+ $suffix = ')';
7070 }
7171 $this->printText(
7272 $prefix .
7373 FormatJson::encode( $this->getResultData(), $this->getIsHtml() ) .
74 - $suffix );
 74+ $suffix
 75+ );
7576 }
7677
7778 public function getAllowedParams() {
78 - return array (
 79+ return array(
7980 'callback' => null,
8081 );
8182 }
8283
8384 public function getParamDescription() {
84 - return array (
 85+ return array(
8586 'callback' => 'If specified, wraps the output into a given function call. For safety, all user-specific data will be restricted.',
8687 );
8788 }
8889
8990 public function getDescription() {
90 - if ( $this->mIsRaw )
91 - return 'Output data with the debuging elements in JSON format' . parent :: getDescription();
92 - else
93 - return 'Output data in JSON format' . parent :: getDescription();
 91+ if ( $this->mIsRaw ) {
 92+ return 'Output data with the debuging elements in JSON format' . parent::getDescription();
 93+ } else {
 94+ return 'Output data in JSON format' . parent::getDescription();
 95+ }
9496 }
9597
9698 public function getVersion() {
Index: trunk/phase3/includes/api/ApiFeedWatchlist.php
@@ -1,11 +1,11 @@
22 <?php
33
4 -/*
 4+/**
55 * Created on Oct 13, 2006
66 *
77 * API for MediaWiki 1.8+
88 *
9 - * Copyright (C) 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
 9+ * Copyright © 2006 Yuri Astrakhan <Firstname><Lastname>@gmail.com
1010 *
1111 * This program is free software; you can redistribute it and/or modify
1212 * it under the terms of the GNU General Public License as published by
@@ -25,7 +25,7 @@
2626
2727 if ( !defined( 'MEDIAWIKI' ) ) {
2828 // Eclipse helper - will be ignored in production
29 - require_once ( "ApiBase.php" );
 29+ require_once( "ApiBase.php" );
3030 }
3131
3232 /**
@@ -38,7 +38,7 @@
3939 class ApiFeedWatchlist extends ApiBase {
4040
4141 public function __construct( $main, $action ) {
42 - parent :: __construct( $main, $action );
 42+ parent::__construct( $main, $action );
4343 }
4444
4545 /**
@@ -53,7 +53,6 @@
5454 * Wrap the result as an RSS/Atom feed.
5555 */
5656 public function execute() {
57 -
5857 global $wgFeedClasses, $wgFeedLimit, $wgSitename, $wgContLanguageCode;
5958
6059 try {
@@ -64,13 +63,13 @@
6564
6665 $dbr = wfGetDB( DB_SLAVE );
6766 // Prepare parameters for nested request
68 - $fauxReqArr = array (
 67+ $fauxReqArr = array(
6968 'action' => 'query',
7069 'meta' => 'siteinfo',
7170 'siprop' => 'general',
7271 'list' => 'watchlist',
7372 'wlprop' => 'title|user|comment|timestamp',
74 - 'wldir' => 'older', // reverse order - from newest to oldest
 73+ 'wldir' => 'older', // reverse order - from newest to oldest
7574 'wlend' => $dbr->timestamp( $endTime ), // stop at this time
7675 'wllimit' => ( 50 > $wgFeedLimit ) ? $wgFeedLimit : 50
7776 );
@@ -83,12 +82,12 @@
8483 }
8584
8685 // Check for 'allrev' parameter, and if found, show all revisions to each page on wl.
87 - if ( !is_null ( $params['allrev'] ) ) {
 86+ if ( !is_null( $params['allrev'] ) ) {
8887 $fauxReqArr['wlallrev'] = '';
8988 }
9089
9190 // Create the request
92 - $fauxReq = new FauxRequest ( $fauxReqArr );
 91+ $fauxReq = new FauxRequest( $fauxReqArr );
9392
9493 // Execute
9594 $module = new ApiMain( $fauxReq );
@@ -103,11 +102,11 @@
104103 }
105104
106105 $feedTitle = $wgSitename . ' - ' . wfMsgForContent( 'watchlist' ) . ' [' . $wgContLanguageCode . ']';
107 - $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullUrl();
 106+ $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullURL();
108107
109108 $feed = new $wgFeedClasses[$params['feedformat']] ( $feedTitle, htmlspecialchars( wfMsgForContent( 'watchlist' ) ), $feedUrl );
110109
111 - ApiFormatFeedWrapper :: setResult( $this->getResult(), $feed, $feedItems );
 110+ ApiFormatFeedWrapper::setResult( $this->getResult(), $feed, $feedItems );
112111
113112 } catch ( Exception $e ) {
114113
@@ -115,7 +114,7 @@
116115 $this->getMain()->setCacheMaxAge( 0 );
117116
118117 $feedTitle = $wgSitename . ' - Error - ' . wfMsgForContent( 'watchlist' ) . ' [' . $wgContLanguageCode . ']';
119 - $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullUrl();
 118+ $feedUrl = SpecialPage::getTitleFor( 'Watchlist' )->getFullURL();
120119
121120 $feedFormat = isset( $params['feedformat'] ) ? $params['feedformat'] : 'rss';
122121 $feed = new $wgFeedClasses[$feedFormat] ( $feedTitle, htmlspecialchars( wfMsgForContent( 'watchlist' ) ), $feedUrl );
@@ -128,15 +127,15 @@
129128 }
130129
131130 $errorText = $e->getMessage();
132 - $feedItems[] = new FeedItem( "Error ($errorCode)", $errorText, "", "", "" );
133 - ApiFormatFeedWrapper :: setResult( $this->getResult(), $feed, $feedItems );
 131+ $feedItems[] = new FeedItem( "Error ($errorCode)", $errorText, '', '', '' );
 132+ ApiFormatFeedWrapper::setResult( $this->getResult(), $feed, $feedItems );
134133 }
135134 }
136135
137136 private function createFeedItem( $info ) {
138137 $titleStr = $info['title'];
139 - $title = Title :: newFromText( $titleStr );
140 - $titleUrl = $title->getFullUrl();
 138+ $title = Title::newFromText( $titleStr );
 139+ $titleUrl = $title->getFullURL();
141140 $comment = isset( $info['comment'] ) ? $info['comment'] : null;
142141 $timestamp = $info['timestamp'];
143142 $user = $info['user'];
@@ -150,28 +149,28 @@
151150 global $wgFeedClasses;
152151 $feedFormatNames = array_keys( $wgFeedClasses );
153152 return array (
154 - 'feedformat' => array (
155 - ApiBase :: PARAM_DFLT => 'rss',
156 - ApiBase :: PARAM_TYPE => $feedFormatNames
 153+ 'feedformat' => array(
 154+ ApiBase::PARAM_DFLT => 'rss',
 155+ ApiBase::PARAM_TYPE => $feedFormatNames
157156 ),
158 - 'hours' => array (
159 - ApiBase :: PARAM_DFLT => 24,
160 - ApiBase :: PARAM_TYPE => 'integer',
161 - ApiBase :: PARAM_MIN => 1,
162 - ApiBase :: PARAM_MAX => 72,
 157+ 'hours' => array(
 158+ ApiBase::PARAM_DFLT => 24,
 159+ ApiBase::PARAM_TYPE => 'integer',
 160+ ApiBase::PARAM_MIN => 1,
 161+ ApiBase::PARAM_MAX => 72,
163162 ),
164163 'allrev' => null,
165 - 'wlowner' => array (
166 - ApiBase :: PARAM_TYPE => 'user'
 164+ 'wlowner' => array(
 165+ ApiBase::PARAM_TYPE => 'user'
167166 ),
168 - 'wltoken' => array (
169 - ApiBase :: PARAM_TYPE => 'string'
 167+ 'wltoken' => array(
 168+ ApiBase::PARAM_TYPE => 'string'
170169 )
171170 );
172171 }
173172
174173 public function getParamDescription() {
175 - return array (
 174+ return array(
176175 'feedformat' => 'The format of the feed',
177176 'hours' => 'List pages modified within this many hours from now',
178177 'allrev' => 'Include multiple revisions of the same page within given timeframe.',
@@ -185,7 +184,7 @@
186185 }
187186
188187 protected function getExamples() {
189 - return array (
 188+ return array(
190189 'api.php?action=feedwatchlist'
191190 );
192191 }

Status & tagging log