Code Duplication    Length = 3-3 lines in 2 locations

class.jetpack-cli.php 1 location

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

_inc/class.jetpack-provision.php 1 location

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