Go to file
Matěj Suchánek 49edc86a78 Split VariableGenerator::addEditVars
This method actually consists of two: add derived vars, and initialize
content vars. The former part depends on no parameters of this method.
On the other hand, the latter part combines multiple implementations
for some of the content variables using branching.

The branching is a dirty workaround and inferior to the GRASP principle:
"When related alternatives or behaviors vary by type, assign
responsibility for the behavior to the types for which the behavior
varies."
In other words, the callers (extensions) should be responsible for
choosing the initialization strategy themselves, instead of letting
VariableGenerator figure it out.

As the first step, split the former part to a separate method.
For now, it will be implicitly called by ::addEditVars.

Change-Id: I5ff00dbdbf29ec54eabfd95c44a4fd7f713969f5
2023-07-05 14:58:32 +00:00
.phan UserRenameHandler: Use core RenameUser classes 2023-03-08 12:53:43 +02:00
db_patches Use actor table in AbuseFilter 2023-03-22 14:01:29 +01:00
i18n Localisation updates from https://translatewiki.net. 2023-07-05 08:26:36 +02:00
includes Split VariableGenerator::addEditVars 2023-07-05 14:58:32 +00:00
maintenance Merge "Mark protected stuff in classes with no subclasses as private" 2023-06-23 18:35:48 +00:00
modules Various code style clean-ups 2023-06-23 12:32:12 +02:00
tests Split VariableGenerator::addEditVars 2023-07-05 14:58:32 +00:00
.eslintrc.json build: Update linters 2022-03-17 22:19:08 +00:00
.gitignore Add config for Selenium and basic tests 2019-09-17 16:23:07 +00:00
.gitreview
.phpcs.xml Merge "Use FauxRequest::setUpload in AbuseFilterUploadTestTrait::doUpload" 2021-05-15 12:22:10 +00:00
.stylelintrc.json
AbuseFilter.alias.php [i18n] Translate BlockedExternalDomains to Czech 2023-07-02 21:27:29 +02:00
CODE_OF_CONDUCT.md build: Updating mediawiki/phan-taint-check-plugin to 1.4.0 2018-09-01 05:29:54 +00:00
composer.json build: Updating dependencies 2023-04-26 22:41:38 +00:00
COPYING
extension.json Restrict view of "abusefilterblockeddomainhit" logs to "*" 2023-06-27 20:16:00 +02:00
Gruntfile.js build: Update linters 2022-03-17 22:19:08 +00:00
package-lock.json build: Updating npm dependencies 2023-05-20 22:38:40 +00:00
package.json build: Updating npm dependencies 2023-05-20 22:38:40 +00:00