Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5503-5511 (lines=9) @@
5500
	 * @param string         $password Password string.
5501
	 * @return \WP_User|mixed Authenticated user or error.
5502
	 */
5503
	public function authenticate_jetpack( $user, $username, $password ) {
5504
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5505
5506
		if ( ! $this->connection_manager ) {
5507
			$this->connection_manager = new Connection_Manager();
5508
		}
5509
5510
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5511
	}
5512
5513
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5514
	// Uses the existing XMLRPC request signing implementation.
@@ 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.