Code Duplication    Length = 8-8 lines in 2 locations

includes/auth/AuthManager.php 2 locations

@@ 1016-1023 (lines=8) @@
1013
1014
		// Permissions check
1015
		$status = $this->checkAccountCreatePermissions( $creator );
1016
		if ( !$status->isGood() ) {
1017
			$this->logger->debug( __METHOD__ . ': {creator} cannot create users: {reason}', [
1018
				'user' => $username,
1019
				'creator' => $creator->getName(),
1020
				'reason' => $status->getWikiText( null, null, 'en' )
1021
			] );
1022
			return AuthenticationResponse::newFail( $status->getMessage() );
1023
		}
1024
1025
		$status = $this->canCreateAccount(
1026
			$username, [ 'flags' => User::READ_LOCKING, 'creating' => true ]
@@ 1028-1035 (lines=8) @@
1025
		$status = $this->canCreateAccount(
1026
			$username, [ 'flags' => User::READ_LOCKING, 'creating' => true ]
1027
		);
1028
		if ( !$status->isGood() ) {
1029
			$this->logger->debug( __METHOD__ . ': {user} cannot be created: {reason}', [
1030
				'user' => $username,
1031
				'creator' => $creator->getName(),
1032
				'reason' => $status->getWikiText( null, null, 'en' )
1033
			] );
1034
			return AuthenticationResponse::newFail( $status->getMessage() );
1035
		}
1036
1037
		$user = User::newFromName( $username, 'creatable' );
1038
		foreach ( $reqs as $req ) {