Code Duplication    Length = 9-19 lines in 2 locations

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

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