Code Duplication    Length = 9-19 lines in 2 locations

projects/plugins/jetpack/class.jetpack.php 2 locations

@@ 927-945 (lines=19) @@
924
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
925
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
926
	 */
927
	public function setup_xmlrpc_handlers(
928
		$request_params,
929
		$is_active,
930
		$is_signed,
931
		Jetpack_XMLRPC_Server $xmlrpc_server = null
932
	) {
933
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
934
935
		if ( ! $this->connection_manager ) {
936
			$this->connection_manager = new Connection_Manager();
937
		}
938
939
		return $this->connection_manager->setup_xmlrpc_handlers(
940
			$request_params,
941
			$is_active,
942
			$is_signed,
943
			$xmlrpc_server
944
		);
945
	}
946
947
	/**
948
	 * Initialize REST API registration connector.
@@ 5517-5525 (lines=9) @@
5514
	 * @param string         $password Password string.
5515
	 * @return \WP_User|mixed Authenticated user or error.
5516
	 */
5517
	public function authenticate_jetpack( $user, $username, $password ) {
5518
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5519
5520
		if ( ! $this->connection_manager ) {
5521
			$this->connection_manager = new Connection_Manager();
5522
		}
5523
5524
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5525
	}
5526
5527
	/**
5528
	 * Authenticates requests from Jetpack server to WP REST API endpoints.