Code Duplication    Length = 9-19 lines in 2 locations

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

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