Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 1 location

@@ 862-864 (lines=3) @@
859
		);
860
861
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%s/partner-cancel', $this->get_api_host(), $site_identifier );
862
		if ( ! empty( $named_args ) && ! empty( $named_args['partner-tracking-id'] ) ) {
863
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner-tracking-id'], $url ) );
864
		}
865
866
		$result = Jetpack_Client::_wp_remote_request( $url, $request );
867

_inc/class.jetpack-provision.php 1 location

@@ 129-131 (lines=3) @@
126
		);
127
128
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%d/partner-provision', $this->get_api_host(), $blog_id );
129
		if ( ! empty( $named_args['partner-tracking-id'] ) ) {
130
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner-tracking-id'], $url ) );
131
		}
132
133
		// add calypso env if set
134
		if ( getenv( 'CALYPSO_ENV' ) ) {