mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-23 22:45:20 +00:00
Move property initializations from constructor to property
This is doing the same as before, in pretty much the same execution order. The only difference is the syntax. In JavaScript it's relevant to not do array initializations to early. Otherwise different instances share the same array. But this doesn't happen in PHP. Change-Id: I56363ccadf29f2b806f765ab8f54a3c1863fc10f
This commit is contained in:
parent
eeb8e28e52
commit
8094a0ebf5
|
@ -23,20 +23,18 @@ class RefGroup {
|
|||
/**
|
||||
* @var stdClass[]
|
||||
*/
|
||||
public $refs;
|
||||
public array $refs = [];
|
||||
|
||||
/**
|
||||
* @var stdClass[]
|
||||
*/
|
||||
public $indexByName;
|
||||
public array $indexByName = [];
|
||||
|
||||
/**
|
||||
* @param string $group
|
||||
*/
|
||||
public function __construct( string $group = '' ) {
|
||||
$this->name = $group;
|
||||
$this->refs = [];
|
||||
$this->indexByName = [];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue