Test Failed
Push — master ( e1fb16...2c0485 )
by Reüel
04:54
created

Integration::get_settings()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 3
nc 1
nop 0
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Icepay;
4
5
use Pronamic\WordPress\Pay\Gateways\Common\AbstractIntegration;
6
7
/**
8
 * Title: ICEPAY integration
9
 * Description:
10
 * Copyright: 2005-2019 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author Reüel van der Steege
14
 * @version 2.0.0
15
 * @since 1.0.0
16
 */
17
class Integration extends AbstractIntegration {
18
	public function __construct() {
19
		$this->id            = 'icepay-ideal';
20
		$this->name          = 'ICEPAY';
21
		$this->url           = 'https://icepay.com/';
22
		$this->product_url   = __( 'https://icepay.com/nl/en/pricing-and-accounts/', 'pronamic_ideal' );
0 ignored issues
show
Bug introduced by
The function __ 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

22
		$this->product_url   = /** @scrutinizer ignore-call */ __( 'https://icepay.com/nl/en/pricing-and-accounts/', 'pronamic_ideal' );
Loading history...
23
		$this->dashboard_url = 'https://portal.icepay.com/';
24
		$this->provider      = 'icepay';
25
26
		// Actions
27
		$function = array( __NAMESPACE__ . '\Listener', 'listen' );
28
29
		if ( ! has_action( 'wp_loaded', $function ) ) {
0 ignored issues
show
Bug introduced by
The function has_action 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

29
		if ( ! /** @scrutinizer ignore-call */ has_action( 'wp_loaded', $function ) ) {
Loading history...
30
			add_action( 'wp_loaded', $function );
0 ignored issues
show
Bug introduced by
The function add_action 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

30
			/** @scrutinizer ignore-call */ 
31
   add_action( 'wp_loaded', $function );
Loading history...
31
		}
32
	}
33
34
	public function get_config_factory_class() {
35
		return __NAMESPACE__ . '\ConfigFactory';
36
	}
37
38
	public function get_settings_class() {
39
		return __NAMESPACE__ . '\Settings';
40
	}
41
42
	/**
43
	 * Get required settings for this integration.
44
	 *
45
	 * @link https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
46
	 * @since 1.0.2
47
	 * @return array
48
	 */
49
	public function get_settings() {
50
		$settings = parent::get_settings();
51
52
		$settings[] = 'icepay';
53
54
		return $settings;
55
	}
56
}
57