mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-27 16:30:12 +00:00
Clean up signatures of ref group accessors
No need to hedge on null. Change-Id: I2afb7619a113d784741bd7d29eccf4d8368fe56f
This commit is contained in:
parent
0254f138ab
commit
049735ba0e
|
@ -41,9 +41,11 @@ class ReferencesData {
|
|||
/**
|
||||
* @param string $groupName
|
||||
* @param bool $allocIfMissing
|
||||
* @return RefGroup|null
|
||||
* @return ?RefGroup
|
||||
*/
|
||||
public function getRefGroup( string $groupName = '', bool $allocIfMissing = false ): ?RefGroup {
|
||||
public function getRefGroup(
|
||||
string $groupName, bool $allocIfMissing = false
|
||||
): ?RefGroup {
|
||||
if ( !isset( $this->refGroups[$groupName] ) && $allocIfMissing ) {
|
||||
$this->refGroups[$groupName] = new RefGroup( $groupName );
|
||||
}
|
||||
|
@ -51,13 +53,11 @@ class ReferencesData {
|
|||
}
|
||||
|
||||
/**
|
||||
* @param ?string $groupName
|
||||
* @param string $groupName
|
||||
*/
|
||||
public function removeRefGroup( ?string $groupName = null ): void {
|
||||
if ( $groupName !== null ) {
|
||||
// '' is a valid group (the default group)
|
||||
unset( $this->refGroups[$groupName] );
|
||||
}
|
||||
public function removeRefGroup( string $groupName ): void {
|
||||
// '' is a valid group (the default group)
|
||||
unset( $this->refGroups[$groupName] );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue