Code Duplication    Length = 9-19 lines in 2 locations

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

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