Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 310-318 (lines=9) @@
307
	 * @param string         $password Password string.
308
	 * @return \WP_User|mixed Authenticated user or error.
309
	 */
310
	public function authenticate_jetpack( $user, $username, $password ) {
311
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
312
313
		if ( ! $this->connection_manager ) {
314
			$this->connection_manager = new Connection_Manager();
315
		}
316
317
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
318
	}
319
320
	/**
321
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 853-871 (lines=19) @@
850
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
851
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
852
	 */
853
	public function setup_xmlrpc_handlers(
854
		$request_params,
855
		$is_active,
856
		$is_signed,
857
		Jetpack_XMLRPC_Server $xmlrpc_server = null
858
	) {
859
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
860
861
		if ( ! $this->connection_manager ) {
862
			$this->connection_manager = new Connection_Manager();
863
		}
864
865
		return $this->connection_manager->setup_xmlrpc_handlers(
866
			$request_params,
867
			$is_active,
868
			$is_signed,
869
			$xmlrpc_server
870
		);
871
	}
872
}
873