Code Duplication    Length = 9-19 lines in 2 locations

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

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