mirror of
https://gerrit.wikimedia.org/r/mediawiki/skins/MinervaNeue
synced 2024-11-23 22:03:39 +00:00
Remove unused service UserOptionsLookup from Definitions
Also use typed properties instead of @var types. And rename $factory to $specialPageFactory. Change-Id: I7fe5a8ad96e619019c1bbbb9143ad09174a9de5e
This commit is contained in:
parent
86fb2a8d18
commit
0dbe920285
|
@ -26,7 +26,6 @@ use MediaWiki\Minerva\Menu\Entries\SingleMenuEntry;
|
|||
use MediaWiki\SpecialPage\SpecialPage;
|
||||
use MediaWiki\SpecialPage\SpecialPageFactory;
|
||||
use MediaWiki\Title\Title;
|
||||
use MediaWiki\User\Options\UserOptionsLookup;
|
||||
use MediaWiki\User\UserIdentity;
|
||||
use Message;
|
||||
|
||||
|
@ -35,42 +34,23 @@ use Message;
|
|||
*/
|
||||
final class Definitions {
|
||||
|
||||
/**
|
||||
* @var UserIdentity
|
||||
*/
|
||||
private $user;
|
||||
|
||||
/**
|
||||
* @var IContextSource
|
||||
*/
|
||||
private $context;
|
||||
|
||||
/**
|
||||
* @var SpecialPageFactory
|
||||
*/
|
||||
private $specialPageFactory;
|
||||
|
||||
/**
|
||||
* @var UserOptionsLookup
|
||||
*/
|
||||
private $userOptionsLookup;
|
||||
private UserIdentity $user;
|
||||
private IContextSource $context;
|
||||
private SpecialPageFactory $specialPageFactory;
|
||||
|
||||
/**
|
||||
* Initialize definitions helper class
|
||||
*
|
||||
* @param IContextSource $context
|
||||
* @param SpecialPageFactory $factory
|
||||
* @param UserOptionsLookup $userOptionsLookup
|
||||
* @param SpecialPageFactory $specialPageFactory
|
||||
*/
|
||||
public function __construct(
|
||||
IContextSource $context,
|
||||
SpecialPageFactory $factory,
|
||||
UserOptionsLookup $userOptionsLookup
|
||||
SpecialPageFactory $specialPageFactory
|
||||
) {
|
||||
$this->user = $context->getUser();
|
||||
$this->context = $context;
|
||||
$this->specialPageFactory = $factory;
|
||||
$this->userOptionsLookup = $userOptionsLookup;
|
||||
$this->specialPageFactory = $specialPageFactory;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -41,8 +41,7 @@ return [
|
|||
'Minerva.Menu.Definitions' => static function ( MediaWikiServices $services ): Definitions {
|
||||
return new Definitions(
|
||||
RequestContext::getMain(),
|
||||
$services->getSpecialPageFactory(),
|
||||
$services->getUserOptionsLookup()
|
||||
$services->getSpecialPageFactory()
|
||||
);
|
||||
},
|
||||
'Minerva.Menu.UserMenuDirector' => static function ( MediaWikiServices $services ): UserMenuDirector {
|
||||
|
|
Loading…
Reference in a new issue