Make HookRunner parameter mandatory in VariableGenerator

Depends-On: Icae3c7cd00bd9be62a46f9e85c311e46157ccabf
Depends-On: Ie5031528593ea28f3cdc3169336aa0e4337306f7
Depends-On: I7ff2f90d890a74fa14f40535c4a567fb3124920e
Change-Id: I4d629e26e31517aa06e6215499cc3422f0fe6c72
This commit is contained in:
Daimona Eaytoy 2021-01-04 12:47:26 +01:00
parent 00fe8a36be
commit 4cc608e320

View file

@ -22,14 +22,14 @@ class VariableGenerator {
private $hookRunner;
/**
* @param AbuseFilterHookRunner|null $hookRunner Null for BC
* @param AbuseFilterHookRunner $hookRunner
* @param VariableHolder|null $vars
*/
public function __construct(
AbuseFilterHookRunner $hookRunner = null,
AbuseFilterHookRunner $hookRunner,
VariableHolder $vars = null
) {
$this->hookRunner = $hookRunner ?? AbuseFilterHookRunner::getRunner();
$this->hookRunner = $hookRunner;
$this->vars = $vars ?? new VariableHolder();
}