Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 936-954 (lines=19) @@
933
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
934
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
935
	 */
936
	public function setup_xmlrpc_handlers(
937
		$request_params,
938
		$is_active,
939
		$is_signed,
940
		Jetpack_XMLRPC_Server $xmlrpc_server = null
941
	) {
942
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
943
944
		if ( ! $this->connection_manager ) {
945
			$this->connection_manager = new Connection_Manager();
946
		}
947
948
		return $this->connection_manager->setup_xmlrpc_handlers(
949
			$request_params,
950
			$is_active,
951
			$is_signed,
952
			$xmlrpc_server
953
		);
954
	}
955
956
	/**
957
	 * Initialize REST API registration connector.
@@ 5631-5639 (lines=9) @@
5628
	 * @param string         $password Password string.
5629
	 * @return \WP_User|mixed Authenticated user or error.
5630
	 */
5631
	public function authenticate_jetpack( $user, $username, $password ) {
5632
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5633
5634
		if ( ! $this->connection_manager ) {
5635
			$this->connection_manager = new Connection_Manager();
5636
		}
5637
5638
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5639
	}
5640
5641
	/**
5642
	 * Authenticates requests from Jetpack server to WP REST API endpoints.