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( public function __construct(
ApiMain $mainModule, ApiMain $mainModule,
$moduleName, string $moduleName,
UserNameUtils $userNameUtils UserNameUtils $userNameUtils
) { ) {
parent::__construct( $mainModule, $moduleName ); parent::__construct( $mainModule, $moduleName );

View file

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

View file

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