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