mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/AbuseFilter.git
synced 2024-11-27 23:40:19 +00:00
49edc86a78
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 |
||
---|---|---|
.. | ||
RCVariableGenerator.php | ||
RunVariableGenerator.php | ||
VariableGenerator.php | ||
VariableGeneratorFactory.php |