Code Duplication    Length = 14-15 lines in 2 locations

includes/parser/Parser.php 2 locations

@@ 5572-5585 (lines=14) @@
5569
	 *
5570
	 * @return string User name
5571
	 */
5572
	public function getRevisionUser() {
5573
		if ( is_null( $this->mRevisionUser ) ) {
5574
			$revObject = $this->getRevisionObject();
5575
5576
			# if this template is subst: the revision id will be blank,
5577
			# so just use the current user's name
5578
			if ( $revObject ) {
5579
				$this->mRevisionUser = $revObject->getUserText();
5580
			} elseif ( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) {
5581
				$this->mRevisionUser = $this->getUser()->getName();
5582
			}
5583
		}
5584
		return $this->mRevisionUser;
5585
	}
5586
5587
	/**
5588
	 * Get the size of the revision
@@ 5592-5606 (lines=15) @@
5589
	 *
5590
	 * @return int|null Revision size
5591
	 */
5592
	public function getRevisionSize() {
5593
		if ( is_null( $this->mRevisionSize ) ) {
5594
			$revObject = $this->getRevisionObject();
5595
5596
			# if this variable is subst: the revision id will be blank,
5597
			# so just use the parser input size, because the own substituation
5598
			# will change the size.
5599
			if ( $revObject ) {
5600
				$this->mRevisionSize = $revObject->getSize();
5601
			} elseif ( $this->ot['wiki'] || $this->mOptions->getIsPreview() ) {
5602
				$this->mRevisionSize = $this->mInputSize;
5603
			}
5604
		}
5605
		return $this->mRevisionSize;
5606
	}
5607
5608
	/**
5609
	 * Mutator for $mDefaultSort