Remove unused parameter from two private Cite functions

The iodea is to make the code simpler and easier to read. If no
code uses this feature, all it does is making the code unnecessary
complex.

Change-Id: I22747712a691443a29b57831d3a6926275ad986b
This commit is contained in:
Thiemo Kreuz (WMDE) 2018-11-19 16:24:21 +01:00
parent 7ecdec713d
commit a8da30d4fd

View file

@ -234,7 +234,6 @@ class Cite {
* @param string|null $str Raw content of the <ref> tag. * @param string|null $str Raw content of the <ref> tag.
* @param string[] $argv Arguments * @param string[] $argv Arguments
* @param Parser $parser * @param Parser $parser
* @param string $default_group
* *
* @throws Exception * @throws Exception
* @return string * @return string
@ -242,8 +241,7 @@ class Cite {
private function guardedRef( private function guardedRef(
$str, $str,
array $argv, array $argv,
Parser $parser, Parser $parser
$default_group = self::DEFAULT_GROUP
) { ) {
$this->mParser = $parser; $this->mParser = $parser;
@ -258,7 +256,7 @@ class Cite {
if ( $this->mInReferences ) { if ( $this->mInReferences ) {
$group = $this->mReferencesGroup; $group = $this->mReferencesGroup;
} else { } else {
$group = $default_group; $group = self::DEFAULT_GROUP;
} }
} }
@ -672,14 +670,13 @@ class Cite {
* @param string|null $str Raw content of the <references> tag. * @param string|null $str Raw content of the <references> tag.
* @param string[] $argv * @param string[] $argv
* @param Parser $parser * @param Parser $parser
* @param string $group *
* @return string * @return string
*/ */
private function guardedReferences( private function guardedReferences(
$str, $str,
array $argv, array $argv,
Parser $parser, Parser $parser
$group = self::DEFAULT_GROUP
) { ) {
global $wgCiteResponsiveReferences; global $wgCiteResponsiveReferences;
@ -688,6 +685,8 @@ class Cite {
if ( isset( $argv['group'] ) ) { if ( isset( $argv['group'] ) ) {
$group = $argv['group']; $group = $argv['group'];
unset( $argv['group'] ); unset( $argv['group'] );
} else {
$group = self::DEFAULT_GROUP;
} }
if ( strval( $str ) !== '' ) { if ( strval( $str ) !== '' ) {