From 5a6559d8b12c74acc2eae23210db347c861409dd Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Thu, 12 Jan 2012 19:41:18 +0000 Subject: [PATCH] Reverted r108743 per CR comment. This should at least be discussed first. --- includes/HistoryBlob.php | 1 + includes/Hooks.php | 1 + includes/ImagePage.php | 3 ++- includes/Pager.php | 2 ++ includes/Preferences.php | 3 +++ includes/SquidPurgeClient.php | 1 + includes/Title.php | 1 + includes/TitleArray.php | 1 + includes/UserArray.php | 1 + includes/Wiki.php | 2 ++ includes/WikiPage.php | 3 +++ includes/api/ApiImport.php | 1 + includes/api/ApiQueryAllLinks.php | 1 + includes/api/ApiQueryAllimages.php | 2 ++ includes/api/ApiQueryAllpages.php | 2 ++ includes/api/ApiQueryBacklinks.php | 3 +++ includes/api/ApiQueryBase.php | 1 + includes/api/ApiQueryCategoryMembers.php | 1 + includes/api/ApiQueryExtLinksUsage.php | 1 + includes/api/ApiQueryIWBacklinks.php | 1 + includes/api/ApiQueryInfo.php | 1 + includes/api/ApiQueryLangBacklinks.php | 1 + includes/api/ApiQueryProtectedTitles.php | 1 + includes/api/ApiQueryRandom.php | 10 +++++--- includes/api/ApiQuerySearch.php | 1 + includes/api/ApiQueryWatchlist.php | 1 + includes/api/ApiQueryWatchlistRaw.php | 1 + includes/cache/FileCacheBase.php | 3 +++ includes/cache/HTMLFileCache.php | 1 + includes/cache/SquidUpdate.php | 1 + includes/db/CloneDatabase.php | 25 +++++++++++-------- includes/db/Database.php | 2 ++ includes/filerepo/FileRepo.php | 6 ++++- includes/filerepo/LocalRepo.php | 1 + includes/filerepo/backend/FileBackend.php | 3 +++ .../filerepo/backend/FileBackendGroup.php | 5 ++++ includes/filerepo/backend/FileOp.php | 5 ++++ .../backend/lockmanager/DBLockManager.php | 1 + .../backend/lockmanager/LockManagerGroup.php | 3 +++ includes/filerepo/file/File.php | 3 ++- includes/filerepo/file/TempFSFile.php | 3 +++ includes/media/GIFMetadataExtractor.php | 1 + includes/media/MediaTransformOutput.php | 1 + includes/parser/CoreParserFunctions.php | 1 + includes/parser/CoreTagHooks.php | 1 + includes/parser/ParserOutput.php | 2 ++ includes/resourceloader/ResourceLoader.php | 1 + includes/specials/SpecialImport.php | 1 + includes/specials/SpecialMergeHistory.php | 3 +++ includes/specials/SpecialShortpages.php | 1 + includes/specials/SpecialUserlogin.php | 1 + .../benchmarks/bench_delete_truncate.php | 9 ++++--- maintenance/locking/LockServerDaemon.php | 12 +++++++++ thumb.php | 6 +++++ 54 files changed, 129 insertions(+), 21 deletions(-) diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index bf4103ed04..f707b3f6a5 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -94,6 +94,7 @@ class ConcatenatedGzipHistoryBlob implements HistoryBlob /** * @param $text string + * @return void */ public function setText( $text ) { $this->uncompress(); diff --git a/includes/Hooks.php b/includes/Hooks.php index 2a6e5cb1b8..e1c1d50b5a 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -39,6 +39,7 @@ class Hooks { * * @param $name Mixed: name of hook * @param $callback Mixed: callback function to attach + * @return void */ public static function register( $name, $callback ) { if( !isset( self::$handlers[$name] ) ) { diff --git a/includes/ImagePage.php b/includes/ImagePage.php index ef724146dc..a44a7d353d 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -39,7 +39,8 @@ class ImagePage extends Article { } /** - * @param $file File + * @param $file File: + * @return void */ public function setFile( $file ) { $this->mPage->setFile( $file ); diff --git a/includes/Pager.php b/includes/Pager.php index ee7bde3b19..a03a1d1d4c 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -394,6 +394,8 @@ abstract class IndexPager extends ContextSource implements Pager { * Called from getBody(), before getStartBody() is called and * after doQuery() was called. This will be called only if there * are rows in the result set. + * + * @return void */ protected function doBatchLookups() {} diff --git a/includes/Preferences.php b/includes/Preferences.php index 153984b7d2..fde135b891 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -129,6 +129,7 @@ class Preferences { * @param $user User * @param $context IContextSource * @param $defaultPreferences + * @return void */ static function profilePreferences( $user, IContextSource $context, &$defaultPreferences ) { global $wgAuth, $wgContLang, $wgParser, $wgCookieExpiration, $wgLanguageCode, @@ -455,6 +456,7 @@ class Preferences { * @param $user User * @param $context IContextSource * @param $defaultPreferences + * @return void */ static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) { ## Skin ##################################### @@ -530,6 +532,7 @@ class Preferences { * @param $user User * @param $context IContextSource * @param $defaultPreferences + * @return void */ static function datetimePreferences( $user, IContextSource $context, &$defaultPreferences ) { ## Date and time ##################################### diff --git a/includes/SquidPurgeClient.php b/includes/SquidPurgeClient.php index 6f45f202a9..506ada96d1 100644 --- a/includes/SquidPurgeClient.php +++ b/includes/SquidPurgeClient.php @@ -340,6 +340,7 @@ class SquidPurgeClientPool { /** * @param $client SquidPurgeClient + * @return void */ public function addClient( $client ) { $this->clients[] = $client; diff --git a/includes/Title.php b/includes/Title.php index e0348672cf..2f285bb55a 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -261,6 +261,7 @@ class Title { * If false is given, the title will be treated as non-existing. * * @param $row Object|false database row + * @return void */ public function loadFromRow( $row ) { if ( $row ) { // page found diff --git a/includes/TitleArray.php b/includes/TitleArray.php index 72717c2586..969600897c 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -53,6 +53,7 @@ class TitleArrayFromResult extends TitleArray { /** * @param $row ResultWrapper + * @return void */ protected function setCurrent( $row ) { if ( $row === false ) { diff --git a/includes/UserArray.php b/includes/UserArray.php index 89d93744c5..c5ba0b2b35 100644 --- a/includes/UserArray.php +++ b/includes/UserArray.php @@ -60,6 +60,7 @@ class UserArrayFromResult extends UserArray { /** * @param $row + * @return void */ protected function setCurrent( $row ) { if ( $row === false ) { diff --git a/includes/Wiki.php b/includes/Wiki.php index 8153eaed78..55ff89ed8c 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -145,6 +145,8 @@ class MediaWiki { * - redirect loop * - special pages * - normal pages + * + * @return void */ private function performRequest() { global $wgServer, $wgUsePathInfo, $wgTitle; diff --git a/includes/WikiPage.php b/includes/WikiPage.php index 4e9e3f5596..83f73e0a69 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -367,6 +367,7 @@ class WikiPage extends Page { * A DB query result object or... * "fromdb" to get from a slave DB or... * "fromdbmaster" to get from the master DB + * @return void */ public function loadPageData( $data = 'fromdb' ) { if ( $data === 'fromdbmaster' ) { @@ -621,6 +622,7 @@ class WikiPage extends Page { /** * Set the page timestamp (use only to avoid DB queries) * @param $ts string MW timestamp of last article revision + * @return void */ public function setTimestamp( $ts ) { $this->mTimestamp = wfTimestamp( TS_MW, $ts ); @@ -703,6 +705,7 @@ class WikiPage extends Page { * Set the cached timestamp for the last time the page changed. * This is only used to help handle slave lag by comparing to page_touched. * @param $timestamp string + * @return void */ public function setCachedLastEditTime( $timestamp ) { global $wgMemc; diff --git a/includes/api/ApiImport.php b/includes/api/ApiImport.php index 527a0f075e..ade9f1f3fd 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -181,6 +181,7 @@ class ApiImportReporter extends ImportReporter { * @param $revisionCount int * @param $successCount int * @param $pageInfo + * @return void */ function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { // Add a result entry diff --git a/includes/api/ApiQueryAllLinks.php b/includes/api/ApiQueryAllLinks.php index 127d359279..903f144fe4 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -49,6 +49,7 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $db = $this->getDB(); diff --git a/includes/api/ApiQueryAllimages.php b/includes/api/ApiQueryAllimages.php index fec4ed4034..ca344f7337 100644 --- a/includes/api/ApiQueryAllimages.php +++ b/includes/api/ApiQueryAllimages.php @@ -61,6 +61,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ public function executeGenerator( $resultPageSet ) { if ( $resultPageSet->isResolvingRedirects() ) { @@ -72,6 +73,7 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $repo = $this->mRepo; diff --git a/includes/api/ApiQueryAllpages.php b/includes/api/ApiQueryAllpages.php index e429a37997..e003ee9115 100644 --- a/includes/api/ApiQueryAllpages.php +++ b/includes/api/ApiQueryAllpages.php @@ -45,6 +45,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ public function executeGenerator( $resultPageSet ) { if ( $resultPageSet->isResolvingRedirects() ) { @@ -56,6 +57,7 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $db = $this->getDB(); diff --git a/includes/api/ApiQueryBacklinks.php b/includes/api/ApiQueryBacklinks.php index 3dbc437a33..381ef550d3 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -119,6 +119,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function prepareFirstQuery( $resultPageSet = null ) { /* SELECT page_id, page_title, page_namespace, page_is_redirect @@ -160,6 +161,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function prepareSecondQuery( $resultPageSet = null ) { /* SELECT page_id, page_title, page_namespace, page_is_redirect, pl_title, pl_namespace @@ -221,6 +223,7 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $this->params = $this->extractRequestParams( false ); diff --git a/includes/api/ApiQueryBase.php b/includes/api/ApiQueryBase.php index add74179fb..4fe82de0cb 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -505,6 +505,7 @@ abstract class ApiQueryBase extends ApiBase { * Also adds relevant block information * * @param bool $showBlockInfo + * @return void */ public function showHiddenUsersAddBlockInfo( $showBlockInfo ) { $userCanViewHiddenUsers = $this->getUser()->isAllowed( 'hideuser' ); diff --git a/includes/api/ApiQueryCategoryMembers.php b/includes/api/ApiQueryCategoryMembers.php index 1beadb398d..4b19b7e86e 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -49,6 +49,7 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryExtLinksUsage.php b/includes/api/ApiQueryExtLinksUsage.php index fca4a55731..93c71e2fce 100644 --- a/includes/api/ApiQueryExtLinksUsage.php +++ b/includes/api/ApiQueryExtLinksUsage.php @@ -47,6 +47,7 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryIWBacklinks.php b/includes/api/ApiQueryIWBacklinks.php index ff1765074c..feda1779cd 100644 --- a/includes/api/ApiQueryIWBacklinks.php +++ b/includes/api/ApiQueryIWBacklinks.php @@ -45,6 +45,7 @@ class ApiQueryIWBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ public function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryInfo.php b/includes/api/ApiQueryInfo.php index a480c1b810..f0d0faa350 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -51,6 +51,7 @@ class ApiQueryInfo extends ApiQueryBase { /** * @param $pageSet ApiPageSet + * @return void */ public function requestExtraData( $pageSet ) { global $wgDisableCounters; diff --git a/includes/api/ApiQueryLangBacklinks.php b/includes/api/ApiQueryLangBacklinks.php index c98e8da4cf..1573494499 100644 --- a/includes/api/ApiQueryLangBacklinks.php +++ b/includes/api/ApiQueryLangBacklinks.php @@ -45,6 +45,7 @@ class ApiQueryLangBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ public function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryProtectedTitles.php b/includes/api/ApiQueryProtectedTitles.php index eba16ea1e8..44cc1d3266 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -45,6 +45,7 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQueryRandom.php b/includes/api/ApiQueryRandom.php index 2245f0000c..2e9e2dd500 100644 --- a/includes/api/ApiQueryRandom.php +++ b/includes/api/ApiQueryRandom.php @@ -46,11 +46,12 @@ class ApiQueryRandom extends ApiQueryGeneratorBase { } /** - * @param $randstr - * @param $limit - * @param $namespace + * @param $randstr + * @param $limit + * @param $namespace * @param $resultPageSet ApiPageSet - * @param $redirect + * @param $redirect + * @return void */ protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) { $this->resetQueryParams(); @@ -100,6 +101,7 @@ class ApiQueryRandom extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ public function run( $resultPageSet = null ) { $params = $this->extractRequestParams(); diff --git a/includes/api/ApiQuerySearch.php b/includes/api/ApiQuerySearch.php index 8e04e88c10..40aac0505c 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -45,6 +45,7 @@ class ApiQuerySearch extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { global $wgContLang; diff --git a/includes/api/ApiQueryWatchlist.php b/includes/api/ApiQueryWatchlist.php index cbe50dec99..ea56fcd973 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -50,6 +50,7 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' ); diff --git a/includes/api/ApiQueryWatchlistRaw.php b/includes/api/ApiQueryWatchlistRaw.php index 2fad13720f..506944f0b3 100644 --- a/includes/api/ApiQueryWatchlistRaw.php +++ b/includes/api/ApiQueryWatchlistRaw.php @@ -46,6 +46,7 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet + * @return void */ private function run( $resultPageSet = null ) { $this->selectNamedDB( 'watchlist', DB_SLAVE, 'watchlist' ); diff --git a/includes/cache/FileCacheBase.php b/includes/cache/FileCacheBase.php index ab7d8de1af..d3558184b8 100644 --- a/includes/cache/FileCacheBase.php +++ b/includes/cache/FileCacheBase.php @@ -151,6 +151,7 @@ abstract class FileCacheBase { /** * Clear the cache for this page + * @return void */ public function clearCache() { wfSuppressWarnings(); @@ -161,6 +162,7 @@ abstract class FileCacheBase { /** * Create parent directors of $this->cachePath() + * @return void */ protected function checkCacheDirs() { wfMkdirParents( dirname( $this->cachePath() ), null, __METHOD__ ); @@ -196,6 +198,7 @@ abstract class FileCacheBase { /** * Roughly increments the cache misses in the last hour by unique visitors * @param $request WebRequest + * @return void */ public function incrMissesRecent( WebRequest $request ) { global $wgMemc; diff --git a/includes/cache/HTMLFileCache.php b/includes/cache/HTMLFileCache.php index 8866ba3652..b846e41931 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -92,6 +92,7 @@ class HTMLFileCache extends FileCacheBase { /** * Read from cache to context output * @param $context IContextSource + * @return void */ public function loadFromFileCache( IContextSource $context ) { global $wgMimeType, $wgLanguageCode; diff --git a/includes/cache/SquidUpdate.php b/includes/cache/SquidUpdate.php index af620e0c8f..d47b5b5e24 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -99,6 +99,7 @@ class SquidUpdate { * XXX report broken Squids per mail or log * * @param $urlArr array + * @return void */ static function purge( $urlArr ) { global $wgSquidServers, $wgHTCPMulticastAddress, $wgHTCPPort; diff --git a/includes/db/CloneDatabase.php b/includes/db/CloneDatabase.php index 5a8232e623..bd0895cfb2 100644 --- a/includes/db/CloneDatabase.php +++ b/includes/db/CloneDatabase.php @@ -86,18 +86,18 @@ class CloneDatabase { * Clone the table structure */ public function cloneTableStructure() { - + foreach( $this->tablesToClone as $tbl ) { # Clean up from previous aborted run. So that table escaping # works correctly across DB engines, we need to change the pre- # fix back and forth so tableName() works right. - + self::changePrefix( $this->oldTablePrefix ); $oldTableName = $this->db->tableName( $tbl, 'raw' ); - + self::changePrefix( $this->newTablePrefix ); $newTableName = $this->db->tableName( $tbl, 'raw' ); - + if( $this->dropCurrentTables && !in_array( $this->db->getType(), array( 'postgres', 'oracle' ) ) ) { $this->db->dropTable( $tbl, __METHOD__ ); wfDebug( __METHOD__." dropping {$newTableName}\n", true); @@ -107,9 +107,9 @@ class CloneDatabase { # Create new table wfDebug( __METHOD__." duplicating $oldTableName to $newTableName\n", true ); $this->db->duplicateTableStructure( $oldTableName, $newTableName, $this->useTemporaryTables ); - + } - + } /** @@ -129,7 +129,8 @@ class CloneDatabase { /** * Change the table prefix on all open DB connections/ * - * @param $prefix + * @param $prefix + * @return void */ public static function changePrefix( $prefix ) { global $wgDBprefix; @@ -138,16 +139,18 @@ class CloneDatabase { } /** - * @param $lb LoadBalancer - * @param $prefix + * @param $lb LoadBalancer + * @param $prefix + * @return void */ public static function changeLBPrefix( $lb, $prefix ) { $lb->forEachOpenConnection( array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix ) ); } /** - * @param $db DatabaseBase - * @param $prefix + * @param $db DatabaseBase + * @param $prefix + * @return void */ public static function changeDBPrefix( $db, $prefix ) { $db->tablePrefix( $prefix ); diff --git a/includes/db/Database.php b/includes/db/Database.php index c94f5ce3ac..5c186df3b3 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3052,6 +3052,7 @@ abstract class DatabaseBase implements DatabaseType { * Override database's default connection timeout * * @param $timeout Integer in seconds + * @return void * @deprecated since 1.19; use setSessionOptions() */ public function setTimeout( $timeout ) { @@ -3067,6 +3068,7 @@ abstract class DatabaseBase implements DatabaseType { * hours or days. * * @param $options Array + * @return void */ public function setSessionOptions( array $options ) {} diff --git a/includes/filerepo/FileRepo.php b/includes/filerepo/FileRepo.php index 1a5102043e..cd9b2bba4c 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -126,6 +126,7 @@ class FileRepo { * directories, in case the user has not configured offline storage * * @param $dir string + * @return void */ protected function initDeletedDir( $dir ) { $this->backend->secure( // prevent web access & dir listings @@ -717,7 +718,8 @@ class FileRepo { * Each file can be a (zone, rel) pair, virtual url, storage path, or FS path. * It will try to delete each file, but ignores any errors that may occur. * - * @param $files array List of files to delete + * @param $pairs array List of files to delete + * @return void */ public function cleanupBatch( $files ) { $operations = array(); @@ -1215,6 +1217,7 @@ class FileRepo { * May use either the database or the filesystem. * * @param $callback Array|string + * @return void */ public function enumFiles( $callback ) { $this->enumFilesInStorage( $callback ); @@ -1225,6 +1228,7 @@ class FileRepo { * May use either the database or the filesystem. * * @param $callback Array|string + * @return void */ protected function enumFilesInStorage( $callback ) { $publicRoot = $this->getZonePath( 'public' ); diff --git a/includes/filerepo/LocalRepo.php b/includes/filerepo/LocalRepo.php index a5607dff57..92d8f5d076 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -261,6 +261,7 @@ class LocalRepo extends FileRepo { * Invalidates image redirect cache related to that image * * @param $title Title of page + * @return void */ function invalidateImageRedirect( Title $title ) { global $wgMemc; diff --git a/includes/filerepo/backend/FileBackend.php b/includes/filerepo/backend/FileBackend.php index 958c56e5d1..d9710989cf 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -515,6 +515,7 @@ abstract class FileBackendBase { * If $paths is given, then only the cache for those files will be cleared. * * @param $paths Array Storage paths + * @return void */ abstract public function clearCache( array $paths = null ); @@ -1163,6 +1164,8 @@ abstract class FileBackend extends FileBackendBase { /** * Prune the cache if it is too big to add an item + * + * @return void */ protected function trimCache() { if ( count( $this->cache ) >= $this->maxCacheSize ) { diff --git a/includes/filerepo/backend/FileBackendGroup.php b/includes/filerepo/backend/FileBackendGroup.php index 0b972351b8..24277b114e 100644 --- a/includes/filerepo/backend/FileBackendGroup.php +++ b/includes/filerepo/backend/FileBackendGroup.php @@ -32,6 +32,8 @@ class FileBackendGroup { /** * Destroy the singleton instance + * + * @return void */ public static function destroySingleton() { self::$instance = null; @@ -39,6 +41,8 @@ class FileBackendGroup { /** * Register file backends from the global variables + * + * @return void */ protected function initFromGlobals() { global $wgLocalFileRepo, $wgForeignFileRepos, $wgFileBackends; @@ -89,6 +93,7 @@ class FileBackendGroup { * Register an array of file backend configurations * * @param $configs Array + * @return void * @throws MWException */ protected function register( array $configs ) { diff --git a/includes/filerepo/backend/FileOp.php b/includes/filerepo/backend/FileOp.php index 858c9ea426..11fe865b56 100644 --- a/includes/filerepo/backend/FileOp.php +++ b/includes/filerepo/backend/FileOp.php @@ -54,6 +54,8 @@ abstract class FileOp { /** * Disable file backups for this operation + * + * @return void */ final protected function disableBackups() { $this->useBackups = false; @@ -63,6 +65,8 @@ abstract class FileOp { * Allow stale data for file reads and existence checks. * If this is called, then disableBackups() should also be called * unless the affected files are known to have not changed recently. + * + * @return void */ final protected function allowStaleReads() { $this->useLatest = false; @@ -500,6 +504,7 @@ abstract class FileOp { * Log a file operation failure and preserve any temp files * * @param $fileOp FileOp + * @return void */ final protected function logFailure( $action ) { $params = $this->params; diff --git a/includes/filerepo/backend/lockmanager/DBLockManager.php b/includes/filerepo/backend/lockmanager/DBLockManager.php index 331a7add6d..ac9c0791d6 100644 --- a/includes/filerepo/backend/lockmanager/DBLockManager.php +++ b/includes/filerepo/backend/lockmanager/DBLockManager.php @@ -281,6 +281,7 @@ class DBLockManager extends LockManager { * * @param $lockDb string * @param $db DatabaseBase + * @return void * @throws DBError */ protected function initConnection( $lockDb, DatabaseBase $db ) {} diff --git a/includes/filerepo/backend/lockmanager/LockManagerGroup.php b/includes/filerepo/backend/lockmanager/LockManagerGroup.php index a97bc2d2bc..e501a0f616 100644 --- a/includes/filerepo/backend/lockmanager/LockManagerGroup.php +++ b/includes/filerepo/backend/lockmanager/LockManagerGroup.php @@ -27,6 +27,8 @@ class LockManagerGroup { /** * Register lock managers from the global variables + * + * @return void */ protected function initFromGlobals() { global $wgLockManagers; @@ -38,6 +40,7 @@ class LockManagerGroup { * Register an array of file lock manager configurations * * @param $configs Array + * @return void * @throws MWException */ protected function register( array $configs ) { diff --git a/includes/filerepo/file/File.php b/includes/filerepo/file/File.php index b130d8cc99..67345a686e 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1694,7 +1694,8 @@ abstract class File { } /** - * @param $from + * @param $from + * @return void */ function redirectedFrom( $from ) { $this->redirected = $from; diff --git a/includes/filerepo/file/TempFSFile.php b/includes/filerepo/file/TempFSFile.php index ab9402b096..bee00fa784 100644 --- a/includes/filerepo/file/TempFSFile.php +++ b/includes/filerepo/file/TempFSFile.php @@ -66,6 +66,7 @@ class TempFSFile extends FSFile { * Clean up the temporary file only after an object goes out of scope * * @param $object Object + * @return void */ public function bind( $object ) { if ( is_object( $object ) ) { @@ -75,6 +76,8 @@ class TempFSFile extends FSFile { /** * Set flag to not clean up after the temporary file + * + * @return void */ public function preserve() { $this->canDelete = false; diff --git a/includes/media/GIFMetadataExtractor.php b/includes/media/GIFMetadataExtractor.php index 8e6fd7435f..5dbeb8f852 100644 --- a/includes/media/GIFMetadataExtractor.php +++ b/includes/media/GIFMetadataExtractor.php @@ -233,6 +233,7 @@ class GIFMetadataExtractor { /** * @param $fh * @param $bpp + * @return void */ static function readGCT( $fh, $bpp ) { if ( $bpp > 0 ) { diff --git a/includes/media/MediaTransformOutput.php b/includes/media/MediaTransformOutput.php index 0719b500a2..de6b1c0525 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -50,6 +50,7 @@ abstract class MediaTransformOutput { /** * @param $storagePath string The permanent storage path + * @return void */ public function setStoragePath( $storagePath ) { $this->storagePath = $storagePath; diff --git a/includes/parser/CoreParserFunctions.php b/includes/parser/CoreParserFunctions.php index fb3b2d677e..cd5e0a5665 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -12,6 +12,7 @@ class CoreParserFunctions { /** * @param $parser Parser + * @return void */ static function register( $parser ) { global $wgAllowDisplayTitle, $wgAllowSlowParserFunctions; diff --git a/includes/parser/CoreTagHooks.php b/includes/parser/CoreTagHooks.php index 86b66b9136..7d488c4b69 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -12,6 +12,7 @@ class CoreTagHooks { /** * @param $parser Parser + * @return void */ static function register( $parser ) { global $wgRawHtml; diff --git a/includes/parser/ParserOutput.php b/includes/parser/ParserOutput.php index a5d2a4bef3..2877dcb00f 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -286,6 +286,7 @@ class ParserOutput extends CacheTime { * @param $name string Title dbKey * @param $timestamp string MW timestamp of file creation (or false if non-existing) * @param $sha string base 36 SHA-1 of file (or false if non-existing) + * @return void */ function addImage( $name, $timestamp = null, $sha1 = null ) { $this->mImages[$name] = 1; @@ -299,6 +300,7 @@ class ParserOutput extends CacheTime { * @param $title Title * @param $page_id * @param $rev_id + * @return void */ function addTemplate( $title, $page_id, $rev_id ) { $ns = $title->getNamespace(); diff --git a/includes/resourceloader/ResourceLoader.php b/includes/resourceloader/ResourceLoader.php index aa6106336c..0d1eef02b3 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -521,6 +521,7 @@ class ResourceLoader { * @param $context ResourceLoaderContext * @param $mtime string TS_MW timestamp to use for last-modified * @param $private bool True iff response contains any private modules + * @return void */ protected function sendResponseHeaders( ResourceLoaderContext $context, $mtime, $private ) { global $wgResourceLoaderMaxage; diff --git a/includes/specials/SpecialImport.php b/includes/specials/SpecialImport.php index 36145041f9..a2380fbe7a 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -349,6 +349,7 @@ class ImportReporter extends ContextSource { * @param int $revisionCount * @param $successCount * @param $pageInfo + * @return void */ function reportPage( $title, $origTitle, $revisionCount, $successCount, $pageInfo ) { global $wgContLang; diff --git a/includes/specials/SpecialMergeHistory.php b/includes/specials/SpecialMergeHistory.php index 70e24d2cc4..19650da95b 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -39,6 +39,9 @@ class SpecialMergeHistory extends SpecialPage { parent::__construct( 'MergeHistory', 'mergehistory' ); } + /** + * @return void + */ private function loadRequestParams() { $request = $this->getRequest(); $this->mAction = $request->getVal( 'action' ); diff --git a/includes/specials/SpecialShortpages.php b/includes/specials/SpecialShortpages.php index c2157dffa2..c176f91364 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -56,6 +56,7 @@ class ShortPagesPage extends QueryPage { /** * @param $db DatabaseBase * @param $res + * @return void */ function preprocessResults( $db, $res ) { # There's no point doing a batch check if we aren't caching results; diff --git a/includes/specials/SpecialUserlogin.php b/includes/specials/SpecialUserlogin.php index 572cca5736..4882058f4d 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -656,6 +656,7 @@ class LoginForm extends SpecialPage { /** * Clear the login attempt throttle hit count for the (username,current IP) tuple. * @param $username string The user name + * @return void */ public static function clearLoginThrottle( $username ) { global $wgMemc, $wgRequest; diff --git a/maintenance/benchmarks/bench_delete_truncate.php b/maintenance/benchmarks/bench_delete_truncate.php index 377948b1b6..9fe9bea991 100644 --- a/maintenance/benchmarks/bench_delete_truncate.php +++ b/maintenance/benchmarks/bench_delete_truncate.php @@ -44,7 +44,8 @@ class BenchmarkDeleteTruncate extends Benchmarker { } /** - * @param $dbw DatabaseBase + * @param $dbw DatabaseBase + * @return void */ private function insertData( $dbw ) { $range = range( 0, 1024 ); @@ -56,14 +57,16 @@ class BenchmarkDeleteTruncate extends Benchmarker { } /** - * @param $dbw DatabaseBase + * @param $dbw DatabaseBase + * @return void */ private function delete( $dbw ) { $dbw->delete( 'text', '*', __METHOD__ ); } /** - * @param $dbw DatabaseBase + * @param $dbw DatabaseBase + * @return void */ private function truncate( $dbw ) { $test = $dbw->tableName( 'test' ); diff --git a/maintenance/locking/LockServerDaemon.php b/maintenance/locking/LockServerDaemon.php index 73868ecaf1..2cb6eb2e1a 100644 --- a/maintenance/locking/LockServerDaemon.php +++ b/maintenance/locking/LockServerDaemon.php @@ -101,6 +101,9 @@ class LockServerDaemon { : 10; } + /** + * @return void + */ protected function setupSocket() { if ( !function_exists( 'socket_create' ) ) { throw new Exception( "PHP sockets extension missing from PHP CLI mode." ); @@ -122,6 +125,9 @@ class LockServerDaemon { $this->startTime = time(); } + /** + * @return void + */ public function main() { // Setup socket and start listing $this->setupSocket(); @@ -348,6 +354,8 @@ class LockServerDaemon { /** * Clear locks for sessions that have been dead for a while + * + * @return void */ protected function purgeExpiredLocks() { $now = time(); @@ -362,6 +370,7 @@ class LockServerDaemon { /** * @param $key string * @param $session string + * @return void */ protected function set_sh_lock( $key, $session ) { if ( !isset( $this->shLocks[$key][$session] ) ) { @@ -374,6 +383,7 @@ class LockServerDaemon { /** * @param $key string * @param $session string + * @return void */ protected function set_ex_lock( $key, $session ) { if ( !isset( $this->exLocks[$key][$session] ) ) { @@ -386,6 +396,7 @@ class LockServerDaemon { /** * @param $key string * @param $session string + * @return void */ protected function unset_sh_lock( $key, $session ) { if ( isset( $this->shLocks[$key][$session] ) ) { @@ -404,6 +415,7 @@ class LockServerDaemon { /** * @param $key string * @param $session string + * @return void */ protected function unset_ex_lock( $key, $session ) { if ( isset( $this->exLocks[$key] ) && $this->exLocks[$key] === $session ) { diff --git a/thumb.php b/thumb.php index 758a05ace4..51f7ec60d6 100644 --- a/thumb.php +++ b/thumb.php @@ -29,6 +29,8 @@ wfLogProfilingData(); /** * Handle a thumbnail request via query parameters + * + * @return void */ function wfThumbHandleRequest() { $params = get_magic_quotes_gpc() @@ -40,6 +42,8 @@ function wfThumbHandleRequest() { /** * Handle a thumbnail request via thumbnail file URL + * + * @return void */ function wfThumbHandle404() { # lighttpd puts the original request in REQUEST_URI, while @@ -65,6 +69,7 @@ function wfThumbHandle404() { * Stream a thumbnail specified by parameters * * @param $params Array + * @return void */ function wfStreamThumb( array $params ) { wfProfileIn( __METHOD__ ); @@ -261,6 +266,7 @@ function wfExtractThumbParams( $uri ) { * * @param $status integer * @param $msg string + * @return void */ function wfThumbError( $status, $msg ) { global $wgShowHostnames; -- 2.20.1