Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 939-957 (lines=19) @@
936
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
937
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
938
	 */
939
	public function setup_xmlrpc_handlers(
940
		$request_params,
941
		$is_active,
942
		$is_signed,
943
		Jetpack_XMLRPC_Server $xmlrpc_server = null
944
	) {
945
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
946
947
		if ( ! $this->connection_manager ) {
948
			$this->connection_manager = new Connection_Manager();
949
		}
950
951
		return $this->connection_manager->setup_xmlrpc_handlers(
952
			$request_params,
953
			$is_active,
954
			$is_signed,
955
			$xmlrpc_server
956
		);
957
	}
958
959
	/**
960
	 * Initialize REST API registration connector.
@@ 5609-5617 (lines=9) @@
5606
	 * @param string         $password Password string.
5607
	 * @return \WP_User|mixed Authenticated user or error.
5608
	 */
5609
	public function authenticate_jetpack( $user, $username, $password ) {
5610
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5611
5612
		if ( ! $this->connection_manager ) {
5613
			$this->connection_manager = new Connection_Manager();
5614
		}
5615
5616
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5617
	}
5618
5619
	/**
5620
	 * Authenticates requests from Jetpack server to WP REST API endpoints.