Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 5527-5535 (lines=9) @@
5524
	 * @param string         $password Password string.
5525
	 * @return \WP_User|mixed Authenticated user or error.
5526
	 */
5527
	public function authenticate_jetpack( $user, $username, $password ) {
5528
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5529
5530
		if ( ! $this->connection_manager ) {
5531
			$this->connection_manager = new Connection_Manager();
5532
		}
5533
5534
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5535
	}
5536
5537
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5538
	// Uses the existing XMLRPC request signing implementation.
@@ 861-879 (lines=19) @@
858
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
859
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
860
	 */
861
	public function setup_xmlrpc_handlers(
862
		$request_params,
863
		$is_active,
864
		$is_signed,
865
		Jetpack_XMLRPC_Server $xmlrpc_server = null
866
	) {
867
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
868
869
		if ( ! $this->connection_manager ) {
870
			$this->connection_manager = new Connection_Manager();
871
		}
872
873
		return $this->connection_manager->setup_xmlrpc_handlers(
874
			$request_params,
875
			$is_active,
876
			$is_signed,
877
			$xmlrpc_server
878
		);
879
	}
880
881
	/**
882
	 * Initialize REST API registration connector.