Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 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.
@@ 5537-5545 (lines=9) @@
5534
	 * @param string         $password Password string.
5535
	 * @return \WP_User|mixed Authenticated user or error.
5536
	 */
5537
	public function authenticate_jetpack( $user, $username, $password ) {
5538
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5539
5540
		if ( ! $this->connection_manager ) {
5541
			$this->connection_manager = new Connection_Manager();
5542
		}
5543
5544
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5545
	}
5546
5547
	/**
5548
	 * Authenticates requests from Jetpack server to WP REST API endpoints.