Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 2 locations

@@ 869-871 (lines=3) @@
866
		);
867
868
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%s/partner-cancel', $this->get_api_host(), $site_identifier );
869
		if ( ! empty( $named_args ) && ! empty( $named_args['partner-tracking-id'] ) ) {
870
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner-tracking-id'], $url ) );
871
		}
872
873
		$result = Jetpack_Client::_wp_remote_request( $url, $request );
874
@@ 1078-1080 (lines=3) @@
1075
		);
1076
1077
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%d/partner-provision', $this->get_api_host(), $blog_id );
1078
		if ( ! empty( $named_args['partner-tracking-id'] ) ) {
1079
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner-tracking-id'], $url ) );
1080
		}
1081
1082
		// add calypso env if set
1083
		if ( getenv( 'CALYPSO_ENV' ) ) {