Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5523-5531 (lines=9) @@
5520
	 * @param string         $password Password string.
5521
	 * @return \WP_User|mixed Authenticated user or error.
5522
	 */
5523
	public function authenticate_jetpack( $user, $username, $password ) {
5524
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5525
5526
		if ( ! $this->connection_manager ) {
5527
			$this->connection_manager = new Connection_Manager();
5528
		}
5529
5530
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5531
	}
5532
5533
	/**
5534
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 910-928 (lines=19) @@
907
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
908
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
909
	 */
910
	public function setup_xmlrpc_handlers(
911
		$request_params,
912
		$is_active,
913
		$is_signed,
914
		Jetpack_XMLRPC_Server $xmlrpc_server = null
915
	) {
916
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
917
918
		if ( ! $this->connection_manager ) {
919
			$this->connection_manager = new Connection_Manager();
920
		}
921
922
		return $this->connection_manager->setup_xmlrpc_handlers(
923
			$request_params,
924
			$is_active,
925
			$is_signed,
926
			$xmlrpc_server
927
		);
928
	}
929
930
	/**
931
	 * Initialize REST API registration connector.