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

@@ 2021-2029 (lines=9) @@
2018
	 * @return IContextSource
2019
	 * @since 1.18
2020
	 */
2021
	public function getContext() {
2022
		if ( $this->mContext instanceof IContextSource ) {
2023
			return $this->mContext;
2024
		} else {
2025
			wfDebug( __METHOD__ . " called and \$mContext is null. " .
2026
				"Return RequestContext::getMain(); for sanity\n" );
2027
			return RequestContext::getMain();
2028
		}
2029
	}
2030
2031
	/**
2032
	 * Use PHP's magic __get handler to handle accessing of