Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5501-5509 (lines=9) @@
5498
	 * @param string         $password Password string.
5499
	 * @return \WP_User|mixed Authenticated user or error.
5500
	 */
5501
	public function authenticate_jetpack( $user, $username, $password ) {
5502
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5503
5504
		if ( ! $this->connection_manager ) {
5505
			$this->connection_manager = new Connection_Manager();
5506
		}
5507
5508
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5509
	}
5510
5511
	/**
5512
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 890-908 (lines=19) @@
887
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
888
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
889
	 */
890
	public function setup_xmlrpc_handlers(
891
		$request_params,
892
		$is_active,
893
		$is_signed,
894
		Jetpack_XMLRPC_Server $xmlrpc_server = null
895
	) {
896
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
897
898
		if ( ! $this->connection_manager ) {
899
			$this->connection_manager = new Connection_Manager();
900
		}
901
902
		return $this->connection_manager->setup_xmlrpc_handlers(
903
			$request_params,
904
			$is_active,
905
			$is_signed,
906
			$xmlrpc_server
907
		);
908
	}
909
910
	/**
911
	 * Initialize REST API registration connector.