Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5485-5493 (lines=9) @@
5482
	 * @param string         $password Password string.
5483
	 * @return \WP_User|mixed Authenticated user or error.
5484
	 */
5485
	public function authenticate_jetpack( $user, $username, $password ) {
5486
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5487
5488
		if ( ! $this->connection_manager ) {
5489
			$this->connection_manager = new Connection_Manager();
5490
		}
5491
5492
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5493
	}
5494
5495
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5496
	// Uses the existing XMLRPC request signing implementation.
@@ 849-867 (lines=19) @@
846
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
847
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
848
	 */
849
	public function setup_xmlrpc_handlers(
850
		$request_params,
851
		$is_active,
852
		$is_signed,
853
		Jetpack_XMLRPC_Server $xmlrpc_server = null
854
	) {
855
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
856
857
		if ( ! $this->connection_manager ) {
858
			$this->connection_manager = new Connection_Manager();
859
		}
860
861
		return $this->connection_manager->setup_xmlrpc_handlers(
862
			$request_params,
863
			$is_active,
864
			$is_signed,
865
			$xmlrpc_server
866
		);
867
	}
868
869
	/**
870
	 * Initialize REST API registration connector.