Code Duplication    Length = 9-19 lines in 2 locations

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

@@ 5628-5636 (lines=9) @@
5625
	 * @param string         $password Password string.
5626
	 * @return \WP_User|mixed Authenticated user or error.
5627
	 */
5628
	public function authenticate_jetpack( $user, $username, $password ) {
5629
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::authenticate_jetpack' );
5630
5631
		if ( ! $this->connection_manager ) {
5632
			$this->connection_manager = new Connection_Manager();
5633
		}
5634
5635
		return $this->connection_manager->authenticate_jetpack( $user, $username, $password );
5636
	}
5637
5638
	/**
5639
	 * Authenticates requests from Jetpack server to WP REST API endpoints.
@@ 943-961 (lines=19) @@
940
	 * @param Boolean               $is_signed      Whether the signature check has been successful.
941
	 * @param Jetpack_XMLRPC_Server $xmlrpc_server  (optional) An instance of the server to use instead of instantiating a new one.
942
	 */
943
	public function setup_xmlrpc_handlers(
944
		$request_params,
945
		$is_active,
946
		$is_signed,
947
		Jetpack_XMLRPC_Server $xmlrpc_server = null
948
	) {
949
		_deprecated_function( __METHOD__, 'jetpack-7.7', 'Automattic\\Jetpack\\Connection\\Manager::setup_xmlrpc_handlers' );
950
951
		if ( ! $this->connection_manager ) {
952
			$this->connection_manager = new Connection_Manager();
953
		}
954
955
		return $this->connection_manager->setup_xmlrpc_handlers(
956
			$request_params,
957
			$is_active,
958
			$is_signed,
959
			$xmlrpc_server
960
		);
961
	}
962
963
	/**
964
	 * Initialize REST API registration connector.