From 12f4689cc8b2a7c6b60c93f8f62576fad4d0db46 Mon Sep 17 00:00:00 2001 From: daniel Date: Mon, 5 May 2014 18:04:43 +0200 Subject: [PATCH] TextContent: Document parameters to convert() Mostly extracted from I979e2438. Change-Id: I764aae970a2ad90a54aa9816d81070d0899fd10a --- includes/content/TextContent.php | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/includes/content/TextContent.php b/includes/content/TextContent.php index a7298d3191..0c6b06f177 100644 --- a/includes/content/TextContent.php +++ b/includes/content/TextContent.php @@ -170,8 +170,7 @@ class TextContent extends AbstractContent { * * @since 1.21 * - * @param Content $that The other content object to compare this content - * object to. + * @param Content $that The other content object to compare this content object to. * @param Language $lang The language object to use for text segmentation. * If not given, $wgContentLang is used. * @@ -269,10 +268,12 @@ class TextContent extends AbstractContent { * This implementation provides lossless conversion between content models based * on TextContent. * - * @param string $toModel - * @param string $lossy + * @param string $toModel The desired content model, use the CONTENT_MODEL_XXX flags. + * @param string $lossy Flag, set to "lossy" to allow lossy conversion. If lossy conversion is not + * allowed, full round-trip conversion is expected to work without losing information. * - * @return Content|bool + * @return Content|bool A content object with the content model $toModel, or false if that + * conversion is not supported. * * @see Content::convert() */ @@ -286,7 +287,7 @@ class TextContent extends AbstractContent { $toHandler = ContentHandler::getForModelID( $toModel ); if ( $toHandler instanceof TextContentHandler ) { - //NOTE: ignore content serialization format - it's just text anyway. + // NOTE: ignore content serialization format - it's just text anyway. $text = $this->getNativeData(); $converted = $toHandler->unserializeContent( $text ); } -- 2.20.1