Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5499-5507 (lines=9) @@
5496
	 * @param string         $password Password string.
5497
	 * @return \WP_User|mixed Authenticated user or error.
5498
	 */
5499
	public function authenticate_jetpack( $user, $username, $password ) {
5500
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5501
5502
		if ( ! $this->connection_manager ) {
5503
			$this->connection_manager = new Connection_Manager();
5504
		}
5505
5506
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5507
	}
5508
5509
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5510
	// Uses the existing XMLRPC request signing implementation.
@@ 887-905 (lines=19) @@
884
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
885
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
886
	 */
887
	public function setup_xmlrpc_handlers(
888
		$request_params,
889
		$is_active,
890
		$is_signed,
891
		Jetpack_XMLRPC_Server $xmlrpc_server = null
892
	) {
893
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
894
895
		if ( ! $this->connection_manager ) {
896
			$this->connection_manager = new Connection_Manager();
897
		}
898
899
		return $this->connection_manager->setup_xmlrpc_handlers(
900
			$request_params,
901
			$is_active,
902
			$is_signed,
903
			$xmlrpc_server
904
		);
905
	}
906
907
	/**
908
	 * Initialize REST API registration connector.