diff options
author | Reedy <reedy@wikimedia.org> | 2023-08-22 19:46:48 +0100 |
---|---|---|
committer | Reedy <reedy@wikimedia.org> | 2023-08-22 19:38:38 +0000 |
commit | a1144dc7c5a0145cc545089b4702bf3c472200b6 (patch) | |
tree | 2b836ab47cc105da56cb200ed87585677cdfb9bf /includes/SiteStats/SiteStats.php | |
parent | d3dabf0cca9504ae1e5d2ba01778a31dcdd46fc0 (diff) | |
download | mediawikicore-a1144dc7c5a0145cc545089b4702bf3c472200b6.tar.gz mediawikicore-a1144dc7c5a0145cc545089b4702bf3c472200b6.zip |
mark various anonymous functions as static
Change-Id: Iefe896769359f0d32e52bf20aa03e1c3715d5074
Diffstat (limited to 'includes/SiteStats/SiteStats.php')
-rw-r--r-- | includes/SiteStats/SiteStats.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/SiteStats/SiteStats.php b/includes/SiteStats/SiteStats.php index 94541b639d5f..d333ee227cad 100644 --- a/includes/SiteStats/SiteStats.php +++ b/includes/SiteStats/SiteStats.php @@ -153,7 +153,7 @@ class SiteStats { return $cache->getWithSetCallback( $cache->makeKey( 'SiteStats', 'groupcounts', $group ), $cache::TTL_HOUR, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $group, $fname ) { + static function ( $oldValue, &$ttl, array &$setOpts ) use ( $group, $fname ) { $dbr = self::getLB()->getConnectionRef( DB_REPLICA ); $setOpts += Database::getCacheSetOptions( $dbr ); return (int)$dbr->newSelectQueryBuilder() @@ -205,7 +205,7 @@ class SiteStats { return $cache->getWithSetCallback( $cache->makeKey( 'SiteStats', 'page-in-namespace', $ns ), $cache::TTL_HOUR, - function ( $oldValue, &$ttl, array &$setOpts ) use ( $ns, $fname ) { + static function ( $oldValue, &$ttl, array &$setOpts ) use ( $ns, $fname ) { $dbr = self::getLB()->getConnectionRef( DB_REPLICA ); $setOpts += Database::getCacheSetOptions( $dbr ); |