aboutsummaryrefslogtreecommitdiffstats
path: root/includes/CommentFormatter
diff options
context:
space:
mode:
authorEbrahim Byagowi <ebrahim@gnu.org>2024-10-04 10:14:53 +0330
committerEbrahim Byagowi <ebrahim@gnu.org>2024-10-04 10:23:17 +0330
commitbc7ec83596317a947aa5386712a7ee12d70e6a0d (patch)
tree2a2dd016eed4f05b973cd4002ce1c0a78dd91576 /includes/CommentFormatter
parenta7a052a9d339a6152dc35db4c5be3b4e15dd150f (diff)
downloadmediawikicore-bc7ec83596317a947aa5386712a7ee12d70e6a0d.tar.gz
mediawikicore-bc7ec83596317a947aa5386712a7ee12d70e6a0d.zip
Remove CommentFormatter::formatStringsAsBlock
This doesn't seem to be used anywhere except the tests and the better API is to use $formatter->createBatch() API that doesn't expose 'ugly boolean parameters' as described by formatInternal method above so let's remove it. https://codesearch.wmcloud.org/search/?q=formatStringsAsBlock Change-Id: Ia7428f5dbdf6c76b7537ae3889aef077bb26c722
Diffstat (limited to 'includes/CommentFormatter')
-rw-r--r--includes/CommentFormatter/CommentFormatter.php30
1 files changed, 0 insertions, 30 deletions
diff --git a/includes/CommentFormatter/CommentFormatter.php b/includes/CommentFormatter/CommentFormatter.php
index e44c8d034a26..5c888d4c11e2 100644
--- a/includes/CommentFormatter/CommentFormatter.php
+++ b/includes/CommentFormatter/CommentFormatter.php
@@ -177,36 +177,6 @@ class CommentFormatter {
}
/**
- * Given an array of comments as strings which all have the same self link
- * target, format the comments and wrap them in standard punctuation and
- * formatting.
- *
- * If you need a different title for each comment, use createBatch().
- *
- * @param string[] $strings
- * @param LinkTarget|null $selfLinkTarget The title used for fragment-only
- * and section links, formerly $title.
- * @param bool $samePage If true, self links are rendered with a fragment-
- * only URL. Formerly $local.
- * @param string|false|null $wikiId ID of the wiki to link to (if not the local
- * wiki), as used by WikiMap.
- * @param bool $useParentheses
- * @return string[]
- */
- public function formatStringsAsBlock( $strings, LinkTarget $selfLinkTarget = null,
- $samePage = false, $wikiId = false, $useParentheses = true
- ) {
- $parser = $this->parserFactory->create();
- $outputs = [];
- foreach ( $strings as $i => $comment ) {
- $outputs[$i] = $this->wrapCommentWithBlock(
- $parser->preprocess( $comment, $selfLinkTarget, $samePage, $wikiId ),
- $useParentheses );
- }
- return $parser->finalize( $outputs );
- }
-
- /**
* Wrap and format the given revision's comment block, if the specified
* user is allowed to view it.
*