Code Duplication    Length = 3-3 lines in 2 locations

_inc/class.jetpack-provision.php 1 location

@@ 184-186 (lines=3) @@
181
			self::get_api_host(),
182
			$blog_id
183
		) );
184
		if ( ! empty( $named_args['partner_tracking_id'] ) ) {
185
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner_tracking_id'], $url ) );
186
		}
187
188
		// Add calypso env if set.
189
		$calypso_env = Jetpack::get_calypso_env();

class.jetpack-cli.php 1 location

@@ 1121-1123 (lines=3) @@
1118
		);
1119
1120
		$url = sprintf( 'https://%s/rest/v1.3/jpphp/%s/partner-cancel', $this->get_api_host(), $site_identifier );
1121
		if ( ! empty( $named_args ) && ! empty( $named_args['partner_tracking_id'] ) ) {
1122
			$url = esc_url_raw( add_query_arg( 'partner_tracking_id', $named_args['partner_tracking_id'], $url ) );
1123
		}
1124
1125
		$result = Jetpack_Client::_wp_remote_request( $url, $request );
1126