mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-11 17:01:13 +00:00
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:
parent
2222799fa4
commit
a6c3d2a16d
|
@ -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( [
|
||||
|
|
Loading…
Reference in a new issue