Index: trunk/phase3/includes/upload/UploadBase.php |
— | — | @@ -504,7 +504,7 @@ |
505 | 505 | * Really perform the upload. Stores the file in the local repo, watches |
506 | 506 | * if necessary and runs the UploadComplete hook. |
507 | 507 | * |
508 | | - * @return mixed Status indicating the whether the upload succeeded. |
| 508 | + * @return Status indicating the whether the upload succeeded. |
509 | 509 | */ |
510 | 510 | public function performUpload( $comment, $pageText, $watch, $user ) { |
511 | 511 | $status = $this->getLocalFile()->upload( |
— | — | @@ -657,7 +657,7 @@ |
658 | 658 | * API request to find this stashed file again. |
659 | 659 | * |
660 | 660 | * @param $key String: (optional) the session key used to find the file info again. If not supplied, a key will be autogenerated. |
661 | | - * @return File: stashed file |
| 661 | + * @return File stashed file |
662 | 662 | */ |
663 | 663 | public function stashSessionFile( $key = null ) { |
664 | 664 | $stash = RepoGroup::singleton()->getLocalRepo()->getUploadStash(); |
Index: trunk/phase3/includes/api/ApiQueryAllLinks.php |
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | $this->run( $resultPageSet ); |
54 | 54 | } |
55 | 55 | |
| 56 | + /** |
| 57 | + * @param $resultPageSet ApiPageSet |
| 58 | + * @return void |
| 59 | + */ |
56 | 60 | private function run( $resultPageSet = null ) { |
57 | 61 | $db = $this->getDB(); |
58 | 62 | $params = $this->extractRequestParams(); |
Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -71,6 +71,13 @@ |
72 | 72 | return $this->tokenFunctions; |
73 | 73 | } |
74 | 74 | |
| 75 | + /** |
| 76 | + * @static |
| 77 | + * @param $pageid |
| 78 | + * @param $title |
| 79 | + * @param $rc RecentChange |
| 80 | + * @return bool|String |
| 81 | + */ |
75 | 82 | public static function getPatrolToken( $pageid, $title, $rc ) { |
76 | 83 | global $wgUser; |
77 | 84 | if ( !$wgUser->useRCPatrol() && ( !$wgUser->useNPPatrol() || |
— | — | @@ -118,6 +125,8 @@ |
119 | 126 | |
120 | 127 | /** |
121 | 128 | * Generates and outputs the result of this query based upon the provided parameters. |
| 129 | + * |
| 130 | + * @param $resultPageSet ApiPageSet |
122 | 131 | */ |
123 | 132 | public function run( $resultPageSet = null ) { |
124 | 133 | global $wgUser; |
Index: trunk/phase3/includes/api/ApiQueryAllCategories.php |
— | — | @@ -53,6 +53,10 @@ |
54 | 54 | $this->run( $resultPageSet ); |
55 | 55 | } |
56 | 56 | |
| 57 | + /** |
| 58 | + * @param $resultPageSet ApiPageSet |
| 59 | + * @return void |
| 60 | + */ |
57 | 61 | private function run( $resultPageSet = null ) { |
58 | 62 | $db = $this->getDB(); |
59 | 63 | $params = $this->extractRequestParams(); |
Index: trunk/phase3/includes/api/ApiQueryLinks.php |
— | — | @@ -74,6 +74,10 @@ |
75 | 75 | $this->run( $resultPageSet ); |
76 | 76 | } |
77 | 77 | |
| 78 | + /** |
| 79 | + * @param $resultPageSet ApiPageSet |
| 80 | + * @return |
| 81 | + */ |
78 | 82 | private function run( $resultPageSet = null ) { |
79 | 83 | if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { |
80 | 84 | return; // nothing to do |
Index: trunk/phase3/includes/api/ApiQueryRandom.php |
— | — | @@ -36,7 +36,7 @@ |
37 | 37 | * @ingroup API |
38 | 38 | */ |
39 | 39 | |
40 | | - class ApiQueryRandom extends ApiQueryGeneratorBase { |
| 40 | +class ApiQueryRandom extends ApiQueryGeneratorBase { |
41 | 41 | |
42 | 42 | public function __construct( $query, $moduleName ) { |
43 | 43 | parent::__construct( $query, $moduleName, 'rn' ); |
— | — | @@ -50,6 +50,14 @@ |
51 | 51 | $this->run( $resultPageSet ); |
52 | 52 | } |
53 | 53 | |
| 54 | + /** |
| 55 | + * @param $randstr |
| 56 | + * @param $limit |
| 57 | + * @param $namespace |
| 58 | + * @param $resultPageSet ApiPageSet |
| 59 | + * @param $redirect |
| 60 | + * @return void |
| 61 | + */ |
54 | 62 | protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) { |
55 | 63 | $this->resetQueryParams(); |
56 | 64 | $this->addTables( 'page' ); |
Index: trunk/phase3/includes/api/ApiQueryAllpages.php |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | return 'public'; |
50 | 50 | } |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $resultPageSet ApiPageSet |
| 54 | + * @return void |
| 55 | + */ |
52 | 56 | public function executeGenerator( $resultPageSet ) { |
53 | 57 | if ( $resultPageSet->isResolvingRedirects() ) { |
54 | 58 | $this->dieUsage( 'Use "gapfilterredir=nonredirects" option instead of "redirects" when using allpages as a generator', 'params' ); |
— | — | @@ -56,6 +60,10 @@ |
57 | 61 | $this->run( $resultPageSet ); |
58 | 62 | } |
59 | 63 | |
| 64 | + /** |
| 65 | + * @param $resultPageSet ApiPageSet |
| 66 | + * @return void |
| 67 | + */ |
60 | 68 | private function run( $resultPageSet = null ) { |
61 | 69 | $db = $this->getDB(); |
62 | 70 | |
Index: trunk/phase3/includes/api/ApiQueryBacklinks.php |
— | — | @@ -39,7 +39,12 @@ |
40 | 40 | */ |
41 | 41 | class ApiQueryBacklinks extends ApiQueryGeneratorBase { |
42 | 42 | |
43 | | - private $params, $rootTitle, $contID, $redirID, $redirect; |
| 43 | + /** |
| 44 | + * @var Title |
| 45 | + */ |
| 46 | + private $rootTitle; |
| 47 | + |
| 48 | + private $params, $contID, $redirID, $redirect; |
44 | 49 | private $bl_ns, $bl_from, $bl_table, $bl_code, $bl_title, $bl_sort, $bl_fields, $hasNS; |
45 | 50 | private $pageMap, $resultArr; |
46 | 51 | |
— | — | @@ -103,6 +108,10 @@ |
104 | 109 | $this->run( $resultPageSet ); |
105 | 110 | } |
106 | 111 | |
| 112 | + /** |
| 113 | + * @param $resultPageSet ApiPageSet |
| 114 | + * @return void |
| 115 | + */ |
107 | 116 | private function prepareFirstQuery( $resultPageSet = null ) { |
108 | 117 | /* SELECT page_id, page_title, page_namespace, page_is_redirect |
109 | 118 | * FROM pagelinks, page WHERE pl_from=page_id |
— | — | @@ -141,6 +150,10 @@ |
142 | 151 | $this->addOption( 'STRAIGHT_JOIN' ); |
143 | 152 | } |
144 | 153 | |
| 154 | + /** |
| 155 | + * @param $resultPageSet ApiPageSet |
| 156 | + * @return void |
| 157 | + */ |
145 | 158 | private function prepareSecondQuery( $resultPageSet = null ) { |
146 | 159 | /* SELECT page_id, page_title, page_namespace, page_is_redirect, pl_title, pl_namespace |
147 | 160 | FROM pagelinks, page WHERE pl_from=page_id |
— | — | @@ -199,6 +212,10 @@ |
200 | 213 | $this->addOption( 'USE INDEX', array( 'page' => 'PRIMARY' ) ); |
201 | 214 | } |
202 | 215 | |
| 216 | + /** |
| 217 | + * @param $resultPageSet ApiPageSet |
| 218 | + * @return void |
| 219 | + */ |
203 | 220 | private function run( $resultPageSet = null ) { |
204 | 221 | $this->params = $this->extractRequestParams( false ); |
205 | 222 | $this->redirect = isset( $this->params['redirect'] ) && $this->params['redirect']; |
Index: trunk/phase3/includes/api/ApiDelete.php |
— | — | @@ -161,7 +161,7 @@ |
162 | 162 | /** |
163 | 163 | * @static |
164 | 164 | * @param $token |
165 | | - * @param $title |
| 165 | + * @param $title Title |
166 | 166 | * @param $oldimage |
167 | 167 | * @param $reason |
168 | 168 | * @param $suppress bool |
Index: trunk/phase3/includes/api/ApiQueryCategoryMembers.php |
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | $this->run( $resultPageSet ); |
54 | 54 | } |
55 | 55 | |
| 56 | + /** |
| 57 | + * @param $resultPageSet ApiPageSet |
| 58 | + * @return void |
| 59 | + */ |
56 | 60 | private function run( $resultPageSet = null ) { |
57 | 61 | $params = $this->extractRequestParams(); |
58 | 62 | |
Index: trunk/phase3/includes/api/ApiEditPage.php |
— | — | @@ -67,7 +67,6 @@ |
68 | 68 | |
69 | 69 | $this->getResult()->addValue( null, 'foo', $titles ); |
70 | 70 | |
71 | | - |
72 | 71 | $redirValues = array(); |
73 | 72 | foreach ( $titles as $id => $newTitle ) { |
74 | 73 | |
Index: trunk/phase3/includes/api/ApiQueryAllimages.php |
— | — | @@ -64,6 +64,10 @@ |
65 | 65 | return 'public'; |
66 | 66 | } |
67 | 67 | |
| 68 | + /** |
| 69 | + * @param $resultPageSet ApiPageSet |
| 70 | + * @return void |
| 71 | + */ |
68 | 72 | public function executeGenerator( $resultPageSet ) { |
69 | 73 | if ( $resultPageSet->isResolvingRedirects() ) { |
70 | 74 | $this->dieUsage( 'Use "gaifilterredir=nonredirects" option instead of "redirects" when using allimages as a generator', 'params' ); |
— | — | @@ -72,6 +76,10 @@ |
73 | 77 | $this->run( $resultPageSet ); |
74 | 78 | } |
75 | 79 | |
| 80 | + /** |
| 81 | + * @param $resultPageSet ApiPageSet |
| 82 | + * @return void |
| 83 | + */ |
76 | 84 | private function run( $resultPageSet = null ) { |
77 | 85 | $repo = $this->mRepo; |
78 | 86 | if ( !$repo instanceof LocalRepo ) { |
Index: trunk/phase3/includes/api/ApiQuerySearch.php |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | $this->run( $resultPageSet ); |
50 | 50 | } |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $resultPageSet ApiPageSet |
| 54 | + * @return void |
| 55 | + */ |
52 | 56 | private function run( $resultPageSet = null ) { |
53 | 57 | global $wgContLang; |
54 | 58 | $params = $this->extractRequestParams(); |
Index: trunk/phase3/includes/api/ApiQueryWatchlistRaw.php |
— | — | @@ -49,6 +49,10 @@ |
50 | 50 | $this->run( $resultPageSet ); |
51 | 51 | } |
52 | 52 | |
| 53 | + /** |
| 54 | + * @param $resultPageSet ApiPageSet |
| 55 | + * @return void |
| 56 | + */ |
53 | 57 | private function run( $resultPageSet = null ) { |
54 | 58 | $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' ); |
55 | 59 | |
Index: trunk/phase3/includes/api/ApiFormatRaw.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | /** |
40 | 40 | * Constructor |
41 | 41 | * @param $main ApiMain object |
42 | | - * @param $errorFallback Formatter object to fall back on for errors |
| 42 | + * @param $errorFallback ApiFormatBase object to fall back on for errors |
43 | 43 | */ |
44 | 44 | public function __construct( $main, $errorFallback ) { |
45 | 45 | parent::__construct( $main, 'raw' ); |
Index: trunk/phase3/includes/api/ApiQueryProtectedTitles.php |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | $this->run( $resultPageSet ); |
50 | 50 | } |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $resultPageSet ApiPageSet |
| 54 | + * @return void |
| 55 | + */ |
52 | 56 | private function run( $resultPageSet = null ) { |
53 | 57 | $params = $this->extractRequestParams(); |
54 | 58 | |
Index: trunk/phase3/includes/api/ApiQuery.php |
— | — | @@ -627,7 +627,7 @@ |
628 | 628 | $moduleDescriptions = array(); |
629 | 629 | |
630 | 630 | foreach ( $moduleList as $moduleName => $moduleClass ) { |
631 | | - $module = new $moduleClass ( $this, $moduleName, null ); |
| 631 | + $module = new $moduleClass( $this, $moduleName, null ); |
632 | 632 | |
633 | 633 | $msg = ApiMain::makeHelpMsgHeader( $module, $paramName ); |
634 | 634 | $msg2 = $module->makeHelpMsg(); |
Index: trunk/phase3/includes/api/ApiQueryImageInfo.php |
— | — | @@ -117,8 +117,7 @@ |
118 | 118 | if ( |
119 | 119 | ( is_null( $start ) || $img->getTimestamp() <= $start ) && |
120 | 120 | ( is_null( $params['end'] ) || $img->getTimestamp() >= $params['end'] ) |
121 | | - ) |
122 | | - { |
| 121 | + ) { |
123 | 122 | $gotOne = true; |
124 | 123 | |
125 | 124 | $fit = $this->addPageSubItem( $pageId, |
— | — | @@ -352,7 +351,7 @@ |
353 | 352 | return $vals; |
354 | 353 | } |
355 | 354 | |
356 | | - /* |
| 355 | + /** |
357 | 356 | * |
358 | 357 | * @param $metadata Array |
359 | 358 | * @param $result ApiResult |
— | — | @@ -379,6 +378,10 @@ |
380 | 379 | return 'public'; |
381 | 380 | } |
382 | 381 | |
| 382 | + /** |
| 383 | + * @param $img File |
| 384 | + * @return string |
| 385 | + */ |
383 | 386 | private function getContinueStr( $img ) { |
384 | 387 | return $img->getOriginalTitle()->getText() . |
385 | 388 | '|' . $img->getTimestamp(); |
Index: trunk/phase3/includes/api/ApiQueryIWBacklinks.php |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | $this->run( $resultPageSet ); |
50 | 50 | } |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $resultPageSet ApiPageSet |
| 54 | + * @return void |
| 55 | + */ |
52 | 56 | public function run( $resultPageSet = null ) { |
53 | 57 | $params = $this->extractRequestParams(); |
54 | 58 | |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -53,6 +53,10 @@ |
54 | 54 | $fld_timestamp = false, $fld_user = false, $fld_comment = false, $fld_parsedcomment = false, $fld_sizes = false, |
55 | 55 | $fld_notificationtimestamp = false, $fld_userid = false; |
56 | 56 | |
| 57 | + /** |
| 58 | + * @param $resultPageSet ApiPageSet |
| 59 | + * @return void |
| 60 | + */ |
57 | 61 | private function run( $resultPageSet = null ) { |
58 | 62 | $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' ); |
59 | 63 | |
Index: trunk/phase3/includes/api/ApiQueryQueryPage.php |
— | — | @@ -60,6 +60,10 @@ |
61 | 61 | $this->run( $resultPageSet ); |
62 | 62 | } |
63 | 63 | |
| 64 | + /** |
| 65 | + * @param $resultPageSet ApiPageSet |
| 66 | + * @return void |
| 67 | + */ |
64 | 68 | public function run( $resultPageSet = null ) { |
65 | 69 | global $wgUser; |
66 | 70 | $params = $this->extractRequestParams(); |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -73,6 +73,13 @@ |
74 | 74 | return $this->tokenFunctions; |
75 | 75 | } |
76 | 76 | |
| 77 | + /** |
| 78 | + * @static |
| 79 | + * @param $pageid |
| 80 | + * @param $title Title |
| 81 | + * @param $rev Revision |
| 82 | + * @return bool|String |
| 83 | + */ |
77 | 84 | public static function getRollbackToken( $pageid, $title, $rev ) { |
78 | 85 | global $wgUser; |
79 | 86 | if ( !$wgUser->isAllowed( 'rollback' ) ) { |
Index: trunk/phase3/includes/api/ApiQueryCategories.php |
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | $this->run( $resultPageSet ); |
54 | 54 | } |
55 | 55 | |
| 56 | + /** |
| 57 | + * @param $resultPageSet ApiPageSet |
| 58 | + * @return |
| 59 | + */ |
56 | 60 | private function run( $resultPageSet = null ) { |
57 | 61 | if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { |
58 | 62 | return; // nothing to do |
Index: trunk/phase3/includes/api/ApiQueryInfo.php |
— | — | @@ -47,6 +47,10 @@ |
48 | 48 | parent::__construct( $query, $moduleName, 'in' ); |
49 | 49 | } |
50 | 50 | |
| 51 | + /** |
| 52 | + * @param $pageSet ApiPageSet |
| 53 | + * @return void |
| 54 | + */ |
51 | 55 | public function requestExtraData( $pageSet ) { |
52 | 56 | global $wgDisableCounters; |
53 | 57 | |
Index: trunk/phase3/includes/api/ApiQueryDuplicateFiles.php |
— | — | @@ -52,6 +52,10 @@ |
53 | 53 | $this->run( $resultPageSet ); |
54 | 54 | } |
55 | 55 | |
| 56 | + /** |
| 57 | + * @param $resultPageSet ApiPageSet |
| 58 | + * @return |
| 59 | + */ |
56 | 60 | private function run( $resultPageSet = null ) { |
57 | 61 | $params = $this->extractRequestParams(); |
58 | 62 | $namespaces = $this->getPageSet()->getAllTitlesByNamespace(); |
Index: trunk/phase3/includes/api/ApiQueryTags.php |
— | — | @@ -36,7 +36,12 @@ |
37 | 37 | */ |
38 | 38 | class ApiQueryTags extends ApiQueryBase { |
39 | 39 | |
40 | | - private $limit, $result; |
| 40 | + /** |
| 41 | + * @var ApiResult |
| 42 | + */ |
| 43 | + private $result; |
| 44 | + |
| 45 | + private $limit; |
41 | 46 | private $fld_displayname = false, $fld_description = false, |
42 | 47 | $fld_hitcount = false; |
43 | 48 | |
Index: trunk/phase3/includes/api/ApiUpload.php |
— | — | @@ -33,7 +33,12 @@ |
34 | 34 | * @ingroup API |
35 | 35 | */ |
36 | 36 | class ApiUpload extends ApiBase { |
| 37 | + |
| 38 | + /** |
| 39 | + * @var UploadBase |
| 40 | + */ |
37 | 41 | protected $mUpload = null; |
| 42 | + |
38 | 43 | protected $mParams; |
39 | 44 | |
40 | 45 | public function __construct( $main, $action ) { |
— | — | @@ -138,7 +143,6 @@ |
139 | 144 | return $sessionKey; |
140 | 145 | } |
141 | 146 | |
142 | | - |
143 | 147 | /** |
144 | 148 | * Select an upload module and set it to mUpload. Dies on failure. If the |
145 | 149 | * request was a status request and not a true upload, returns false; |
— | — | @@ -376,7 +380,6 @@ |
377 | 381 | $result['result'] = 'Success'; |
378 | 382 | $result['filename'] = $file->getName(); |
379 | 383 | |
380 | | - |
381 | 384 | return $result; |
382 | 385 | } |
383 | 386 | |
Index: trunk/phase3/includes/api/ApiQueryUsers.php |
— | — | @@ -66,6 +66,11 @@ |
67 | 67 | return $this->tokenFunctions; |
68 | 68 | } |
69 | 69 | |
| 70 | + /** |
| 71 | + * @static |
| 72 | + * @param $user User |
| 73 | + * @return String |
| 74 | + */ |
70 | 75 | public static function getUserrightsToken( $user ) { |
71 | 76 | global $wgUser; |
72 | 77 | // Since the permissions check for userrights is non-trivial, |
Index: trunk/phase3/includes/api/ApiQueryImages.php |
— | — | @@ -48,6 +48,10 @@ |
49 | 49 | $this->run( $resultPageSet ); |
50 | 50 | } |
51 | 51 | |
| 52 | + /** |
| 53 | + * @param $resultPageSet ApiPageSet |
| 54 | + * @return |
| 55 | + */ |
52 | 56 | private function run( $resultPageSet = null ) { |
53 | 57 | if ( $this->getPageSet()->getGoodTitleCount() == 0 ) { |
54 | 58 | return; // nothing to do |