Test Failed
Push — develop ( 7cb291...9cc0c5 )
by Reüel
03:00
created

src/Util.php (2 issues)

Labels
Severity
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Ingenico;
4
5
/**
6
 * Title: Ingenico utility
7
 * Description:
8
 * Copyright: 2005-2019 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.0
13
 * @since   1.0.0
14
 */
15
class Util {
16
	/**
17
	 * Get parameter variable
18
	 *
19
	 * @param string $param_var
20
	 */
21
	public static function get_param_var( $param_var ) {
22
		// Find and replace
23
		// @link https://github.com/woothemes/woocommerce/blob/v2.0.19/classes/emails/class-wc-email-new-order.php
24
		$find    = array();
25
		$replace = array();
26
27
		$find[]    = '{site_url}';
28
		$replace[] = site_url();
0 ignored issues
show
The function site_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

28
		$replace[] = /** @scrutinizer ignore-call */ site_url();
Loading history...
29
30
		$find[]    = '{home_url}';
31
		$replace[] = home_url();
0 ignored issues
show
The function home_url was not found. Maybe you did not declare it correctly or list all dependencies? ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

31
		$replace[] = /** @scrutinizer ignore-call */ home_url();
Loading history...
32
33
		// Parameter Variable
34
		$param_var = str_replace( $find, $replace, $param_var );
35
36
		return $param_var;
37
	}
38
}
39