Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 934-952 (lines=19) @@
931
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
932
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
933
	 */
934
	public function setup_xmlrpc_handlers(
935
		$request_params,
936
		$is_active,
937
		$is_signed,
938
		Jetpack_XMLRPC_Server $xmlrpc_server = null
939
	) {
940
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
941
942
		if ( ! $this->connection_manager ) {
943
			$this->connection_manager = new Connection_Manager();
944
		}
945
946
		return $this->connection_manager->setup_xmlrpc_handlers(
947
			$request_params,
948
			$is_active,
949
			$is_signed,
950
			$xmlrpc_server
951
		);
952
	}
953
954
	/**
955
	 * Initialize REST API registration connector.
@@ 5660-5668 (lines=9) @@
5657
	 * @param string         $password Password string.
5658
	 * @return \WP_User|mixed Authenticated user or error.
5659
	 */
5660
	public function authenticate_jetpack( $user, $username, $password ) {
5661
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5662
5663
		if ( ! $this->connection_manager ) {
5664
			$this->connection_manager = new Connection_Manager();
5665
		}
5666
5667
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5668
	}
5669
5670
	/**
5671
	 * Authenticates requests from Jetpack server to WP REST API endpoints.