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.
@@ 5657-5665 (lines=9) @@
5654
	 * @param string         $password Password string.
5655
	 * @return \WP_User|mixed Authenticated user or error.
5656
	 */
5657
	public function authenticate_jetpack( $user, $username, $password ) {
5658
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5659
5660
		if ( ! $this->connection_manager ) {
5661
			$this->connection_manager = new Connection_Manager();
5662
		}
5663
5664
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5665
	}
5666
5667
	/**
5668
	 * Authenticates requests from Jetpack server to WP REST API endpoints.