Add return type hint to functions in ServiceWiring.php

This is a common pattern for serivce wiring functions

Change-Id: I4b4fad8ac28108e53300231b3812426e82ccf84f
This commit is contained in:
Umherirrender 2024-01-31 20:08:46 +01:00
parent 2222799fa4
commit a6c3d2a16d

View file

@ -6,13 +6,13 @@ use MediaWiki\Logger\LoggerFactory;
use MediaWiki\MediaWikiServices;
return [
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ) {
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ): OATHAuthModuleRegistry {
return new OATHAuthModuleRegistry(
$services->getDBLoadBalancerFactory(),
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
);
},
'OATHUserRepository' => static function ( MediaWikiServices $services ) {
'OATHUserRepository' => static function ( MediaWikiServices $services ): OATHUserRepository {
return new OATHUserRepository(
$services->getDBLoadBalancerFactory(),
new HashBagOStuff( [