mediawiki-extensions-AbuseF.../includes/VariableGenerator
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
..
RCVariableGenerator.php Mark protected stuff in classes with no subclasses as private 2023-06-23 12:28:06 +02:00
RunVariableGenerator.php Mark protected stuff in classes with no subclasses as private 2023-06-23 12:28:06 +02:00
VariableGenerator.php Split VariableGenerator::addEditVars 2023-07-05 14:58:32 +00:00
VariableGeneratorFactory.php Replace WikiPage::factory in non-test code 2021-09-01 04:55:25 +00:00