Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5489-5497 (lines=9) @@
5486
	 * @param string         $password Password string.
5487
	 * @return \WP_User|mixed Authenticated user or error.
5488
	 */
5489
	public function authenticate_jetpack( $user, $username, $password ) {
5490
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5491
5492
		if ( ! $this->connection_manager ) {
5493
			$this->connection_manager = new Connection_Manager();
5494
		}
5495
5496
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5497
	}
5498
5499
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5500
	// Uses the existing XMLRPC request signing implementation.
@@ 870-888 (lines=19) @@
867
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
868
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
869
	 */
870
	public function setup_xmlrpc_handlers(
871
		$request_params,
872
		$is_active,
873
		$is_signed,
874
		Jetpack_XMLRPC_Server $xmlrpc_server = null
875
	) {
876
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
877
878
		if ( ! $this->connection_manager ) {
879
			$this->connection_manager = new Connection_Manager();
880
		}
881
882
		return $this->connection_manager->setup_xmlrpc_handlers(
883
			$request_params,
884
			$is_active,
885
			$is_signed,
886
			$xmlrpc_server
887
		);
888
	}
889
890
	/**
891
	 * Initialize REST API registration connector.