Code Duplication    Length = 9-19 lines in 2 locations

class.jetpack.php 2 locations

@@ 874-892 (lines=19) @@
871
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
872
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
873
	 */
874
	public function setup_xmlrpc_handlers(
875
		$request_params,
876
		$is_active,
877
		$is_signed,
878
		Jetpack_XMLRPC_Server $xmlrpc_server = null
879
	) {
880
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
881
882
		if ( ! $this->connection_manager ) {
883
			$this->connection_manager = new Connection_Manager();
884
		}
885
886
		return $this->connection_manager->setup_xmlrpc_handlers(
887
			$request_params,
888
			$is_active,
889
			$is_signed,
890
			$xmlrpc_server
891
		);
892
	}
893
894
	/**
895
	 * Initialize REST API registration connector.
@@ 5485-5493 (lines=9) @@
5482
	 * @param string         $password Password string.
5483
	 * @return \WP_User|mixed Authenticated user or error.
5484
	 */
5485
	public function authenticate_jetpack( $user, $username, $password ) {
5486
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5487
5488
		if ( ! $this->connection_manager ) {
5489
			$this->connection_manager = new Connection_Manager();
5490
		}
5491
5492
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5493
	}
5494
5495
	// Authenticates requests from Jetpack server to WP REST API endpoints.
5496
	// Uses the existing XMLRPC request signing implementation.