From 9196ccead75b4cdcfb54d9985ef3cf5658392019 Mon Sep 17 00:00:00 2001 From: WMDE-Fisch Date: Thu, 24 Oct 2019 14:38:46 +0200 Subject: [PATCH] Refine some workflow related comments Change-Id: Ib7a6c4cc085d91fe27c96cbfd9c7035465149319 --- includes/Cite.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/includes/Cite.php b/includes/Cite.php index d8af7d34d..bd17f4a19 100644 --- a/includes/Cite.php +++ b/includes/Cite.php @@ -512,9 +512,8 @@ class Cite { throw new Exception( 'Invalid stack key: ' . serialize( $key ) ); } - // Valid key + // Valid key with first occurrence if ( !isset( $this->mRefs[$group][$key] ) || !is_array( $this->mRefs[$group][$key] ) ) { - // First occurrence $this->mRefs[$group][$key] = [ 'text' => $str, 'count' => 0, @@ -533,9 +532,9 @@ class Cite { ); } - // We've been here before + // Valid key that is already known if ( $this->mRefs[$group][$key]['text'] === null && $str !== '' ) { - // If no text found before, use this text + // If no text was set before, use this text $this->mRefs[$group][$key]['text'] = $str; // Use the dir parameter only from the full definition of a named ref tag $this->mRefs[$group][$key]['dir'] = $dir; @@ -547,7 +546,7 @@ class Cite { && $parser->mStripState->unstripBoth( $str ) !== $parser->mStripState->unstripBoth( $this->mRefs[$group][$key]['text'] ) ) { - // two refs with same key and different content + // two refs with same key and different text // add error message to the original ref $this->mRefs[$group][$key]['text'] .= ' ' . $this->plainError( 'cite_error_references_duplicate_key', $key