Code Duplication    Length = 10-13 lines in 2 locations

includes/user/User.php 2 locations

@@ 2039-2048 (lines=10) @@
2036
	 *
2037
	 * @return bool True if locked, false otherwise
2038
	 */
2039
	public function isLocked() {
2040
		if ( $this->mLocked !== null ) {
2041
			return $this->mLocked;
2042
		}
2043
		global $wgAuth;
2044
		$authUser = $wgAuth->getUserInstance( $this );
2045
		$this->mLocked = (bool)$authUser->isLocked();
2046
		Hooks::run( 'UserIsLocked', [ $this, &$this->mLocked ] );
2047
		return $this->mLocked;
2048
	}
2049
2050
	/**
2051
	 * Check if user account is hidden
@@ 2055-2067 (lines=13) @@
2052
	 *
2053
	 * @return bool True if hidden, false otherwise
2054
	 */
2055
	public function isHidden() {
2056
		if ( $this->mHideName !== null ) {
2057
			return $this->mHideName;
2058
		}
2059
		$this->getBlockedStatus();
2060
		if ( !$this->mHideName ) {
2061
			global $wgAuth;
2062
			$authUser = $wgAuth->getUserInstance( $this );
2063
			$this->mHideName = (bool)$authUser->isHidden();
2064
			Hooks::run( 'UserIsHidden', [ $this, &$this->mHideName ] );
2065
		}
2066
		return $this->mHideName;
2067
	}
2068
2069
	/**
2070
	 * Get the user's ID.