mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/OATHAuth
synced 2024-11-13 18:16:56 +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;
|
use MediaWiki\MediaWikiServices;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ) {
|
'OATHAuthModuleRegistry' => static function ( MediaWikiServices $services ): OATHAuthModuleRegistry {
|
||||||
return new OATHAuthModuleRegistry(
|
return new OATHAuthModuleRegistry(
|
||||||
$services->getDBLoadBalancerFactory(),
|
$services->getDBLoadBalancerFactory(),
|
||||||
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
|
ExtensionRegistry::getInstance()->getAttribute( 'OATHAuthModules' ),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
'OATHUserRepository' => static function ( MediaWikiServices $services ) {
|
'OATHUserRepository' => static function ( MediaWikiServices $services ): OATHUserRepository {
|
||||||
return new OATHUserRepository(
|
return new OATHUserRepository(
|
||||||
$services->getDBLoadBalancerFactory(),
|
$services->getDBLoadBalancerFactory(),
|
||||||
new HashBagOStuff( [
|
new HashBagOStuff( [
|
||||||
|
|
Loading…
Reference in a new issue