Code Duplication    Length = 8-10 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 867-876 (lines=10) @@
864
	 * Determine whether accounts can be created
865
	 * @return bool
866
	 */
867
	public function canCreateAccounts() {
868
		foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) {
869
			switch ( $provider->accountCreationType() ) {
870
				case PrimaryAuthenticationProvider::TYPE_CREATE:
871
				case PrimaryAuthenticationProvider::TYPE_LINK:
872
					return true;
873
			}
874
		}
875
		return false;
876
	}
877
878
	/**
879
	 * Determine whether a particular account can be created
@@ 1698-1705 (lines=8) @@
1695
	 * Determine whether accounts can be linked
1696
	 * @return bool
1697
	 */
1698
	public function canLinkAccounts() {
1699
		foreach ( $this->getPrimaryAuthenticationProviders() as $provider ) {
1700
			if ( $provider->accountCreationType() === PrimaryAuthenticationProvider::TYPE_LINK ) {
1701
				return true;
1702
			}
1703
		}
1704
		return false;
1705
	}
1706
1707
	/**
1708
	 * Start an account linking flow