diff options
author | Umherirrender <umherirrender_de.wp@web.de> | 2024-10-16 20:58:33 +0200 |
---|---|---|
committer | Umherirrender <umherirrender_de.wp@web.de> | 2024-10-16 20:58:33 +0200 |
commit | e662614f95228614e575f6148678c35cdbc19f58 (patch) | |
tree | b6786bcf09229a221b2dc086c6806350012df13d /includes/libs/objectcache | |
parent | 544a959d5b8fe05bdb056e72279da118a1243ca8 (diff) | |
download | mediawikicore-e662614f95228614e575f6148678c35cdbc19f58.tar.gz mediawikicore-e662614f95228614e575f6148678c35cdbc19f58.zip |
Use explicit nullable type on parameter arguments
Implicitly marking parameter $... as nullable is deprecated in php8.4,
the explicit nullable type must be used instead
Created with autofix from Ide15839e98a6229c22584d1c1c88c690982e1d7a
Break one long line in SpecialPage.php
Bug: T376276
Change-Id: I807257b2ba1ab2744ab74d9572c9c3d3ac2a968e
Diffstat (limited to 'includes/libs/objectcache')
-rw-r--r-- | includes/libs/objectcache/BagOStuff.php | 4 | ||||
-rw-r--r-- | includes/libs/objectcache/CachedBagOStuff.php | 4 | ||||
-rw-r--r-- | includes/libs/objectcache/MediumSpecificBagOStuff.php | 4 | ||||
-rw-r--r-- | includes/libs/objectcache/MultiWriteBagOStuff.php | 4 | ||||
-rw-r--r-- | includes/libs/objectcache/WANObjectCache.php | 6 |
5 files changed, 11 insertions, 11 deletions
diff --git a/includes/libs/objectcache/BagOStuff.php b/includes/libs/objectcache/BagOStuff.php index 500134705f59..a2337caa8e82 100644 --- a/includes/libs/objectcache/BagOStuff.php +++ b/includes/libs/objectcache/BagOStuff.php @@ -394,9 +394,9 @@ abstract class BagOStuff implements */ abstract public function deleteObjectsExpiringBefore( $timestamp, - callable $progress = null, + ?callable $progress = null, $limit = INF, - string $tag = null + ?string $tag = null ); /** diff --git a/includes/libs/objectcache/CachedBagOStuff.php b/includes/libs/objectcache/CachedBagOStuff.php index 3e209ac7de80..e6f6e06dc14f 100644 --- a/includes/libs/objectcache/CachedBagOStuff.php +++ b/includes/libs/objectcache/CachedBagOStuff.php @@ -187,9 +187,9 @@ class CachedBagOStuff extends BagOStuff { public function deleteObjectsExpiringBefore( $timestamp, - callable $progress = null, + ?callable $progress = null, $limit = INF, - string $tag = null + ?string $tag = null ) { $this->procCache->deleteObjectsExpiringBefore( $timestamp, $progress, $limit, $tag ); diff --git a/includes/libs/objectcache/MediumSpecificBagOStuff.php b/includes/libs/objectcache/MediumSpecificBagOStuff.php index 02772457a2ac..1eaf24bb006c 100644 --- a/includes/libs/objectcache/MediumSpecificBagOStuff.php +++ b/includes/libs/objectcache/MediumSpecificBagOStuff.php @@ -657,9 +657,9 @@ abstract class MediumSpecificBagOStuff extends BagOStuff { public function deleteObjectsExpiringBefore( $timestamp, - callable $progress = null, + ?callable $progress = null, $limit = INF, - string $tag = null + ?string $tag = null ) { return false; } diff --git a/includes/libs/objectcache/MultiWriteBagOStuff.php b/includes/libs/objectcache/MultiWriteBagOStuff.php index 3d9233836703..9948a7e26208 100644 --- a/includes/libs/objectcache/MultiWriteBagOStuff.php +++ b/includes/libs/objectcache/MultiWriteBagOStuff.php @@ -307,9 +307,9 @@ class MultiWriteBagOStuff extends BagOStuff { public function deleteObjectsExpiringBefore( $timestamp, - callable $progress = null, + ?callable $progress = null, $limit = INF, - string $tag = null + ?string $tag = null ) { $ret = false; foreach ( $this->caches as $cache ) { diff --git a/includes/libs/objectcache/WANObjectCache.php b/includes/libs/objectcache/WANObjectCache.php index 3ea23c95a81a..fe6e7bb8f179 100644 --- a/includes/libs/objectcache/WANObjectCache.php +++ b/includes/libs/objectcache/WANObjectCache.php @@ -1908,7 +1908,7 @@ class WANObjectCache implements * @param string|null $route Routing prefix (optional) * @return string[] Order-corresponding list of sister keys */ - private function makeSisterKeys( array $baseKeys, string $type, string $route = null ) { + private function makeSisterKeys( array $baseKeys, string $type, ?string $route = null ) { $sisterKeys = []; foreach ( $baseKeys as $baseKey ) { $sisterKeys[] = $this->makeSisterKey( $baseKey, $type, $route ); @@ -1927,7 +1927,7 @@ class WANObjectCache implements * @param string|null $route Routing prefix (optional) * @return string Sister key */ - private function makeSisterKey( string $baseKey, string $typeChar, string $route = null ) { + private function makeSisterKey( string $baseKey, string $typeChar, ?string $route = null ) { if ( $this->coalesceScheme === self::SCHEME_HASH_STOP ) { // Key style: "WANCache:<base key>|#|<character>" $sisterKey = 'WANCache:' . $baseKey . '|#|' . $typeChar; @@ -3013,7 +3013,7 @@ class WANObjectCache implements * @param array|null &$purge Unwrapped purge value array [returned] * @return string Wrapped purge value; format is "PURGED:<timestamp>:<holdoff>" */ - private function makeCheckPurgeValue( float $timestamp, int $holdoff, array &$purge = null ) { + private function makeCheckPurgeValue( float $timestamp, int $holdoff, ?array &$purge = null ) { $normalizedTime = (int)$timestamp; // Purge array that matches what parsePurgeValue() would have returned $purge = [ self::PURGE_TIME => (float)$normalizedTime, self::PURGE_HOLDOFF => $holdoff ]; |