Use type-declaration on api module constructor

Parent class constructor gets type-declaration in 1145328459
Remove simple doc-blocks without further information

Change-Id: I0ab283cd0510d8e85e93752a5ee7d65320a4ec2b
This commit is contained in:
Umherirrender 2024-10-25 19:14:31 +02:00
parent f5173fbd78
commit 2edd88a166
3 changed files with 13 additions and 34 deletions

View file

@ -19,7 +19,7 @@ class ApiEchoCreateEvent extends ApiBase {
public function __construct(
ApiMain $mainModule,
$moduleName,
string $moduleName,
UserNameUtils $userNameUtils
) {
parent::__construct( $mainModule, $moduleName );

View file

@ -12,16 +12,10 @@ use Wikimedia\ParamValidator\ParamValidator;
class ApiEchoMute extends ApiBase {
/** @var CentralIdLookup */
private $centralIdLookup;
private CentralIdLookup $centralIdLookup;
private LinkBatchFactory $linkBatchFactory;
private UserOptionsManager $userOptionsManager;
/** @var LinkBatchFactory */
private $linkBatchFactory;
/** @var UserOptionsManager */
private $userOptionsManager;
/** @var string[][] */
private const MUTE_LISTS = [
'user' => [
'pref' => 'echo-notifications-blacklist',
@ -33,16 +27,9 @@ class ApiEchoMute extends ApiBase {
],
];
/**
* @param ApiMain $main
* @param string $action
* @param CentralIdLookup $centralIdLookup
* @param LinkBatchFactory $linkBatchFactory
* @param UserOptionsManager $userOptionsManager
*/
public function __construct(
ApiMain $main,
$action,
string $action,
CentralIdLookup $centralIdLookup,
LinkBatchFactory $linkBatchFactory,
UserOptionsManager $userOptionsManager

View file

@ -26,23 +26,15 @@ class ApiEchoUnreadNotificationPages extends ApiQueryBase {
*/
protected $crossWikiSummary = false;
/**
* @var PageStore
*/
private $pageStore;
private PageStore $pageStore;
private TitleFactory $titleFactory;
/**
* @var TitleFactory
*/
private $titleFactory;
/**
* @param ApiQuery $query
* @param string $moduleName
* @param PageStore $pageStore
* @param TitleFactory $titleFactory
*/
public function __construct( $query, $moduleName, PageStore $pageStore, TitleFactory $titleFactory ) {
public function __construct(
ApiQuery $query,
string $moduleName,
PageStore $pageStore,
TitleFactory $titleFactory
) {
parent::__construct( $query, $moduleName, 'unp' );
$this->pageStore = $pageStore;
$this->titleFactory = $titleFactory;