From a5c200a25bce0d0049576da56c8ee6783a54290f Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Thu, 12 Jan 2012 19:12:24 +0000 Subject: [PATCH] Kill "* @return void" --- 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, 21 insertions(+), 129 deletions(-) diff --git a/includes/HistoryBlob.php b/includes/HistoryBlob.php index f707b3f6a5..bf4103ed04 100644 --- a/includes/HistoryBlob.php +++ b/includes/HistoryBlob.php @@ -94,7 +94,6 @@ 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 e1c1d50b5a..2a6e5cb1b8 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -39,7 +39,6 @@ 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 a44a7d353d..ef724146dc 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -39,8 +39,7 @@ class ImagePage extends Article { } /** - * @param $file File: - * @return void + * @param $file File */ public function setFile( $file ) { $this->mPage->setFile( $file ); diff --git a/includes/Pager.php b/includes/Pager.php index a03a1d1d4c..ee7bde3b19 100644 --- a/includes/Pager.php +++ b/includes/Pager.php @@ -394,8 +394,6 @@ 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 fde135b891..153984b7d2 100644 --- a/includes/Preferences.php +++ b/includes/Preferences.php @@ -129,7 +129,6 @@ 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, @@ -456,7 +455,6 @@ class Preferences { * @param $user User * @param $context IContextSource * @param $defaultPreferences - * @return void */ static function skinPreferences( $user, IContextSource $context, &$defaultPreferences ) { ## Skin ##################################### @@ -532,7 +530,6 @@ 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 506ada96d1..6f45f202a9 100644 --- a/includes/SquidPurgeClient.php +++ b/includes/SquidPurgeClient.php @@ -340,7 +340,6 @@ 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 2f285bb55a..e0348672cf 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -261,7 +261,6 @@ 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 969600897c..72717c2586 100644 --- a/includes/TitleArray.php +++ b/includes/TitleArray.php @@ -53,7 +53,6 @@ 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 c5ba0b2b35..89d93744c5 100644 --- a/includes/UserArray.php +++ b/includes/UserArray.php @@ -60,7 +60,6 @@ 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 55ff89ed8c..8153eaed78 100644 --- a/includes/Wiki.php +++ b/includes/Wiki.php @@ -145,8 +145,6 @@ 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 83f73e0a69..4e9e3f5596 100644 --- a/includes/WikiPage.php +++ b/includes/WikiPage.php @@ -367,7 +367,6 @@ 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' ) { @@ -622,7 +621,6 @@ 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 ); @@ -705,7 +703,6 @@ 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 ade9f1f3fd..527a0f075e 100644 --- a/includes/api/ApiImport.php +++ b/includes/api/ApiImport.php @@ -181,7 +181,6 @@ 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 903f144fe4..127d359279 100644 --- a/includes/api/ApiQueryAllLinks.php +++ b/includes/api/ApiQueryAllLinks.php @@ -49,7 +49,6 @@ 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 ca344f7337..fec4ed4034 100644 --- a/includes/api/ApiQueryAllimages.php +++ b/includes/api/ApiQueryAllimages.php @@ -61,7 +61,6 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet - * @return void */ public function executeGenerator( $resultPageSet ) { if ( $resultPageSet->isResolvingRedirects() ) { @@ -73,7 +72,6 @@ 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 e003ee9115..e429a37997 100644 --- a/includes/api/ApiQueryAllpages.php +++ b/includes/api/ApiQueryAllpages.php @@ -45,7 +45,6 @@ class ApiQueryAllpages extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet - * @return void */ public function executeGenerator( $resultPageSet ) { if ( $resultPageSet->isResolvingRedirects() ) { @@ -57,7 +56,6 @@ 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 381ef550d3..3dbc437a33 100644 --- a/includes/api/ApiQueryBacklinks.php +++ b/includes/api/ApiQueryBacklinks.php @@ -119,7 +119,6 @@ class ApiQueryBacklinks extends ApiQueryGeneratorBase { /** * @param $resultPageSet ApiPageSet - * @return void */ private function prepareFirstQuery( $resultPageSet = null ) { /* SELECT page_id, page_title, page_namespace, page_is_redirect @@ -161,7 +160,6 @@ 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 @@ -223,7 +221,6 @@ 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 4fe82de0cb..add74179fb 100644 --- a/includes/api/ApiQueryBase.php +++ b/includes/api/ApiQueryBase.php @@ -505,7 +505,6 @@ 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 4b19b7e86e..1beadb398d 100644 --- a/includes/api/ApiQueryCategoryMembers.php +++ b/includes/api/ApiQueryCategoryMembers.php @@ -49,7 +49,6 @@ 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 93c71e2fce..fca4a55731 100644 --- a/includes/api/ApiQueryExtLinksUsage.php +++ b/includes/api/ApiQueryExtLinksUsage.php @@ -47,7 +47,6 @@ 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 feda1779cd..ff1765074c 100644 --- a/includes/api/ApiQueryIWBacklinks.php +++ b/includes/api/ApiQueryIWBacklinks.php @@ -45,7 +45,6 @@ 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 f0d0faa350..a480c1b810 100644 --- a/includes/api/ApiQueryInfo.php +++ b/includes/api/ApiQueryInfo.php @@ -51,7 +51,6 @@ 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 1573494499..c98e8da4cf 100644 --- a/includes/api/ApiQueryLangBacklinks.php +++ b/includes/api/ApiQueryLangBacklinks.php @@ -45,7 +45,6 @@ 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 44cc1d3266..eba16ea1e8 100644 --- a/includes/api/ApiQueryProtectedTitles.php +++ b/includes/api/ApiQueryProtectedTitles.php @@ -45,7 +45,6 @@ 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 2e9e2dd500..2245f0000c 100644 --- a/includes/api/ApiQueryRandom.php +++ b/includes/api/ApiQueryRandom.php @@ -46,12 +46,11 @@ class ApiQueryRandom extends ApiQueryGeneratorBase { } /** - * @param $randstr - * @param $limit - * @param $namespace + * @param $randstr + * @param $limit + * @param $namespace * @param $resultPageSet ApiPageSet - * @param $redirect - * @return void + * @param $redirect */ protected function prepareQuery( $randstr, $limit, $namespace, &$resultPageSet, $redirect ) { $this->resetQueryParams(); @@ -101,7 +100,6 @@ 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 40aac0505c..8e04e88c10 100644 --- a/includes/api/ApiQuerySearch.php +++ b/includes/api/ApiQuerySearch.php @@ -45,7 +45,6 @@ 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 ea56fcd973..cbe50dec99 100644 --- a/includes/api/ApiQueryWatchlist.php +++ b/includes/api/ApiQueryWatchlist.php @@ -50,7 +50,6 @@ 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 506944f0b3..2fad13720f 100644 --- a/includes/api/ApiQueryWatchlistRaw.php +++ b/includes/api/ApiQueryWatchlistRaw.php @@ -46,7 +46,6 @@ 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 d3558184b8..ab7d8de1af 100644 --- a/includes/cache/FileCacheBase.php +++ b/includes/cache/FileCacheBase.php @@ -151,7 +151,6 @@ abstract class FileCacheBase { /** * Clear the cache for this page - * @return void */ public function clearCache() { wfSuppressWarnings(); @@ -162,7 +161,6 @@ abstract class FileCacheBase { /** * Create parent directors of $this->cachePath() - * @return void */ protected function checkCacheDirs() { wfMkdirParents( dirname( $this->cachePath() ), null, __METHOD__ ); @@ -198,7 +196,6 @@ 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 b846e41931..8866ba3652 100644 --- a/includes/cache/HTMLFileCache.php +++ b/includes/cache/HTMLFileCache.php @@ -92,7 +92,6 @@ 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 d47b5b5e24..af620e0c8f 100644 --- a/includes/cache/SquidUpdate.php +++ b/includes/cache/SquidUpdate.php @@ -99,7 +99,6 @@ 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 bd0895cfb2..5a8232e623 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,8 +129,7 @@ class CloneDatabase { /** * Change the table prefix on all open DB connections/ * - * @param $prefix - * @return void + * @param $prefix */ public static function changePrefix( $prefix ) { global $wgDBprefix; @@ -139,18 +138,16 @@ class CloneDatabase { } /** - * @param $lb LoadBalancer - * @param $prefix - * @return void + * @param $lb LoadBalancer + * @param $prefix */ public static function changeLBPrefix( $lb, $prefix ) { $lb->forEachOpenConnection( array( 'CloneDatabase', 'changeDBPrefix' ), array( $prefix ) ); } /** - * @param $db DatabaseBase - * @param $prefix - * @return void + * @param $db DatabaseBase + * @param $prefix */ public static function changeDBPrefix( $db, $prefix ) { $db->tablePrefix( $prefix ); diff --git a/includes/db/Database.php b/includes/db/Database.php index 5c186df3b3..c94f5ce3ac 100644 --- a/includes/db/Database.php +++ b/includes/db/Database.php @@ -3052,7 +3052,6 @@ 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 ) { @@ -3068,7 +3067,6 @@ 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 cd9b2bba4c..1a5102043e 100644 --- a/includes/filerepo/FileRepo.php +++ b/includes/filerepo/FileRepo.php @@ -126,7 +126,6 @@ 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 @@ -718,8 +717,7 @@ 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 $pairs array List of files to delete - * @return void + * @param $files array List of files to delete */ public function cleanupBatch( $files ) { $operations = array(); @@ -1217,7 +1215,6 @@ class FileRepo { * May use either the database or the filesystem. * * @param $callback Array|string - * @return void */ public function enumFiles( $callback ) { $this->enumFilesInStorage( $callback ); @@ -1228,7 +1225,6 @@ 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 92d8f5d076..a5607dff57 100644 --- a/includes/filerepo/LocalRepo.php +++ b/includes/filerepo/LocalRepo.php @@ -261,7 +261,6 @@ 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 d9710989cf..958c56e5d1 100644 --- a/includes/filerepo/backend/FileBackend.php +++ b/includes/filerepo/backend/FileBackend.php @@ -515,7 +515,6 @@ 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 ); @@ -1164,8 +1163,6 @@ 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 24277b114e..0b972351b8 100644 --- a/includes/filerepo/backend/FileBackendGroup.php +++ b/includes/filerepo/backend/FileBackendGroup.php @@ -32,8 +32,6 @@ class FileBackendGroup { /** * Destroy the singleton instance - * - * @return void */ public static function destroySingleton() { self::$instance = null; @@ -41,8 +39,6 @@ class FileBackendGroup { /** * Register file backends from the global variables - * - * @return void */ protected function initFromGlobals() { global $wgLocalFileRepo, $wgForeignFileRepos, $wgFileBackends; @@ -93,7 +89,6 @@ 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 11fe865b56..858c9ea426 100644 --- a/includes/filerepo/backend/FileOp.php +++ b/includes/filerepo/backend/FileOp.php @@ -54,8 +54,6 @@ abstract class FileOp { /** * Disable file backups for this operation - * - * @return void */ final protected function disableBackups() { $this->useBackups = false; @@ -65,8 +63,6 @@ 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; @@ -504,7 +500,6 @@ 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 ac9c0791d6..331a7add6d 100644 --- a/includes/filerepo/backend/lockmanager/DBLockManager.php +++ b/includes/filerepo/backend/lockmanager/DBLockManager.php @@ -281,7 +281,6 @@ 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 e501a0f616..a97bc2d2bc 100644 --- a/includes/filerepo/backend/lockmanager/LockManagerGroup.php +++ b/includes/filerepo/backend/lockmanager/LockManagerGroup.php @@ -27,8 +27,6 @@ class LockManagerGroup { /** * Register lock managers from the global variables - * - * @return void */ protected function initFromGlobals() { global $wgLockManagers; @@ -40,7 +38,6 @@ 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 67345a686e..b130d8cc99 100644 --- a/includes/filerepo/file/File.php +++ b/includes/filerepo/file/File.php @@ -1694,8 +1694,7 @@ abstract class File { } /** - * @param $from - * @return void + * @param $from */ function redirectedFrom( $from ) { $this->redirected = $from; diff --git a/includes/filerepo/file/TempFSFile.php b/includes/filerepo/file/TempFSFile.php index bee00fa784..ab9402b096 100644 --- a/includes/filerepo/file/TempFSFile.php +++ b/includes/filerepo/file/TempFSFile.php @@ -66,7 +66,6 @@ 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 ) ) { @@ -76,8 +75,6 @@ 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 5dbeb8f852..8e6fd7435f 100644 --- a/includes/media/GIFMetadataExtractor.php +++ b/includes/media/GIFMetadataExtractor.php @@ -233,7 +233,6 @@ 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 de6b1c0525..0719b500a2 100644 --- a/includes/media/MediaTransformOutput.php +++ b/includes/media/MediaTransformOutput.php @@ -50,7 +50,6 @@ 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 cd5e0a5665..fb3b2d677e 100644 --- a/includes/parser/CoreParserFunctions.php +++ b/includes/parser/CoreParserFunctions.php @@ -12,7 +12,6 @@ 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 7d488c4b69..86b66b9136 100644 --- a/includes/parser/CoreTagHooks.php +++ b/includes/parser/CoreTagHooks.php @@ -12,7 +12,6 @@ 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 2877dcb00f..a5d2a4bef3 100644 --- a/includes/parser/ParserOutput.php +++ b/includes/parser/ParserOutput.php @@ -286,7 +286,6 @@ 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; @@ -300,7 +299,6 @@ 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 0d1eef02b3..aa6106336c 100644 --- a/includes/resourceloader/ResourceLoader.php +++ b/includes/resourceloader/ResourceLoader.php @@ -521,7 +521,6 @@ 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 a2380fbe7a..36145041f9 100644 --- a/includes/specials/SpecialImport.php +++ b/includes/specials/SpecialImport.php @@ -349,7 +349,6 @@ 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 19650da95b..70e24d2cc4 100644 --- a/includes/specials/SpecialMergeHistory.php +++ b/includes/specials/SpecialMergeHistory.php @@ -39,9 +39,6 @@ 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 c176f91364..c2157dffa2 100644 --- a/includes/specials/SpecialShortpages.php +++ b/includes/specials/SpecialShortpages.php @@ -56,7 +56,6 @@ 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 4882058f4d..572cca5736 100644 --- a/includes/specials/SpecialUserlogin.php +++ b/includes/specials/SpecialUserlogin.php @@ -656,7 +656,6 @@ 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 9fe9bea991..377948b1b6 100644 --- a/maintenance/benchmarks/bench_delete_truncate.php +++ b/maintenance/benchmarks/bench_delete_truncate.php @@ -44,8 +44,7 @@ class BenchmarkDeleteTruncate extends Benchmarker { } /** - * @param $dbw DatabaseBase - * @return void + * @param $dbw DatabaseBase */ private function insertData( $dbw ) { $range = range( 0, 1024 ); @@ -57,16 +56,14 @@ class BenchmarkDeleteTruncate extends Benchmarker { } /** - * @param $dbw DatabaseBase - * @return void + * @param $dbw DatabaseBase */ private function delete( $dbw ) { $dbw->delete( 'text', '*', __METHOD__ ); } /** - * @param $dbw DatabaseBase - * @return void + * @param $dbw DatabaseBase */ private function truncate( $dbw ) { $test = $dbw->tableName( 'test' ); diff --git a/maintenance/locking/LockServerDaemon.php b/maintenance/locking/LockServerDaemon.php index 2cb6eb2e1a..73868ecaf1 100644 --- a/maintenance/locking/LockServerDaemon.php +++ b/maintenance/locking/LockServerDaemon.php @@ -101,9 +101,6 @@ class LockServerDaemon { : 10; } - /** - * @return void - */ protected function setupSocket() { if ( !function_exists( 'socket_create' ) ) { throw new Exception( "PHP sockets extension missing from PHP CLI mode." ); @@ -125,9 +122,6 @@ class LockServerDaemon { $this->startTime = time(); } - /** - * @return void - */ public function main() { // Setup socket and start listing $this->setupSocket(); @@ -354,8 +348,6 @@ class LockServerDaemon { /** * Clear locks for sessions that have been dead for a while - * - * @return void */ protected function purgeExpiredLocks() { $now = time(); @@ -370,7 +362,6 @@ class LockServerDaemon { /** * @param $key string * @param $session string - * @return void */ protected function set_sh_lock( $key, $session ) { if ( !isset( $this->shLocks[$key][$session] ) ) { @@ -383,7 +374,6 @@ class LockServerDaemon { /** * @param $key string * @param $session string - * @return void */ protected function set_ex_lock( $key, $session ) { if ( !isset( $this->exLocks[$key][$session] ) ) { @@ -396,7 +386,6 @@ class LockServerDaemon { /** * @param $key string * @param $session string - * @return void */ protected function unset_sh_lock( $key, $session ) { if ( isset( $this->shLocks[$key][$session] ) ) { @@ -415,7 +404,6 @@ 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 51f7ec60d6..758a05ace4 100644 --- a/thumb.php +++ b/thumb.php @@ -29,8 +29,6 @@ wfLogProfilingData(); /** * Handle a thumbnail request via query parameters - * - * @return void */ function wfThumbHandleRequest() { $params = get_magic_quotes_gpc() @@ -42,8 +40,6 @@ function wfThumbHandleRequest() { /** * Handle a thumbnail request via thumbnail file URL - * - * @return void */ function wfThumbHandle404() { # lighttpd puts the original request in REQUEST_URI, while @@ -69,7 +65,6 @@ function wfThumbHandle404() { * Stream a thumbnail specified by parameters * * @param $params Array - * @return void */ function wfStreamThumb( array $params ) { wfProfileIn( __METHOD__ ); @@ -266,7 +261,6 @@ function wfExtractThumbParams( $uri ) { * * @param $status integer * @param $msg string - * @return void */ function wfThumbError( $status, $msg ) { global $wgShowHostnames; -- 2.20.1