Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5529-5537 (lines=9) @@
5526
	 * @param string         $password Password string.
5527
	 * @return \WP_User|mixed Authenticated user or error.
5528
	 */
5529
	public function authenticate_jetpack( $user, $username, $password ) {
5530
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5531
5532
		if ( ! $this->connection_manager ) {
5533
			$this->connection_manager = new Connection_Manager();
5534
		}
5535
5536
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5537
	}
5538
5539
	/**
5540
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 900-918 (lines=19) @@
897
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
898
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
899
	 */
900
	public function setup_xmlrpc_handlers(
901
		$request_params,
902
		$is_active,
903
		$is_signed,
904
		Jetpack_XMLRPC_Server $xmlrpc_server = null
905
	) {
906
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
907
908
		if ( ! $this->connection_manager ) {
909
			$this->connection_manager = new Connection_Manager();
910
		}
911
912
		return $this->connection_manager->setup_xmlrpc_handlers(
913
			$request_params,
914
			$is_active,
915
			$is_signed,
916
			$xmlrpc_server
917
		);
918
	}
919
920
	/**
921
	 * Initialize REST API registration connector.