Failed Conditions
Push — develop ( f3c588...5c5209 )
by Reüel
17:11
created

src/AbstractIntegration.php (1 issue)

1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\IDealAdvancedV3;
4
5
use Pronamic\WordPress\Pay\Gateways\IDeal\AbstractIntegration as IDeal_AbstractIntegration;
6
7
/**
8
 * Title: iDEAL Advanced v3 abstract integration
9
 * Description:
10
 * Copyright: 2005-2019 Pronamic
11
 * Company: Pronamic
12
 *
13
 * @author  Remco Tolsma
14
 * @version 2.0.0
15
 * @since   1.0.0
16
 */
17
abstract class AbstractIntegration extends IDeal_AbstractIntegration {
18
	public function get_config_factory_class() {
19
		return __NAMESPACE__ . '\ConfigFactory';
20
	}
21
22
	public function get_settings_class() {
23
		return array(
0 ignored issues
show
Bug Best Practice introduced by
The expression return array('Pronamic\W...ESPACE__ . '\Settings') returns the type array<integer,string> which is incompatible with the return type mandated by Pronamic\WordPress\Pay\G...e::get_settings_class() of string.

In the issue above, the returned value is violating the contract defined by the mentioned interface.

Let's take a look at an example:

interface HasName {
    /** @return string */
    public function getName();
}

class Name {
    public $name;
}

class User implements HasName {
    /** @return string|Name */
    public function getName() {
        return new Name('foo'); // This is a violation of the ``HasName`` interface
                                // which only allows a string value to be returned.
    }
}
Loading history...
24
			'Pronamic\WordPress\Pay\Gateways\IDeal\Settings',
25
			__NAMESPACE__ . '\Settings',
26
		);
27
	}
28
29
	/**
30
	 * Get required settings for this integration.
31
	 *
32
	 * @see   https://github.com/wp-premium/gravityforms/blob/1.9.16/includes/fields/class-gf-field-multiselect.php#L21-L42
33
	 * @since 1.1.3
34
	 * @return array
35
	 */
36
	public function get_settings() {
37
		$settings = parent::get_settings();
38
39
		$settings[] = 'ideal-advanced-v3';
40
41
		return $settings;
42
	}
43
}
44