Code Duplication    Length = 10-10 lines in 2 locations

core/helpers/EEH_URL.helper.php 1 location

@@ 221-230 (lines=10) @@
218
	 * Gets the current page's full URL
219
	 * @return string
220
	 */
221
	public static function current_url() {
222
		if ( isset( $_SERVER[ 'HTTP_HOST' ], $_SERVER[ 'REQUEST_URI' ] ) ) {
223
			$url = is_ssl() ? 'https://' : 'http://';
224
			$url .= \EEH_URL::filter_input_server_url( 'HTTP_HOST' );
225
			$url .= \EEH_URL::filter_input_server_url( 'REQUEST_URI' );
226
		} else {
227
			$url = 'unknown';
228
		}
229
		return $url;
230
	}
231
232
233

payment_methods/Paypal_Standard/EEG_Paypal_Standard.gateway.php 1 location

@@ 471-480 (lines=10) @@
468
	 * _process_response_url
469
	 * @return string
470
	 */
471
	protected function _process_response_url() {
472
		if ( isset( $_SERVER[ 'HTTP_HOST' ], $_SERVER[ 'REQUEST_URI' ] ) ) {
473
			$url = is_ssl() ? 'https://' : 'http://';
474
			$url .= EEH_URL::filter_input_server_url( 'HTTP_HOST' );
475
			$url .= EEH_URL::filter_input_server_url();
476
		} else {
477
			$url = 'unknown';
478
		}
479
		return $url;
480
	}
481
482
483