Code Duplication    Length = 9-19 lines in 2 locations

projects/plugins/jetpack/class.jetpack.php 2 locations

@@ 926-944 (lines=19) @@
923
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
924
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
925
	 */
926
	public function setup_xmlrpc_handlers(
927
		$request_params,
928
		$is_active,
929
		$is_signed,
930
		Jetpack_XMLRPC_Server $xmlrpc_server = null
931
	) {
932
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
933
934
		if ( ! $this->connection_manager ) {
935
			$this->connection_manager = new Connection_Manager();
936
		}
937
938
		return $this->connection_manager->setup_xmlrpc_handlers(
939
			$request_params,
940
			$is_active,
941
			$is_signed,
942
			$xmlrpc_server
943
		);
944
	}
945
946
	/**
947
	 * Initialize REST API registration connector.
@@ 5515-5523 (lines=9) @@
5512
	 * @param string         $password Password string.
5513
	 * @return \WP_User|mixed Authenticated user or error.
5514
	 */
5515
	public function authenticate_jetpack( $user, $username, $password ) {
5516
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5517
5518
		if ( ! $this->connection_manager ) {
5519
			$this->connection_manager = new Connection_Manager();
5520
		}
5521
5522
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5523
	}
5524
5525
	/**
5526
	 * Authenticates requests from Jetpack server to WP REST API endpoints.