Code Duplication    Length = 9-19 lines in 2 locations

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

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