Failed Conditions
Push — develop ( bda8a4...041628 )
by Reüel
02:55
created

DataHelper::set_field()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 2
dl 0
loc 4
ccs 3
cts 3
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Pronamic\WordPress\Pay\Gateways\Ingenico;
4
5
/**
6
 * Title: Ingenico data helper class
7
 * Description:
8
 * Copyright: 2005-2019 Pronamic
9
 * Company: Pronamic
10
 *
11
 * @author  Remco Tolsma
12
 * @version 2.0.0
13
 * @since   1.1.0
14
 */
15
abstract class DataHelper {
16
	/**
17
	 * Data
18
	 *
19
	 * @var array
20
	 */
21
	protected $data;
22
23
	/**
24
	 * Constructs and initialize a Ogone data default helper class
25
	 *
26
	 * @param Data $data Data.
27
	 */
28 4
	public function __construct( Data $data ) {
29 4
		$this->data = $data;
0 ignored issues
show
Documentation Bug introduced by
It seems like $data of type Pronamic\WordPress\Pay\Gateways\Ingenico\Data is incompatible with the declared type array of property $data.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
30 4
	}
31
32
	/**
33
	 * Set field
34
	 *
35
	 * @param string $name  Name.
36
	 * @param string $value Value.
37
	 *
38
	 * @return mixed
39
	 */
40 4
	public function set_field( $name, $value ) {
41 4
		$this->data->set_field( $name, $value );
42
43 4
		return $this;
44
	}
45
}
46