aboutsummaryrefslogtreecommitdiffstats
path: root/includes/editpage
diff options
context:
space:
mode:
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>2021-05-12 10:52:47 +0200
committerKrinkle <krinkle@fastmail.com>2022-01-27 18:50:58 +0000
commite2a2a393f9fab1cea9bfe430d49b0b0d9e64ebf0 (patch)
tree8e4c3233246c8612486238e0cfda0198fd564c08 /includes/editpage
parent3843d16823c369a470eb8a8e447911cceb85e5ba (diff)
downloadmediawikicore-e2a2a393f9fab1cea9bfe430d49b0b0d9e64ebf0.tar.gz
mediawikicore-e2a2a393f9fab1cea9bfe430d49b0b0d9e64ebf0.zip
Move property initialisation out of the constructor
When the value is a constant, the initialization can be done way up together with the property declaration. I believe this makes the code easier to read because it's not spread out so much. Change-Id: I5af482feccb746c144c0f318e119165cf5a56cbe
Diffstat (limited to 'includes/editpage')
-rw-r--r--includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php3
1 files changed, 1 insertions, 2 deletions
diff --git a/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php b/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php
index a127e014262c..399e56e73472 100644
--- a/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php
+++ b/includes/editpage/Constraint/EditFilterMergedContentHookConstraint.php
@@ -55,7 +55,7 @@ class EditFilterMergedContentHookConstraint implements IEditConstraint {
private $status;
/** @var string */
- private $hookError;
+ private $hookError = '';
/**
* @param HookContainer $hookContainer
@@ -77,7 +77,6 @@ class EditFilterMergedContentHookConstraint implements IEditConstraint {
$this->summary = $summary;
$this->minorEdit = $minorEdit;
$this->status = Status::newGood();
- $this->hookError = '';
}
public function checkConstraint(): string {