mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 08:50:07 +00:00
Merge "Rename $type to $action in rollbackRef()"
This commit is contained in:
commit
f642669522
|
@ -281,14 +281,14 @@ class ReferenceStack {
|
||||||
* counters remain incremented. Doing so prevents accidentally
|
* counters remain incremented. Doing so prevents accidentally
|
||||||
* corrupting certain links.
|
* corrupting certain links.
|
||||||
*
|
*
|
||||||
* @param string $type
|
* @param string $action
|
||||||
* @param string|null $name The name attribute passed in the ref tag.
|
* @param string|null $name The name attribute passed in the ref tag.
|
||||||
* @param string|null $extends
|
* @param string|null $extends
|
||||||
* @param string $group
|
* @param string $group
|
||||||
* @param int $index Autoincrement counter for this ref.
|
* @param int $index Autoincrement counter for this ref.
|
||||||
*/
|
*/
|
||||||
private function rollbackRef(
|
private function rollbackRef(
|
||||||
string $type,
|
string $action,
|
||||||
?string $name,
|
?string $name,
|
||||||
?string $extends,
|
?string $extends,
|
||||||
string $group,
|
string $group,
|
||||||
|
@ -323,7 +323,7 @@ class ReferenceStack {
|
||||||
$this->extendsCount[$group][$extends]--;
|
$this->extendsCount[$group][$extends]--;
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( $type ) {
|
switch ( $action ) {
|
||||||
case 'new':
|
case 'new':
|
||||||
# Rollback the addition of new elements to the stack.
|
# Rollback the addition of new elements to the stack.
|
||||||
unset( $this->refs[$group][$key] );
|
unset( $this->refs[$group][$key] );
|
||||||
|
@ -343,7 +343,7 @@ class ReferenceStack {
|
||||||
$this->refs[$group][$key]['count']--;
|
$this->refs[$group][$key]['count']--;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new \LogicException( "Unknown call stack action \"$type\"" );
|
throw new \LogicException( "Unknown call stack action \"$action\"" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue