Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

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