Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5517-5525 (lines=9) @@
5514
	 * @param string         $password Password string.
5515
	 * @return \WP_User|mixed Authenticated user or error.
5516
	 */
5517
	public function authenticate_jetpack( $user, $username, $password ) {
5518
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5519
5520
		if ( ! $this->connection_manager ) {
5521
			$this->connection_manager = new Connection_Manager();
5522
		}
5523
5524
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5525
	}
5526
5527
	/**
5528
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 904-922 (lines=19) @@
901
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
902
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
903
	 */
904
	public function setup_xmlrpc_handlers(
905
		$request_params,
906
		$is_active,
907
		$is_signed,
908
		Jetpack_XMLRPC_Server $xmlrpc_server = null
909
	) {
910
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
911
912
		if ( ! $this->connection_manager ) {
913
			$this->connection_manager = new Connection_Manager();
914
		}
915
916
		return $this->connection_manager->setup_xmlrpc_handlers(
917
			$request_params,
918
			$is_active,
919
			$is_signed,
920
			$xmlrpc_server
921
		);
922
	}
923
924
	/**
925
	 * Initialize REST API registration connector.