Code Duplication    Length = 9-10 lines in 2 locations

includes/specialpage/SpecialPage.php 1 location

@@ 648-657 (lines=10) @@
645
	 * @return IContextSource|RequestContext
646
	 * @since 1.18
647
	 */
648
	public function getContext() {
649
		if ( $this->mContext instanceof IContextSource ) {
650
			return $this->mContext;
651
		} else {
652
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
653
				"Return RequestContext::getMain(); for sanity\n" );
654
655
			return RequestContext::getMain();
656
		}
657
	}
658
659
	/**
660
	 * Get the WebRequest being used for this instance

includes/page/Article.php 1 location

@@ 2032-2040 (lines=9) @@
2029
	 * @return IContextSource
2030
	 * @since 1.18
2031
	 */
2032
	public function getContext() {
2033
		if ( $this->mContext instanceof IContextSource ) {
2034
			return $this->mContext;
2035
		} else {
2036
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
2037
				"Return RequestContext::getMain(); for sanity\n" );
2038
			return RequestContext::getMain();
2039
		}
2040
	}
2041
2042
	/**
2043
	 * Use PHP's magic __get handler to handle accessing of