Skip to content
This repository was archived by the owner on Nov 2, 2025. It is now read-only.

Commit e7b01a8

Browse files
Use property promotion and readonly properties
1 parent b45ec8d commit e7b01a8

File tree

1 file changed

+9
-22
lines changed

1 file changed

+9
-22
lines changed

includes/HookHandlers/Main.php

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -22,31 +22,18 @@
2222

2323
class Main {
2424

25-
private Config $config;
26-
private JobQueueGroupFactory $jobQueueGroupFactory;
27-
private LanguageNameUtils $languageNameUtils;
28-
private MachineTranslationLanguageFetcher $machineTranslationLanguageFetcher;
29-
private MachineTranslationUtils $machineTranslationUtils;
30-
private MessageLocalizer $messageLocalizer;
31-
private TitleFactory $titleFactory;
32-
private WikiPageFactory $wikiPageFactory;
25+
private readonly Config $config;
26+
private readonly MessageLocalizer $messageLocalizer;
3327

3428
public function __construct(
35-
ConfigFactory $configFactory,
36-
JobQueueGroupFactory $jobQueueGroupFactory,
37-
LanguageNameUtils $languageNameUtils,
38-
MachineTranslationLanguageFetcher $machineTranslationLanguageFetcher,
39-
MachineTranslationUtils $machineTranslationUtils,
40-
TitleFactory $titleFactory,
41-
WikiPageFactory $wikiPageFactory
29+
ConfigFactory $ConfigFactory,
30+
private readonly JobQueueGroupFactory $jobQueueGroupFactory,
31+
private readonly LanguageNameUtils $languageNameUtils,
32+
private readonly MachineTranslationLanguageFetcher $machineTranslationLanguageFetcher,
33+
private readonly MachineTranslationUtils $machineTranslationUtils,
34+
private readonly TitleFactory $titleFactory,
35+
private readonly WikiPageFactory $wikiPageFactory
4236
) {
43-
$this->jobQueueGroupFactory = $jobQueueGroupFactory;
44-
$this->languageNameUtils = $languageNameUtils;
45-
$this->machineTranslationLanguageFetcher = $machineTranslationLanguageFetcher;
46-
$this->machineTranslationUtils = $machineTranslationUtils;
47-
$this->titleFactory = $titleFactory;
48-
$this->wikiPageFactory = $wikiPageFactory;
49-
5037
$this->config = $configFactory->makeConfig( 'MachineTranslation' );
5138
$this->messageLocalizer = RequestContext::getMain();
5239
}

0 commit comments

Comments
 (0)