Code Duplication    Length = 9-10 lines in 2 locations

includes/page/Article.php 1 location

@@ 2044-2052 (lines=9) @@
2041
	 * @return IContextSource
2042
	 * @since 1.18
2043
	 */
2044
	public function getContext() {
2045
		if ( $this->mContext instanceof IContextSource ) {
2046
			return $this->mContext;
2047
		} else {
2048
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
2049
				"Return RequestContext::getMain(); for sanity\n" );
2050
			return RequestContext::getMain();
2051
		}
2052
	}
2053
2054
	/**
2055
	 * Use PHP's magic __get handler to handle accessing of

includes/specialpage/SpecialPage.php 1 location

@@ 537-546 (lines=10) @@
534
	 * @return IContextSource|RequestContext
535
	 * @since 1.18
536
	 */
537
	public function getContext() {
538
		if ( $this->mContext instanceof IContextSource ) {
539
			return $this->mContext;
540
		} else {
541
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
542
				"Return RequestContext::getMain(); for sanity\n" );
543
544
			return RequestContext::getMain();
545
		}
546
	}
547
548
	/**
549
	 * Get the WebRequest being used for this instance