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

@@ 626-635 (lines=10) @@
623
	 * @return IContextSource|RequestContext
624
	 * @since 1.18
625
	 */
626
	public function getContext() {
627
		if ( $this->mContext instanceof IContextSource ) {
628
			return $this->mContext;
629
		} else {
630
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
631
				"Return RequestContext::getMain(); for sanity\n" );
632
633
			return RequestContext::getMain();
634
		}
635
	}
636
637
	/**
638
	 * Get the WebRequest being used for this instance