*
* @return int The size
*/
- public function getSize( ) {
- $text = $this->getNativeData( );
+ public function getSize() {
+ $text = $this->getNativeData();
return strlen( $text );
}
public function isCountable( $hasLinks = null ) {
global $wgArticleCountMethod;
- if ( $this->isRedirect( ) ) {
+ if ( $this->isRedirect() ) {
return false;
}
*
* @return string: the raw text
*/
- public function getNativeData( ) {
+ public function getNativeData() {
$text = $this->mText;
return $text;
}
*
* @return string: the raw text
*/
- public function getTextForSearchIndex( ) {
+ public function getTextForSearchIndex() {
return $this->getNativeData();
}
*
* @return string|false: the raw text, or null if the conversion failed
*/
- public function getWikitextForTransclusion( ) {
+ public function getWikitextForTransclusion() {
$wikitext = $this->convert( CONTENT_MODEL_WIKITEXT, 'lossy' );
if ( $wikitext ) {
/**
* Diff this content object with another content object.
*
- * @since 1.21diff
+ * @since 1.21
*
* @param $that Content: The other content object to compare this content
* object to.
* @param $lang Language: The language object to use for text segmentation.
* If not given, $wgContentLang is used.
*
- * @return DiffResult: A diff representing the changes that would have to be
+ * @return Diff A diff representing the changes that would have to be
* made to this content object to make it equal to $that.
*/
public function diff( Content $that, Language $lang = null ) {
$this->checkModelID( $that->getModel() );
- # @todo: could implement this in DifferenceEngine and just delegate here?
+ // @todo could implement this in DifferenceEngine and just delegate here?
if ( !$lang ) {
$lang = $wgContLang;
}
$otext = $this->getNativeData();
- $ntext = $this->getNativeData();
+ $ntext = $that->getNativeData();
# Note: Use native PHP diff, external engines don't give us abstract output
$ota = explode( "\n", $lang->segmentForDiff( $otext ) );
*
* @return string an HTML representation of the content's markup
*/
- protected function getHighlightHtml( ) {
+ protected function getHighlightHtml() {
# TODO: make Highlighter interface, use highlighter here, if available
return htmlspecialchars( $this->getNativeData() );
}