Code Duplication    Length = 3-3 lines in 2 locations

_inc/class.jetpack-provision.php 1 location

@@ 150-152 (lines=3) @@
147
		);
148
149
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%d/partner-provision', self::get_api_host(), $blog_id );
150
		if ( ! empty( $named_args['partner_tracking_id'] ) ) {
151
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner_tracking_id'], $url ) );
152
		}
153
154
		// add calypso env if set
155
		if ( getenv( 'CALYPSO_ENV' ) ) {

class.jetpack-cli.php 1 location

@@ 872-874 (lines=3) @@
869
		);
870
871
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%s/partner-cancel', $this->get_api_host(), $site_identifier );
872
		if ( ! empty( $named_args ) && ! empty( $named_args['partner_tracking_id'] ) ) {
873
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner_tracking_id'], $url ) );
874
		}
875
876
		$result = Jetpack_Client::_wp_remote_request( $url, $request );
877