Code Duplication    Length = 8-9 lines in 2 locations

includes/logging/LogFormatter.php 1 location

@@ 612-619 (lines=8) @@
609
	 * @return string
610
	 */
611
	protected function makePageLink( Title $title = null, $parameters = [], $html = null ) {
612
		if ( !$this->plaintext ) {
613
			$link = Linker::link( $title, $html, [], $parameters );
614
		} else {
615
			if ( !$title instanceof Title ) {
616
				throw new MWException( "Expected title, got null" );
617
			}
618
			$link = '[[' . $title->getPrefixedText() . ']]';
619
		}
620
621
		return $link;
622
	}

includes/Revision.php 1 location

@@ 1400-1408 (lines=9) @@
1397
		global $wgDefaultExternalStore, $wgContentHandlerUseDB;
1398
1399
		// Not allowed to have rev_page equal to 0, false, etc.
1400
		if ( !$this->mPage ) {
1401
			$title = $this->getTitle();
1402
			if ( $title instanceof Title ) {
1403
				$titleText = ' for page ' . $title->getPrefixedText();
1404
			} else {
1405
				$titleText = '';
1406
			}
1407
			throw new MWException( "Cannot insert revision$titleText: page ID must be nonzero" );
1408
		}
1409
1410
		$this->checkContentModel();
1411