Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 942-960 (lines=19) @@
939
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
940
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
941
	 */
942
	public function setup_xmlrpc_handlers(
943
		$request_params,
944
		$is_active,
945
		$is_signed,
946
		Jetpack_XMLRPC_Server $xmlrpc_server = null
947
	) {
948
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
949
950
		if ( ! $this->connection_manager ) {
951
			$this->connection_manager = new Connection_Manager();
952
		}
953
954
		return $this->connection_manager->setup_xmlrpc_handlers(
955
			$request_params,
956
			$is_active,
957
			$is_signed,
958
			$xmlrpc_server
959
		);
960
	}
961
962
	/**
963
	 * Initialize REST API registration connector.
@@ 5686-5694 (lines=9) @@
5683
	 * @param string         $password Password string.
5684
	 * @return \WP_User|mixed Authenticated user or error.
5685
	 */
5686
	public function authenticate_jetpack( $user, $username, $password ) {
5687
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5688
5689
		if ( ! $this->connection_manager ) {
5690
			$this->connection_manager = new Connection_Manager();
5691
		}
5692
5693
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5694
	}
5695
5696
	/**
5697
	 * Authenticates requests from Jetpack server to WP REST API endpoints.