Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

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