Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5587-5595 (lines=9) @@
5584
	 * @param string         $password Password string.
5585
	 * @return \WP_User|mixed Authenticated user or error.
5586
	 */
5587
	public function authenticate_jetpack( $user, $username, $password ) {
5588
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5589
5590
		if ( ! $this->connection_manager ) {
5591
			$this->connection_manager = new Connection_Manager();
5592
		}
5593
5594
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5595
	}
5596
5597
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5598
	// Uses the existing XMLRPC request signing implementation.
@@ 860-878 (lines=19) @@
857
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
858
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
859
	 */
860
	public function setup_xmlrpc_handlers(
861
		$request_params,
862
		$is_active,
863
		$is_signed,
864
		Jetpack_XMLRPC_Server $xmlrpc_server = null
865
	) {
866
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
867
868
		if ( ! $this->connection_manager ) {
869
			$this->connection_manager = new Connection_Manager();
870
		}
871
872
		return $this->connection_manager->setup_xmlrpc_handlers(
873
			$request_params,
874
			$is_active,
875
			$is_signed,
876
			$xmlrpc_server
877
		);
878
	}
879
880
	/**
881
	 * Initialize REST API registration connector.